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: <CAGXu5jJLnsQm20A87-1+vH4kXwE1APjNqv=6qx32gCYk7SaW_g@mail.gmail.com>
Date:   Mon, 11 Mar 2019 12:14:35 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [GIT pull] x86/asm for 5.1

On Mon, Mar 11, 2019 at 10:41 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> Yes, that would fix things too, although I suspect you'll find that it
> gets hairy for hotplug CPU's (including suspend/resume), because new
> CPU's keep booting "forever".

In my testing, hotplug wasn't a problem because we'd already finished
cpu feature detection (which is why the SMEP/SMAP/UMIP bits couldn't
just be hard-coded). I had chosen to wait until after feature
detection was finished, etc.

> So what might be workable is to make 'cr4_init_shadow()' itself just
> do something like
>
>         this_cpu_write(cpu_tlbstate.cr4, __read_cr4() | cr4_pin);
>
> but I did *not* check whether there might be some other random
> accesses to %cr4 in various legacy paths..

The protection needs to be around the actual "mov %rdi, %cr4" that
native_write_cr4() exposes, so the "or" can't really be placed
earlier. Anyway, I'll examine some options. Thomas also suggested
looking at static keys, etc. I'll play around with it.

--
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ