Skip to content
Commit b7005d4e authored by Luis Araneda's avatar Luis Araneda Committed by Michal Simek
Browse files

ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up

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

The initial smp implementation on commit aa7eb2bb
("arm: zynq: Add smp support")
used memcpy, which worked fine until commit ee333554
("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: aa7eb2bb

 ("arm: zynq: Add smp support")
Signed-off-by: default avatarLuis Araneda <luaraneda@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 5f595063
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment