android_kernel_oneplus_msm8998/arch
Luis Araneda 8b49a407ce ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
commit b7005d4ef4f3aa2dc24019ffba03a322557ac43d 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 ee333554fed5
("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:27:53 +02:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:13:22 +01:00
arc ARC: export "abort" for modules 2019-09-21 07:12:54 +02:00
arm ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2019-10-05 12:27:53 +02:00
arm64 arm64: compat: Allow single-byte watchpoints on all addresses 2019-08-25 10:53:03 +02:00
avr32 avr32: off by one in at32_init_pio() 2016-10-07 15:23:45 +02:00
blackfin pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:05:00 +01:00
c6x c6x/ptrace: Remove useless PTRACE_SETREGSET implementation 2017-03-31 09:49:53 +02:00
cris mm: replace get_user_pages() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
frv futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-27 09:33:48 +02:00
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:52:12 +02:00
ia64 ia64:unwind: fix double free for mod->arch.init_unw_table 2019-10-05 12:27:47 +02:00
m32r m32r: fix __get_user() 2016-09-24 10:07:43 +02:00
m68k bug.h: work around GCC PR82365 in BUG() 2019-07-10 09:56:42 +02:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 14:30:16 +02:00
microblaze microblaze: Fix simpleImage format generation 2018-08-06 16:24:39 +02:00
mips MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send() 2019-09-21 07:12:45 +02:00
mn10300 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-16 20:09:47 +01:00
nios2 nios2: reserve boot memory for device tree 2017-04-12 12:38:34 +02:00
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2018-09-19 22:48:55 +02:00
parisc parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 2019-08-04 09:34:52 +02:00
powerpc powerpc/tm: Fix oops on sigreturn on systems without TM 2019-08-04 09:35:00 +02:00
s390 s390/bpf: use 32-bit index for tail calls 2019-09-21 07:12:49 +02:00
score score: fix copy_from_user() and friends 2016-09-24 10:07:44 +02:00
sh sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-25 10:52:55 +02:00
sparc bug.h: work around GCC PR82365 in BUG() 2019-07-10 09:56:42 +02:00
tile futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
um um: Silence lockdep complaint about mmap_sem 2019-08-04 09:34:58 +02:00
unicore32 pwm: Changes for v4.4-rc1 2015-11-11 09:16:10 -08:00
x86 KVM: x86: Manually calculate reserved bits when loading PDPTRS 2019-10-05 12:27:52 +02:00
xtensa xtensa: fix return_address 2019-04-27 09:33:56 +02:00
.gitignore
Kconfig