[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwfSKNAYEFWCwCe2vSxejA3X85FnX9t1EdnCRUwC1ou1Q@mail.gmail.com>
Date: Wed, 10 Jan 2018 11:50:46 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: Willy Tarreau <w@....eu>, Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Brian Gerst <brgerst@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kees Cook <keescook@...omium.org>
Subject: Re: [RFC PATCH v2 6/6] x86/entry/pti: don't switch PGD on when
pti_disable is set
On Wed, Jan 10, 2018 at 11:21 AM, Andy Lutomirski <luto@...nel.org> wrote:
>
> I really dislike state that isn't cleared on execve(). I'm assuming
> that this is so you can run time pwn_me_without_pti whatever? Surely
> LD_PRELOAD can do this, too?
Andy, what the hell is wrong with you?
You are actively trying to screw this whole interface up, aren't you?
LD_PRELOAD cannot work for a wrapper, for the simple reason that it
runs in the same context as the process. So if you want to say "I want
to run this process without PTI", but you don't want to run the
process with elevated privileges, LD_PRELOAD doesn't work.
It's like saying "why do we need 'sudo' - let's juat make a LD_PRELOAD
that sets uid to zero instead".
The "let's do it per thread" made no sense either, since that's
fundamentally not how page tables work, and it's complete broken shit.
And the whole "NOW" vs "NEXT" is complete garbage. The obvious sane
no-PTI interface is that it
(a) inherits on fork/exec, so that you don't have to worry about how
something is implemented (think "I want to run this kernel build
without the PTI overhead", but also "I want to run this system daemon
without PTI").
(b) actual domain changes clear it (ie suid, whatever).
that make it useful for random uses of "I trust service XYZ".
So I'm NAK'ing this whole series on the grounds that it has several
completely insane semantics and really need to be clarified, and where
actual usage needs to be thought about a lot more.
Linus
Powered by blists - more mailing lists