From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] objtool: Support Clang RAX DRAP sequence
Date: Tue, 17 Mar 2026 21:35:02 +0100 [thread overview]
Message-ID: <20260317203502.GI2872@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <k5ako25grzbffppbtyzf6lio5hzl3trqaqj37ohsgup6iwdeae@2dkmrobkkhrd>
On Tue, Mar 17, 2026 at 08:30:59AM -0700, Josh Poimboeuf wrote:
> On Tue, Mar 17, 2026 at 09:18:25AM +0100, Peter Zijlstra wrote:
> > On Mon, Mar 16, 2026 at 05:47:56PM -0700, Josh Poimboeuf wrote:
> > > Recent Clang can use RAX as a temporary register for the DRAP stack
> > > alignment sequence. Add support for that.
> > >
> > > Fixes the following warning:
> > >
> > > vmlinux.o: error: objtool: vmw_host_printf+0xd: unknown CFA base reg 0
> > >
> > > Reported-by: Arnd Bergmann <arnd@arndb.de>
> > > Closes: https://lore.kernel.org/cefefdd1-7b82-406d-8ff4-e4b167e45ee6@app.fastmail.com
> > > Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> > > ---
> > > arch/x86/include/asm/orc_types.h | 1 +
> > > arch/x86/kernel/unwind_orc.c | 8 ++++++++
> > > tools/arch/x86/include/asm/orc_types.h | 1 +
> > > tools/objtool/arch/x86/decode.c | 3 +++
> > > tools/objtool/arch/x86/orc.c | 5 +++++
> > > 5 files changed, 18 insertions(+)
> > >
> > > diff --git a/arch/x86/include/asm/orc_types.h b/arch/x86/include/asm/orc_types.h
> > > index e0125afa53fb..b3cc7970fa54 100644
> > > --- a/arch/x86/include/asm/orc_types.h
> > > +++ b/arch/x86/include/asm/orc_types.h
> > > @@ -37,6 +37,7 @@
> > > #define ORC_REG_R13 7
> > > #define ORC_REG_BP_INDIRECT 8
> > > #define ORC_REG_SP_INDIRECT 9
> > > +#define ORC_REG_AX 10
> > > #define ORC_REG_MAX 15
> >
> > I'm 'annoyed' at the placement of that register. I know its not
> > important, but I can't silence my OCD saying that AX should come before
> > DX.
> >
> > Also, SP comes before BP and both before DI.
> >
> > Something like so perhaps?
>
> That bothered me too, but I was trying to keep the diffstat down. But
> sure, why not...
>
> What about the switch statements? Should we reorder them too while at
> it? If so, starting to feel like a separate patch.
Agreed, switch statement order should match the definition order. And
yes separate patch is fine.
next prev parent reply other threads:[~2026-03-17 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 0:47 [PATCH] objtool: Support Clang RAX DRAP sequence Josh Poimboeuf
2026-03-17 8:18 ` Peter Zijlstra
2026-03-17 15:30 ` Josh Poimboeuf
2026-03-17 20:35 ` Peter Zijlstra [this message]
2026-03-17 22:44 ` Josh Poimboeuf
2026-03-18 8:28 ` Peter Zijlstra
2026-03-18 8:41 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317203502.GI2872@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arnd@arndb.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox