[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241112101423.GO22801@noisy.programming.kicks-ass.net>
Date: Tue, 12 Nov 2024 11:14:23 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: "H. Peter Anvin" <hpa@...or.com>, kexec@...ts.infradead.org,
jpoimboe <jpoimboe@...nel.org>,
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 Tue, Nov 12, 2024 at 08:44:33AM +0000, David Woodhouse wrote:
> 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); \
Why are we having data in the middle of the text section?
> > > __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.
Objtool only decodes stuff that has SHF_EXECINSTR set. Why would your
data sections have that on?
Powered by blists - more mailing lists