aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net_utils.c
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2025-01-27 11:43:37 +0000
committerIngo Molnar <[email protected]>2025-01-28 22:10:29 +0000
commit1105ab42a84bc11c62597005f78ccad2434fbd66 (patch)
tree7955dce0fea4dacf197f7be682bde2a744ffc422 /lib/net_utils.c
parentMerge tag 'mm-stable-2025-01-26-14-59' of git://git.kernel.org/pub/scm/linux/... (diff)
downloadkernel-1105ab42a84bc11c62597005f78ccad2434fbd66.tar.gz
kernel-1105ab42a84bc11c62597005f78ccad2434fbd66.zip
x86/sev: Disable jump tables in SEV startup code
When retpolines and IBT are both disabled, the compiler is free to use jump tables to optimize switch instructions. However, these are emitted by Clang as absolute references into .rodata: jmp *-0x7dfffe90(,%r9,8) R_X86_64_32S .rodata+0x170 Given that this code will execute before that address in .rodata has even been mapped, it is guaranteed to crash a SEV-SNP guest in a way that is difficult to diagnose. So disable jump tables when building this code. It would be better if we could attach this annotation to the __head macro but this appears to be impossible. Reported-by: Linus Torvalds <[email protected]> Tested-by: Linus Torvalds <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions