Skip to content

Commit aeb6893

Browse files
damien-lemoaltorvalds
authored andcommitted
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 was introduced by commit 07fa619 ("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: 07fa619 ("x86/kexec: Restore GDT on return from ::preserve_context kexec") Signed-off-by: Damien Le Moal <[email protected]> Acked-by: Borislav Petkov (AMD) <[email protected]> Acked-by: David Woodhouse <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Linus Torvalds <[email protected]>
1 parent 32913f3 commit aeb6893

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/relocate_kernel_64.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <asm/pgtable_types.h>
1414
#include <asm/nospec-branch.h>
1515
#include <asm/unwind_hints.h>
16+
#include <asm/asm-offsets.h>
1617

1718
/*
1819
* Must be relocatable PIC code callable as a C function, in particular

0 commit comments

Comments
 (0)