All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH 2/4] RFC-MDSv1 0
Date: Mon, 12 Nov 2018 17:35:45 -0800	[thread overview]
Message-ID: <20181113013545.GI6218@tassilo.jf.intel.com> (raw)
In-Reply-To: <f6952dce-192e-e7ba-0f41-0df1b55f8ef7@citrix.com>

On Tue, Nov 13, 2018 at 12:07:47AM +0000, speck for Andrew Cooper wrote:
> On 12/11/2018 03:41, speck for Andi Kleen wrote:
> > @@ -329,6 +331,12 @@ For 32-bit we have the following conventions - kernel is built with
> >  
> >  #endif
> >  
> > +.macro EXIT_MDS
> > +	/* Clear CPU buffers that could leak. Instruction must be in memory form. */
> > +	ALTERNATIVE "", __stringify(pushq $__USER_DS ; verw (%rsp) ; addq $8, %rsp),\
> > +		 X86_FEATURE_MB_CLEAR
> 
> The code sample from the slides is push $0.  Here, you are forcing an
> implicit access into the GDT by using a non-NUL selector, which is a
> compound performance hit.

Actually it should be the same as 0. I think the slides just use $0 because
they don't know which OS the sequence would be used on.

-Andi

  reply	other threads:[~2018-11-13  1:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  3:41 [MODERATED] [PATCH 0/4] RFC-MDSv1 1 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 1/4] RFC-MDSv1 4 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 2/4] RFC-MDSv1 0 Andi Kleen
2018-11-13  0:07   ` [MODERATED] " Andrew Cooper
2018-11-13  1:35     ` Andi Kleen [this message]
2018-11-13 21:59       ` Andrew Cooper
2018-11-14  4:04         ` Andi Kleen
2018-12-09 18:12           ` Andrew Cooper
2018-11-13 20:47   ` Jiri Kosina
2018-11-13 21:04     ` Luck, Tony
2018-11-14  2:32     ` Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 3/4] RFC-MDSv1 3 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 4/4] RFC-MDSv1 2 Andi Kleen
2018-11-12 22:36   ` [MODERATED] " Greg KH
2018-11-13  1:37     ` Andi Kleen

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=20181113013545.GI6218@tassilo.jf.intel.com \
    --to=ak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.