mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	"Woodhouse, David" <dwmw@amazon.co.uk>,
	Andi Kleen <ak@linux.intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	"Schaufler, Casey" <casey.schaufler@intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH v4 1/2] x86/speculation: apply IBPB more strictly to avoid cross-process data leak
Date: Fri, 7 Sep 2018 08:39:08 -0500	[thread overview]
Message-ID: <20180907133908.dbcqz3mnaneluvtk@treble> (raw)
In-Reply-To: <alpine.LRH.2.00.1809061029030.3446@gjva.wvxbf.pm>

On Thu, Sep 06, 2018 at 10:32:38AM +0200, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
> 
> Currently, we are issuing IBPB only in cases when switching into a non-dumpable
> process, the rationale being to protect such 'important and security sensitive'
> processess (such as GPG) from data leak into a different userspace process via
> spectre v2.
> 
> This is however completely insufficient to provide proper userspace-to-userpace
> spectrev2 protection, as any process can poison branch buffers before being
> scheduled out, and the newly scheduled process immediately becomes spectrev2

"becomes a"

> victim.
> 
> In order to minimize the performance impact (for usecases that do require
> spectrev2 protection), issue the barrier only in cases when switching between
> processess where the victim can't be ptraced by the potential attacker (as in

"processes"

> such cases, the attacker doesn't have to bother with branch buffers at all).
> 
> Fixes: 18bf3c3ea8 ("x86/speculation: Use Indirect Branch Prediction Barrier in context switch")
> Originally-by: Tim Chen <tim.c.chen@linux.intel.com>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>

Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  reply	other threads:[~2018-09-07 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  8:17 [PATCH v4 0/2] Harden spectrev2 userspace-userspace protection Jiri Kosina
2018-09-06  8:32 ` [PATCH v4 1/2] x86/speculation: apply IBPB more strictly to avoid cross-process data leak Jiri Kosina
2018-09-07 13:39   ` Josh Poimboeuf [this message]
2018-09-06  8:33 ` [PATCH v4 2/2] x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation Jiri Kosina
2018-09-07 15:16   ` Josh Poimboeuf
2018-09-07 21:08   ` Thomas Gleixner
2018-09-07 21:27     ` Jiri Kosina
2018-09-08  6:45       ` Thomas Gleixner
2018-09-08  7:50         ` Jiri Kosina
2018-09-08  9:05         ` Thomas Gleixner
2018-09-06  8:18 [PATCH v4 1/2] x86/speculation: apply IBPB more strictly to avoid cross-process data leak Jiri Kosina

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=20180907133908.dbcqz3mnaneluvtk@treble \
    --to=jpoimboe@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=casey.schaufler@intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --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

Powered by JetHome