lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@kernel.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

\
 
 \ /
  Last update: 2018-01-14 23:22    [W:0.165 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site