[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180112150608.GA16210@1wt.eu>
Date: Fri, 12 Jan 2018 16:06:08 +0100
From: Willy Tarreau <w@....eu>
To: David Laight <David.Laight@...LAB.COM>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Brian Gerst <brgerst@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Kees Cook <keescook@...omium.org>
Subject: Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and
ARCH_SET_NOPTI to enable/disable PTI
On Fri, Jan 12, 2018 at 03:03:23PM +0000, David Laight wrote:
> From: Willy Tarreau
> > Sent: 09 January 2018 12:56
> >
> > This allows to report the current state of the PTI protection and to
> > enable or disable it for the current process. The state change is only
> > allowed if the mm is not shared (no threads have been created yet).
> >
> > Setting the flag to disable the protection is subject to CAP_SYS_RAWIO.
> > However it is possible to re-enable the protection without this privilege.
>
> While a process with CAP_SYS_RAWIO can easily access kernel memory so
> get little extra protection from PTI, you probably want to be able
> to disable PTI without giving a process CAP_SYS_RAWIO.
> No point leaving the door wide open.
Sure but if it's only a wrapper you don't mind. Start with the capability,
disable PTI, drop the capability and that's done.
Willy
Powered by blists - more mailing lists