[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7tq4tti5pv7fjboiapuglkcsodl4nsk53rj36skg4xb2bkysei@ncoz2ztiddm7>
Date: Fri, 14 Mar 2025 10:52:53 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: kexec@...ts.infradead.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, "H . Peter Anvin" <hpa@...or.com>,
"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>,
Dave Young <dyoung@...hat.com>, Peter Zijlstra <peterz@...radead.org>, bsz@...zon.de
Subject: Re: [PATCH v7 8/8] [DO NOT MERGE] x86/kexec: Add CFI type
information to relocate_kernel()
On Fri, Mar 14, 2025 at 05:23:15PM +0000, David Woodhouse wrote:
> ISTR this version is OK with Clang and CONFIG_CFI_CLANG but with GCC I
> get this:
>
> vmlinux.o: warning: objtool: relocate_kernel+0x69: unsupported stack register modification
>
> /* setup a new stack at the end of the physical control page */
> lea PAGE_SIZE(%rsi), %rsp
> 79: 48 8d a6 00 10 00 00 lea 0x1000(%rsi),%rsp
>
>
> Maybe the answer is to put the UNWIND_HINT_FUNC into #ifdef
> CONFIG_CFI_CLANG but that seems wrong.
The UNWIND_HINT_FUNC definitely looks wrong, why would Clang need it?
> I'll have another look at putting it in the data section, and see if I
> can remember why I didn't want to do that before (and if that's still
> relevant now).
IIRC, the reasons were the patched alternative, and also you wanted to
disassemble (but note that's still possible with gdb).
Here was a patch to make it work:
https://lore.kernel.org/20241218212326.44qff3i5n6cxuu5d@jpoimboe
--
Josh
Powered by blists - more mailing lists