lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <622d362d-d3f2-bb27-6fb2-2334b38c1933@linux.intel.com>
Date:   Thu, 4 Jan 2018 16:21:46 -0800
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Kees Cook <keescook@...gle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        moritz.lipp@...k.tugraz.at,
        Daniel Gruss <daniel.gruss@...k.tugraz.at>,
        michael.schwarz@...k.tugraz.at, richard.fellner@...dent.tugraz.at,
        Andy Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH] x86/doc: add PTI description

On 01/04/2018 04:06 PM, Kees Cook wrote:
>> +  d. Process Context IDentifiers (PCID) is a CPU feature that
>> +     allows us to skip flushing the entire TLB when switching page
>> +     tables.  This makes switching the page tables (at context
>> +     switch, or kernel entry/exit) cheaper.  But, on systems with
>> +     PCID support, the context switch code must flush both the user
>> +     and kernel entries out of the TLB.  The user PCID TLB flush is
>> +     deferred until the exit to userspace, minimizing the cost.
> 
> Does this mean it's possible to bypass the NX on userspace pages?

I'll clarify this.  The write to CR3 happens, but bit 63 gets set to
tell the CPU not to flush the TLB on the CR3 write.

>> [...]
>> +  g. On systems without PCID support, each CR3 write flushes
>> +     the entire TLB.  That means that each syscall, interrupt
>> +     or exception flushes the TLB.
> 
> Is it worth clarifying this for hardware support of PCID vs INVPCID?

I'll make changes based on the rest of your comments.  Thanks for taking
a look!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ