Commit aeb68937 authored by Damien Le Moal's avatar Damien Le Moal Committed by Linus Torvalds
Browse files

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 07fa619f ("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: 07fa619f ("x86/kexec: Restore GDT on return from ::preserve_context kexec")
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Acked-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Acked-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Closes: https://lore.kernel.org/oe-kbuild-all/202411270006.ZyyzpYf8-lkp@intel.com/


Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 32913f34
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment