mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	tip-bot2 for Josh Poimboeuf <tip-bot2@linutronix.de>,
	linux-tip-commits@vger.kernel.org,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Brian Gerst <brgerst@gmail.com>,
	x86@kernel.org
Subject: Re: [tip: x86/asm] x86/asm: Make ASM_CALL_CONSTRAINT conditional on frame pointers
Date: Fri, 7 Mar 2025 17:38:14 -0800	[thread overview]
Message-ID: <20250308013814.sa745d25m3ddlu2b@jpoimboe> (raw)
In-Reply-To: <A669251B-7414-4EE7-B0AD-735E845C0B5B@zytor.com>

On Fri, Mar 07, 2025 at 03:29:00PM -0800, H. Peter Anvin wrote:
> On March 7, 2025 3:21:57 PM PST, Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> >On Sat, Mar 08, 2025 at 12:05:29AM +0100, Ingo Molnar wrote:
> >> 
> >> * H. Peter Anvin <hpa@zytor.com> wrote:
> >> 
> >> > > #endif /* __ASSEMBLY__ */
> >> > 
> >> > So we are going to be using this version despite the gcc maintainers 
> >> > telling us it is not supported?
> >> 
> >> No, neither patches are in the x86 tree at the moment.
> >
> >FWIW, the existing ASM_CALL_CONSTRAINT is also not supported, so this
> >patch wouldn't have changed anything in that respect.
> >
> >Regardless I plan to post a new patch set soon with a bunch of cleanups.
> >
> >It will keep the existing ASM_CALL_CONSTRAINT in place for GCC, and will
> >use the new __builtin_frame_address(0) input constraint for Clang only.
> >
> >There will be a new asm_call() interface to hide the mess.
> >
> 
> Alternatively, you can co-opt the gcc BR I already filed on this and
> argue there that there are new reasons to support the alternate
> construct.

We hopefully won't need those hacks much longer anyway, as I'll have
another series to propose removing frame pointers for x86-64.

x86-32 can keep frame pointers, but doesn't need the constraints.  It's
not supported for livepatch so it doesn't need to be 100% reliable.
Worst case, an unwind skips a frame, but the call address still shows up
on stack trace dumps prepended with '?'.

I plan to do the asm_call() series before the FP removal series because
it's presumably less disruptive, and it has a bunch more orthogonal
cleanups.

-- 
Josh

  reply	other threads:[~2025-03-08  1:38 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 10:36 tip-bot2 for Josh Poimboeuf
2025-03-07 22:04 ` H. Peter Anvin
2025-03-07 23:05   ` Ingo Molnar
2025-03-07 23:21     ` Josh Poimboeuf
2025-03-07 23:29       ` H. Peter Anvin
2025-03-08  1:38         ` Josh Poimboeuf [this message]
2025-03-08  8:15           ` David Laight
2025-03-08 17:06             ` Josh Poimboeuf
2025-03-10 14:49           ` H. Peter Anvin
2025-03-13 23:33             ` Josh Poimboeuf
  -- strict thread matches above, loose matches on Subject: below --
2025-03-03 11:02 tip-bot2 for Josh Poimboeuf
2025-03-03 18:28 ` Linus Torvalds
2025-03-03 22:37   ` Josh Poimboeuf
2025-03-04  8:33   ` Ingo Molnar
2025-03-04 17:51     ` Linus Torvalds
2025-03-04 18:01       ` Linus Torvalds
2025-03-04 18:21         ` Josh Poimboeuf
2025-03-04 18:48           ` Linus Torvalds
2025-03-04 18:57             ` Linus Torvalds
2025-03-04 19:56               ` Josh Poimboeuf
2025-03-04 20:09                 ` Josh Poimboeuf
2025-03-04 20:13                 ` Linus Torvalds
2025-03-04 20:25                   ` Linus Torvalds
2025-03-04 20:41                   ` Linus Torvalds
2025-03-04 22:45                     ` Josh Poimboeuf
2025-03-04 19:47             ` Josh Poimboeuf
2025-03-04 20:00               ` Josh Poimboeuf
2025-03-04 19:15           ` Ingo Molnar
2025-03-03 22:31 ` H. Peter Anvin
2025-03-03 22:45   ` Josh Poimboeuf
2025-03-03 22:47     ` Josh Poimboeuf
2025-03-04  0:35       ` H. Peter Anvin
2025-03-04  0:57         ` Andrew Cooper
2025-03-04  2:05           ` H. Peter Anvin
2025-03-04 17:45             ` Josh Poimboeuf
2025-03-04 15:35         ` Uros Bizjak
2025-03-04 22:08           ` H. Peter Anvin
2025-03-03 23:59     ` H. Peter Anvin
2025-03-04 15:28       ` Uros Bizjak

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=20250308013814.sa745d25m3ddlu2b@jpoimboe \
    --to=jpoimboe@kernel.org \
    --cc=brgerst@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tip-bot2@linutronix.de \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®