[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <BA8CD56D-CB26-415B-9ABA-6E6552900916@amacapital.net>
Date: Tue, 23 Jan 2018 19:25:23 -0800
From: Andy Lutomirski <luto@...capital.net>
To: "Van De Ven, Arjan" <arjan.van.de.ven@...el.com>
Cc: Andy Lutomirski <luto@...nel.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
"Woodhouse, David" <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Tom Lendacky <thomas.lendacky@....com>,
KarimAllah Ahmed <karahmed@...zon.de>,
LKML <linux-kernel@...r.kernel.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"Mallick, Asit K" <asit.k.mallick@...el.com>,
Borislav Petkov <bp@...e.de>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"H . Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Janakarajan Natarajan <Janakarajan.Natarajan@....com>,
Joerg Roedel <joro@...tes.org>,
"Nakajima, Jun" <jun.nakajima@...el.com>,
Laura Abbott <labbott@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Radim Krcmár <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
kvm list <kvm@...r.kernel.org>, X86 ML <x86@...nel.org>
Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation
> On Jan 23, 2018, at 5:59 PM, Van De Ven, Arjan <arjan.van.de.ven@...el.com> wrote:
>
>
>>> It is a reasonable approach. Let a process who needs max security
>>> opt in with disabled dumpable. It can have a flush with IBPB clear before
>>> starting to run, and have STIBP set while running.
>>>
>>
>> Do we maybe want a separate opt in? I can easily imagine things like
>> web browsers that *don't* want to be non-dumpable but do want this
>> opt-in.
>
> eventually we need something better. Probably in addition.
> dumpable is used today for things that want this.
>
>>
>> Also, what's the performance hit of STIBP?
>
> pretty steep, but it depends on the CPU generation, for some it's cheaper than others. (yes I realize this is a vague answer, but the range is really from just about zero to oh my god)
>
> I'm not a fan of doing this right now to be honest. We really need to not piece meal some of this, and come up with a better concept of protection on a higher level.
> For example, you mention web browsers, but the threat model for browsers is generally internet content. For V2 to work you need to get some "evil pointer" into the app from the observer and browsers usually aren't doing that.
> The most likely user would be some software-TPM-like service that has magic keys.
>
> And for keys we want something else... we want an madvice() sort of thing that does a few things, like equivalent of mlock (so the key does not end up in swap),
I'd love to see a slight variant: encrypt that page against some ephemeral key if it gets swapped.
> not having the page (but potentially the rest) end up in core dumps, and the kernel making sure that if the program exits (say for segv) that the key page gets zeroed before going into the free pool. Once you do that as feature, making the key speculation safe is not too hard (intel and arm have cpu options to mark pages for that)
>
>
How do we do that on Intel? Make it UC?
Powered by blists - more mailing lists