[GIT PULL] x86 fix

Ingo Molnar posted 1 patch 1 year ago
There is a newer version of this series
arch/x86/coco/sev/Makefile | 4 ++++
1 file changed, 4 insertions(+)
[GIT PULL] x86 fix
Posted by Ingo Molnar 1 year ago

* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@kernel.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
Re: [GIT PULL] x86 fix
Posted by pr-tracker-bot@kernel.org 1 year ago
The pull request you sent on Tue, 28 Jan 2025 23:19:45 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-28

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
Re: [GIT PULL] x86 fix
Posted by Ingo Molnar 1 year ago
* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
> 
> > On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@kernel.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.

Erm, I phrased this poorly: the primary fix is that of a potential 
early boot crash in SEV-SNP guests - the wider build error was the 
canary that highlighted the SEV boot code bug that was benign in your 
specific environment.

Thanks,

	Ingo