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]
Message-ID: <CA+55aFw0OF0JSio47KVPrAz6CaJuX8kEvMk0DWVG2HZzRFr_+Q@mail.gmail.com>
Date:   Wed, 1 Nov 2017 15:28:48 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Dave Hansen <dave.hansen@...ux.intel.com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        "H. Peter Anvin" <hpa@...or.com>,
        borisBrian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Thomas Garnier <thgarnie@...gle.com>,
        Kees Cook <keescook@...gle.com>
Subject: Re: [PATCH 00/23] KAISER: unmap most of the kernel from userspace
 page tables

On Wed, Nov 1, 2017 at 3:14 PM, Dave Hansen <dave.hansen@...ux.intel.com> wrote:
>
> I ran some quick tests.  When CONFIG_KAISER=y, but "echo 0 >
> kaiser-enabled", the tests that I ran were within the noise vs. a
> vanilla kernel, and that's with *zero* optimization.

I guess the optimal version just ends up switching between two
different entrypoints for the on/off case.

And the not-quite-as-aggressive, but almost-optimal version would just
be a two-byte asm alternative with an unconditional branch to the
movcr3 code and back, and is turned into a noop when it's off.

But since 99%+ of the cost is going to be that cr3 write, even the
stupid "just load value and branch over the cr3 conditionally" is
going to make things hard to measure.

                Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ