From: Josh Poimboeuf <jpoimboe@redhat.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Andy Lutomirski <luto@kernel.org>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
David Kaplan <David.Kaplan@amd.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
David Woodhouse <dwmw2@infradead.org>,
Kees Cook <keescook@chromium.org>, Jann Horn <jannh@google.com>
Subject: Re: Do we need to do anything about "dead µops?"
Date: Tue, 4 May 2021 08:24:49 -0500 [thread overview]
Message-ID: <20210504132449.wmvxtubhuzuqc3xr@treble> (raw)
In-Reply-To: <5937e5a2f1014e2da4a07e249745ceb1@AcuMS.aculab.com>
On Tue, May 04, 2021 at 01:06:06PM +0000, David Laight wrote:
> From: Josh Poimboeuf
> > Sent: 04 May 2021 04:16
> ...
> > I was actually thinking more along the lines of
> >
> > val = 0;
> >
> > if (user_supplied_idx < ARRAY_SIZE) // trained to speculatively be 'true'
> > val = boring_non_secret_array[user_supplied_idx];
> >
> > if (val & 1)
> > do_something();
> >
> > In other words, the victim code wouldn't be accessing the secret
> > intentionally. So there's no reason for it to avoid doing
> > data-dependent branches.
>
> Isn't that one of the very boring standard spectre cases?
Classic v1 as described in the Spectre paper was a data-dependent
load/store, not a data-dependent branch.
--
Josh
prev parent reply other threads:[~2021-05-04 13:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-01 16:26 Do we need to do anything about "dead µops?" Andy Lutomirski
2021-05-01 17:35 ` Andrew Cooper
2021-05-03 23:30 ` Josh Poimboeuf
2021-05-04 1:31 ` Andy Lutomirski
2021-05-04 3:16 ` Josh Poimboeuf
2021-05-04 13:06 ` David Laight
2021-05-04 13:24 ` 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=20210504132449.wmvxtubhuzuqc3xr@treble \
--to=jpoimboe@redhat.com \
--cc=David.Kaplan@amd.com \
--cc=David.Laight@ACULAB.COM \
--cc=andrew.cooper3@citrix.com \
--cc=dwmw2@infradead.org \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@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;
as well as URLs for NNTP newsgroup(s).