From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool: Fix SLS checks
Date: Thu, 5 May 2022 14:03:30 -0700 [thread overview]
Message-ID: <20220505210330.flb36r4emty2js3y@treble> (raw)
In-Reply-To: <YnIqt4aOooAvlja4@hirez.programming.kicks-ass.net>
On Wed, May 04, 2022 at 09:26:47AM +0200, Peter Zijlstra wrote:
> > I don't quite follow this 2nd sentence and how it's related here, since
> > this function doesn't actually deal with direct jumps.
>
> Ah, my bad. Also, this wrong.
>
> I suppose this wants to be something like:
>
> if (i < insn->length && op == JMP32_INSN_OPCODE)
> bytes[i++] = INT3_INSN_OPCODE;
>
> So this *can* be a jump, but typically won't be I suppose.
Yep.
> > Speaking of, I guess we'll eventually need to hack this SLS mess into
> > jump labels :-/
>
> Urgh... can't we reason that the straight line case is actually expected
> to run with the given register state anyway and ignore this?
Yeah, that makes sense.
So for jump labels the SLS path would probably not be worse than a
typical v1-style conditional branch misspeculation into the 'else' path,
and we've already given up on worrying about those anyway.
--
Josh
prev parent reply other threads:[~2022-05-05 21:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 10:50 [PATCH] objtool: Fix SLS checks Peter Zijlstra
2022-05-02 18:15 ` Josh Poimboeuf
2022-05-02 20:01 ` Peter Zijlstra
2022-05-02 20:09 ` Josh Poimboeuf
2022-05-02 20:17 ` Peter Zijlstra
2022-05-03 21:15 ` Josh Poimboeuf
2022-05-04 7:26 ` Peter Zijlstra
2022-05-05 21:03 ` Josh Poimboeuf [this message]
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=20220505210330.flb36r4emty2js3y@treble \
--to=jpoimboe@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.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