linux-stable/arch/arm/mach-zynq
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
..
common.c clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
common.h ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
headsmp.S ARM: zynq: reserve space for jump target in secondary trampoline 2015-07-31 10:24:41 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile
platsmp.c ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2019-10-05 12:48:07 +02:00
pm.c ARM: zynq: PM: Fixed simple typo. 2015-01-29 15:38:09 +01:00
slcr.c ARM: zynq: address L2 cache data corruption 2016-02-09 10:18:12 +01:00