Re: [EXTERNAL] [PATCH] x86: Fix build regression with CONFIG_KEXEC_JUMP enabled
From: David Woodhouse
Date: Mon Dec 09 2024 - 11:01:25 EST
On Mon, 2024-12-09 at 11:29 +0100, Borislav Petkov wrote:
> On Mon, Dec 09, 2024 at 08:53:32AM +0900, Damien Le Moal wrote:
> > 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.
>
> Hmm, how do you trigger this? Care to share your .config?
>
> Because I can't trigger it with my gcc13 and CONFIG_KEXEC_JUMP=y
>
> It would be good to know how the 0day bot didn't catch it either...
Actually I think it did:
https://lore.kernel.org/oe-kbuild-all/202411270006.ZyyzpYf8-lkp@xxxxxxxxx/
The bot had previously complained about v2 of the series, and I thought
I'd fixed it by adding the #ifdef CONFIG_KEXEC_JUMP around it. I didn't
spot that the warning linked above was actually against v3.
(In fact, *lots* of the return path from kexec is just unreachable dead
code in the case that CONFIG_KEXEC_JUMP isn't set, but it seems we're
in the habit of #ifdeffing out only the parts that actually wouldn't
compile.)
Acked-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202411270006.ZyyzpYf8-lkp@xxxxxxxxx/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature