[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21a05bdd-bd9b-d522-1b23-61a1cdb56dbe@linux.intel.com>
Date: Thu, 11 Jan 2018 10:15:03 -0800
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Willy Tarreau <w@....eu>, Andy Lutomirski <luto@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
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>,
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 01/11/2018 10:05 AM, Willy Tarreau wrote:
>> That's exactly what it does for now, but Linus doesn't like it at all.
>> So I'll switch it back to per-mm + per-CPU variable. Well he has a valid
>> point regarding the pgd and _PAGE_NX setting. point Now at least we know
>> the change is minimal if we have a good reason for doing differently
>> later.
> Yuck, I hate this. Are you really going to wire it up complete with
> all the IPIs needed to get the thing synced up right?
Well, on the bright side, we don't need IPIs when _removing_ NX. We can
just handle those like a spurious fault.
But, when re-enabling it, we need all the TLB flushing for all the CPUs
that have run with the un-NX'd page tables. I guess that's the one
benefit if you come up with an API that only allows "disable PTI" while
a task is running but leaves execve()/fork() as places that implicitly
reenable PTI.
Powered by blists - more mailing lists