[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241208235332.479460-1-dlemoal@kernel.org>
Date: Mon, 9 Dec 2024 08:53:32 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
David Woodhouse <dwmw@...zon.co.uk>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86: Fix build regression with CONFIG_KEXEC_JUMP enabled
Build 6.13-rc12 for x86_64 with gcc 14.2.1 fails with the error:
ld: vmlinux.o: in function `virtual_mapped':
linux/arch/x86/kernel/relocate_kernel_64.S:249:(.text+0x5915b): undefined reference to `saved_context_gdt_desc'
when CONFIG_KEXEC_JUMP is enabled. This regression was introduced by
commit 07fa619f2a40 ("x86/kexec: Restore GDT on return from
::preserve_context kexec") which introduced a use of
saved_context_gdt_desc without a declaration for it. Fix that by
including asm/asm-offsets.h where saved_context_gdt_desc is defined
(indirectly in include/generated/asm-offsets.h which asm/asm-offsets.h
includes).
Fixes: 07fa619f2a40 ("x86/kexec: Restore GDT on return from ::preserve_context kexec")
Signed-off-by: Damien Le Moal <dlemoal@...nel.org>
---
arch/x86/kernel/relocate_kernel_64.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 1236f25fc8d1..540443d699e3 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -13,6 +13,7 @@
#include <asm/pgtable_types.h>
#include <asm/nospec-branch.h>
#include <asm/unwind_hints.h>
+#include <asm/asm-offsets.h>
/*
* Must be relocatable PIC code callable as a C function, in particular
--
2.47.1
Powered by blists - more mailing lists