From: Thomas Gleixner <tglx@linutronix.de>
To: Josh Poimboeuf <jpoimboe@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org
Subject: Re: [RFC][PATCH 3/3] x86/entry, ORC: Teach objtool/unwind_orc about stack irq swizzles
Date: Thu, 07 May 2020 23:24:49 +0200 [thread overview]
Message-ID: <878si3e8v2.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20200507183048.rlf2bgj4cf2g4jy6@treble>
Josh Poimboeuf <jpoimboe@redhat.com> writes:
> On Thu, May 07, 2020 at 07:38:09PM +0200, Peter Zijlstra wrote:
>> On Thu, May 07, 2020 at 06:10:23PM +0200, Peter Zijlstra wrote:
>> Much simpler, also works.
>
> Doing the stack switch in inline asm is just nasty.
Matter of personal preference :)
> Also, a frame pointer makes this SO much easier for ORC/objtool, no
> funky hints needed. In fact maybe we can get rid of the indirect hint
> things altogether, which means even more deleted code.
>
> This is much cleaner, and it boots:
Well, yes. I thought about that and it clearly works fine. There is a
downside because it adds the indirect call to all system vectors.
The device interrupt part is fine, it has an indirect call already, but
for system vectors and in particular the rescheduling IPI its bad. Not
bad because of the indirect call per se, but bad because of the
ratpoutine mitigation mess.
My other alternative was to emit switcheroo into ASM for each system
vector. Not pretty either
But over our IRC conversation I came up with a 3rd variant:
For most of the vectors the indirect call overhead is just noise, so
we can run them through the ASM switcher, but for the resched IPI
we can just use a separate direct call stub in ASM.
I can live with that. I might have to pay up for Peter's headaches to
teach objtool, but that's a different story. Let me check how many beers
he owes me first ...
Thanks,
tglx
next prev parent reply other threads:[~2020-05-07 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 16:10 [RFC][PATCH 0/3] objtool vs irqstack swizzles Peter Zijlstra
2020-05-07 16:10 ` [RFC][PATCH 1/3] x86/entry: Collapse the 3 IRQ stack instances into a single macro Peter Zijlstra
2020-05-07 16:10 ` [RFC][PATCH 2/3] x86/entry: Provide ASM_INSTR_{BEGIN,END} Peter Zijlstra
2020-05-07 16:10 ` [RFC][PATCH 3/3] x86/entry, ORC: Teach objtool/unwind_orc about stack irq swizzles Peter Zijlstra
2020-05-07 17:38 ` Peter Zijlstra
2020-05-07 18:30 ` Josh Poimboeuf
2020-05-07 21:24 ` Thomas Gleixner [this message]
2020-05-08 10:12 ` Peter Zijlstra
2020-05-08 12:26 ` Thomas Gleixner
2020-05-08 12:40 ` Peter Zijlstra
2020-05-08 12:44 ` Thomas Gleixner
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=878si3e8v2.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.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®