[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e8f11982ad0754d8123c143a514969fa2a07c05.camel@infradead.org>
Date: Tue, 12 Nov 2024 08:44:33 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: "H. Peter Anvin" <hpa@...or.com>, kexec@...ts.infradead.org, Peter
Zijlstra <peterz@...radead.org>, jpoimboe <jpoimboe@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Kai Huang <kai.huang@...el.com>, Nikolay Borisov <nik.borisov@...e.com>,
linux-kernel@...r.kernel.org, Simon Horman <horms@...nel.org>
Subject: Re: [RFC PATCH 2/2] x86/kexec: Add data section to relocate_kernel
On Fri, 2024-11-08 at 12:26 +0100, H. Peter Anvin wrote:
>
> > --- a/arch/x86/kernel/vmlinux.lds.S
> > +++ b/arch/x86/kernel/vmlinux.lds.S
> > @@ -100,7 +100,7 @@ const_pcpu_hot = pcpu_hot;
> > . = ALIGN(PAGE_SIZE); \
> > __relocate_kernel_start = .; \
> > *(.text.relocate_kernel); \
> > - *(.rodata.relocate_kernel); \
> > + *(.data.relocate_kernel); \
> > __relocate_kernel_end = .;
> > #else
> > #define KEXEC_RELOCATE_KERNEL_TEXT
>
> Looks good at first glance. I'm currently traveling so I haven't
> fully reviewed it though.
Turns out it doesn't help much. It's neater, obviously, but objtool
still wants to disassemble the .data.relocate_kernel section after it
gets included in the overall kernel text section.
So once I rebase the debugging support on top and add the GDT¹ into the
data section, it gets very unhappy:
arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this.
arch/x86/tools/insn_decoder_test: warning: ffffffff8219250a: eb fd 1f 00 00 00 00 00 00 00 ff ff 00 00 00 9a cf 00 ................ff ff 00 00 00 9a af 00 ff ff 00 00 00 92 cf 00 ................cc cc cc cc cc cc cc cc cc cc cc cc ............ jmp ffffffffarch/x86/tools/insn_decoder_test: warning: objdump says 23 bytes, but insn_get_length() says 2
arch/x86/tools/insn_decoder_test: error: malformed line 5236442:
82192509 <exc_handler+0x18e>
It's also still complaining that pr_nybble() and pr_qword() are
unreachable, although it doesn't say that of the exc_handler() function
which blatantly calls them. Although I can look at that harder if I do
factor it out to C code.
¹ https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/kexec-debug
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)
Powered by blists - more mailing lists