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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 Oct 2017 16:27:36 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, Kees Cook <keescook@...gle.com>,
        Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH 00/23] KAISER: unmap most of the kernel from userspace
 page tables

Inconveniently, the people you cc'd on the actual patches did *not*
get cc'd with this 00/23 cover letter email.

Also, the documentation was then hidden in patch 07/23, which wasn't
exactly obvious.

So I'd like this to be presented a bit differently.

That said, a couple of comments/questions on this version of the patch series..

 (a) is this on top of Andy's entry cleanups?

     If not, that probably needs to be sorted out.

 (b) the TLB global bit really is nastily done. You basically disable
_PAGE_GLOBAL entirely.

     I can see how/why that would make things simpler, but it's almost
certainly the wrong approach. The small subset of kernel pages that
are always mapped should definitely retain the global bit, so that you
don't always take a TLB miss on those! Those are probably some of the
most latency-critical pages, since there's generally no prefetching
for the kernel entry code or for things like IDT/GDT accesses..

     So even if you don't want to have global pages for normal kernel
entries, you don't want to just make _PAGE_GLOBAL be defined as zero.
You'd want to just use _PAGE_GLOBAL conditionally.

     Hmm?

 (c) am I reading the code correctly, and the shadow page tables are
*completely* duplicated?

     That seems insane. Why isn't only tyhe top level shadowed, and
then lower levels are shared between the shadowed and the "kernel"
page tables?

     But I may be mis-reading the code completely.

Apart from those three questions, I don't see any huge downside to the
patch series, apart from the obvious performance/complexity issues.

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ