linux-stable/arch/arm
Luis Araneda 44141474c0 ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
commit b7005d4ef4 upstream.

This fixes a kernel panic on memcpy when
FORTIFY_SOURCE is enabled.

The initial smp implementation on commit aa7eb2bb4e
("arm: zynq: Add smp support")
used memcpy, which worked fine until commit ee333554fe
("ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE")
enabled overflow checks at runtime, producing a read
overflow panic.

The computed size of memcpy args are:
- p_size (dst): 4294967295 = (size_t) -1
- q_size (src): 1
- size (len): 8

Additionally, the memory is marked as __iomem, so one of
the memcpy_* functions should be used for read/write.

Fixes: aa7eb2bb4e ("arm: zynq: Add smp support")
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-05 12:48:07 +02:00
..
boot ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks 2019-10-05 12:47:59 +02:00
common ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag 2018-02-25 11:07:51 +01:00
configs ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL 2018-11-21 09:24:03 +01:00
crypto crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-05-21 18:50:15 +02:00
firmware ARM: trusted_foundations: do not use naked function 2018-12-01 09:42:49 +01:00
include ARM: prevent tracing IPI_CPU_BACKTRACE 2019-06-15 11:54:51 +02:00
kernel ARM: prevent tracing IPI_CPU_BACKTRACE 2019-06-15 11:54:51 +02:00
kvm ARM: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling 2018-10-18 09:16:27 +02:00
lib ARM: 8833/1: Ensure that NEON code always compiles with Clang 2019-04-05 22:31:34 +02:00
mach-actions License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-alpine License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-axxia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-bcm License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-berlin
mach-clps711x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-cns3xxx ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment 2019-02-06 17:31:34 +01:00
mach-davinci ARM: davinci: fix sleep.S build error on ARMv4 2019-08-16 10:13:54 +02:00
mach-digicolor License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ebsa110 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-efm32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ep93xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-exynos ARM: exynos: Fix undefined instruction during Exynos5422 resume 2019-06-15 11:54:59 +02:00
mach-footbridge License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-gemini License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-highbank License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-hisi ARM: hisi: check of_iomap and fix missing of_node_put 2018-09-26 08:38:10 +02:00
mach-imx ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX 2019-06-25 11:36:54 +08:00
mach-integrator gpio: pl061: handle failed allocations 2019-02-20 10:20:50 +01:00
mach-iop13xx ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
mach-iop32x ARM: iop32x/n2100: fix PCI IRQ mapping 2019-02-15 08:09:12 +01:00
mach-iop33x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ixp4xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-keystone ARM: keystone: fix platform_domain_notifier array overrun 2018-06-21 04:02:59 +09:00
mach-ks8695 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-mmp ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt 2018-12-21 14:13:05 +01:00
mach-moxart
mach-mv78xx0 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-mvebu ARM: mvebu: declare asm symbols as character arrays in pmsu.c 2018-10-03 17:00:52 -07:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: OMAP1: ams-delta: Fix possible use of uninitialized field 2018-12-17 09:28:48 +01:00
mach-omap2 ARM: OMAP2+: Fix omap4 errata warning on other SoCs 2019-09-21 07:15:31 +02:00
mach-orion5x ARM: orion5x: Revert commit 4904dbda41. 2018-05-30 07:52:05 +02:00
mach-oxnas
mach-picoxcell
mach-prima2 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-pxa ARM: pxa: avoid section mismatch warning 2019-02-12 19:46:04 +01:00
mach-qcom
mach-realview
mach-rockchip ARM: rockchip: Force CONFIG_PM on Rockchip systems 2018-09-15 09:45:33 +02:00
mach-rpc ARM: riscpc: fix DMA 2019-08-06 19:05:19 +02:00
mach-s3c24xx ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify 2019-03-23 14:35:27 +01:00
mach-s3c64xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-s5pv210
mach-sa1100 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-shmobile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-socfpga License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sti
mach-stm32
mach-sunxi
mach-tango ARM: tango: Improve ARCH_MULTIPLATFORM compatibility 2019-02-15 08:09:12 +01:00
mach-tegra License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-u300 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-uniphier License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ux500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vexpress License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vt8500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-w90x900 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zynq ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2019-10-05 12:48:07 +02:00
mm ARM: 8901/1: add a criteria for pfn_valid of arm 2019-09-21 07:15:39 +02:00
net bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
nwfpe License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-iop ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
plat-omap ARM: OMAP: Fix dmtimer init for omap1 2018-05-30 07:52:01 +02:00
plat-orion ARM: orion: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
plat-pxa ARM: pxa: ssp: unneeded to free devm_ allocated data 2019-03-13 14:03:20 -07:00
plat-samsung ARM: samsung: Fix system restart on S3C6410 2019-10-05 12:48:07 +02:00
plat-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
probes ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-27 10:08:01 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso ARM: vdso: Remove dependency with the arch_timer driver internals 2019-05-31 06:47:18 -07:00
vfp ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc 2019-02-20 10:20:46 +01:00
xen arm/xen: don't inclide rwlock.h directly. 2017-10-26 16:58:17 -04:00
Kconfig ARM: 8824/1: fix a migrating irq bug when hotplug cpu 2019-03-23 14:35:14 +01:00
Kconfig-nommu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile ARM: 8766/1: drop no-thumb-interwork in EABI mode 2018-12-01 09:42:48 +01:00