linux-stable/arch
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
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:20:53 +01:00
arc ARC: hide unused function unw_hdr_alloc 2019-07-21 09:04:41 +02:00
arm ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2019-10-05 12:48:07 +02:00
arm64 arm64: kpti: ensure patched kernel text is fetched from PoU 2019-10-05 12:47:57 +02:00
blackfin
c6x
cris
frv
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:31:25 +02:00
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:54:25 +02:00
ia64 ia64:unwind: fix double free for mod->arch.init_unw_table 2019-10-05 12:47:48 +02:00
m32r
m68k m68k: Add -ffreestanding to CFLAGS 2019-03-23 14:35:21 +01:00
metag
microblaze microblaze: Fix simpleImage format generation 2018-08-03 07:50:40 +02:00
mips MIPS: VDSO: Use same -m%-float cflag as the kernel proper 2019-09-19 09:08:05 +02:00
mn10300
nios2
openrisc openrisc: entry: Fix delay slot exception detection 2018-08-24 13:09:11 +02:00
parisc parisc: Fix build of compressed kernel even with debug enabled 2019-08-06 19:05:27 +02:00
powerpc powerpc/xive: Fix bogus error code returned by OPAL 2019-10-05 12:47:32 +02:00
s390 s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding 2019-10-05 12:48:01 +02:00
score
sh sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-25 10:50:01 +02:00
sparc bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
tile
um um: Silence lockdep complaint about mmap_sem 2019-07-31 07:28:53 +02:00
unicore32
x86 KVM: x86: Manually calculate reserved bits when loading PDPTRS 2019-10-05 12:48:06 +02:00
xtensa xtensa: add missing isync to the cpu_reset TLB code 2019-08-25 10:50:04 +02:00
.gitignore
Kconfig compiler.h: Allow arch-specific asm/compiler.h 2018-11-04 14:52:46 +01:00