aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/module.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2025-01-23 14:07:35 -0500
committerIngo Molnar <mingo@kernel.org>2025-02-18 10:14:51 +0100
commita9a76b38aaf577887103e3ebb41d70e6aa5a4b19 (patch)
tree893a2f9c7f621d4c76827b84cc48334568e457e3 /arch/x86/kernel/module.c
parentx86/stackprotector: Remove stack protector test scripts (diff)
downloadlinux-a9a76b38aaf577887103e3ebb41d70e6aa5a4b19.tar.gz
linux-a9a76b38aaf577887103e3ebb41d70e6aa5a4b19.zip
x86/boot: Disable stack protector for early boot code
On 64-bit, this will prevent crashes when the canary access is changed from %gs:40 to %gs:__stack_chk_guard(%rip). RIP-relative addresses from the identity-mapped early boot code will target the wrong address with zero-based percpu. KASLR could then shift that address to an unmapped page causing a crash on boot. This early boot code runs well before user-space is active and does not need stack protector enabled. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250123190747.745588-4-brgerst@gmail.com
Diffstat (limited to 'arch/x86/kernel/module.c')
0 files changed, 0 insertions, 0 deletions