summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-01-28 14:32:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-01-28 14:32:03 -0800
commit05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5 (patch)
treed8821d07913f49548ee1c3601ee8b0d21e0a52e2
parentb88fe2b5dd018c2b856fd6c32b82f25033e908d4 (diff)
parent1105ab42a84bc11c62597005f78ccad2434fbd66 (diff)
Merge tag 'x86-urgent-2025-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar: "Fix a potential early boot crash in SEV-SNP guests, where certain config and build environment combinations can generate absolute references to symbols in the early boot code" * tag 'x86-urgent-2025-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Disable jump tables in SEV startup code
-rw-r--r--arch/x86/coco/sev/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/coco/sev/Makefile b/arch/x86/coco/sev/Makefile
index 08de37559307..dcb06dc8b5ae 100644
--- a/arch/x86/coco/sev/Makefile
+++ b/arch/x86/coco/sev/Makefile
@@ -2,6 +2,10 @@
obj-y += core.o
+# jump tables are emitted using absolute references in non-PIC code
+# so they cannot be used in the early SEV startup code
+CFLAGS_core.o += -fno-jump-tables
+
ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_core.o = -pg
endif