Historical speck list archives
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: ARCH_CAPABILITIES note
Date: Wed, 6 Jun 2018 08:20:54 -0700	[thread overview]
Message-ID: <5f898d80-b66a-7933-d348-c733a2b888e8@linux.intel.com> (raw)
In-Reply-To: <51a5e275-67c2-5638-21e9-a3992ba1de0b@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On 06/05/2018 11:48 AM, speck for Jon Masters wrote:
> On 06/05/2018 02:27 PM, speck for Dave Hansen wrote:
>> The retpoline LFENCE is only speculative and not ever retired
> 
> It's serializing though. The problem is not so much the use of the
> lfence (provided the SDM doesn't change) but that it only applies right
> up /until/ syscall dispatch, but not once the syscall handler has been
> dispatched. The handler might do something dangerous. I audited a few,
> but there's a lot more work that needs to be done there I think.

Just trying to be precise: Are you saying that LFENCE is an
architecturally "serializing instruction", or that it shares some
properties will fully "serializing instructions"?

Also, do we agree that the speculative retpoline LFENCE has different
behavior than a retired LFENCE?

From my perspective, the speculative LFENCE only has an impact on the
loads in that _particular_ speculative execution path.  It has no
defined impact on the retired execution path, or *other* speculation
paths that can occur.

The processor could easily speculate into an LFENCE, decide it does not
want to go down that speculative path, and restart speculating elsewhere
as if it had never seen the LFENCE.

BTW, I this is related to, but separate from the question of the
mitigation value of the existing retpoline LFENCE for mitigating things
other than Spectre v2.


  parent reply	other threads:[~2018-06-06 15:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 16:41 [MODERATED] ARCH_CAPABILITIES note Jon Masters
2018-06-05 18:27 ` [MODERATED] " Dave Hansen
2018-06-05 18:33   ` Linus Torvalds
2018-06-05 18:48   ` Jon Masters
2018-06-05 19:19     ` Thomas Gleixner
2018-06-05 19:27       ` [MODERATED] " Jon Masters
2018-06-05 19:36       ` Linus Torvalds
2018-06-06 15:20     ` Dave Hansen [this message]
2018-06-06 15:50       ` Linus Torvalds
2018-06-06 17:46         ` Jon Masters
2018-06-06 16:04       ` Linus Torvalds
2018-06-06 17:04         ` Dave Hansen
2018-06-05 18:45 ` David Woodhouse

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=5f898d80-b66a-7933-d348-c733a2b888e8@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=speck@linutronix.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).