[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5lYAYitvEjETv2J@gmail.com>
Date: Tue, 28 Jan 2025 23:19:45 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ard Biesheuvel <ardb@...nel.org>, linux-kernel@...r.kernel.org,
	the arch/x86 maintainers <x86@...nel.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: [GIT PULL] x86 fix
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@...nel.org> wrote:
> >
> > Fix a build regression on certain config and build environment
> > combinations that generate absolute references to symbols.
> 
> I'll hold off on this, because it looks like Ard is very close to 
> have this fixed (and also made it non-fatal in the process).
Makes sense - meanwhile while Ard is iterating his build-warning patch 
here's the SEV fix that should address the build failure you've 
reported.
Please pull the latest x86/urgent Git tree from:
   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-28
   # HEAD: 1105ab42a84bc11c62597005f78ccad2434fbd66 x86/sev: Disable jump tables in SEV startup code
Fix a build regression on certain config and build environment
combinations that generate absolute references to symbols.
 Thanks,
	Ingo
------------------>
Ard Biesheuvel (1):
      x86/sev: Disable jump tables in SEV startup code
 arch/x86/coco/sev/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
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
Powered by blists - more mailing lists
 
