Skip to content
Commit 187bea47 authored by Takashi Iwai's avatar Takashi Iwai Committed by Dinh Nguyen
Browse files

ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE

When CONFIG_FORTIFY_SOURCE is set, memcpy() checks the potential
buffer overflow and panics.  The code in sofcpga bootstrapping
contains the memcpy() calls are mistakenly translated as the shorter
size, hence it triggers a panic as if it were overflowing.

This patch changes the secondary_trampoline and *_end definitions
to arrays for avoiding the false-positive crash above.

Fixes: 9c4566a1

 ("ARM: socfpga: Enable SMP for socfpga")
Suggested-by: default avatarKees Cook <keescook@chromium.org>
Buglink: https://bugzilla.suse.com/show_bug.cgi?id=1192473
Link: https://lore.kernel.org/r/20211117193244.31162-1-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
parent fa55b7dc
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