[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f3834e5b-ae79-79b0-f280-fbb3871e0030@maciej.szmigiero.name>
Date: Fri, 9 Mar 2018 16:33:51 +0100
From: "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
To: Andi Kleen <ak@...ux.intel.com>
Cc: "Woodhouse, David" <dwmw@...zon.co.uk>,
Paul Turner <pjt@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>, tglx@...utronix.de,
Kees Cook <keescook@...gle.com>,
Rik van Riel <riel@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...capital.net>,
Jiri Kosina <jikos@...nel.org>, gnomes@...rguk.ukuu.org.uk,
x86@...nel.org, thomas.lendacky@....com,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: x86/retpoline: Fill RSB on context switch for affected CPUs
On 09.03.2018 16:14, Andi Kleen wrote:
>> Shouldn't the RSB filling on context switch also be done on non-IBPB
>> CPUs to protect (retpolined) user space tasks from other user space
>> tasks?
>
> The comment is actually incorrect. There's no risk to hit user space
> addresses if we have KPTI and NX (which is fairly universal).
>
> It's mainly needed on Skylake era CPUs.
>
> Should fix the comment. I'll send a patch.
But what about userspace-to-userspace attacks? - the ones that IBPB on
context switches currently protects against (at least for high-value, or
as implemented currently, non-dumpable, processes)?
If understand the issue correctly, high-value user space processes can
be protected from other user space processes even on CPUs that lack
IBPB as long as they are recompiled with retpolines and there is no
danger of RSB entries from one process being used by another one after
a context switch.
For Skyklake this would not be enough, but there we'll (hopefully) have
the IBPB instead.
> -Andi
>
Maciej
Powered by blists - more mailing lists