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: <alpine.DEB.2.20.1711202154540.2348@nanos>
Date:   Mon, 20 Nov 2017 21:55:21 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Andy Lutomirski <luto@...nel.org>
cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        moritz.lipp@...k.tugraz.at,
        Daniel Gruss <daniel.gruss@...k.tugraz.at>,
        michael.schwarz@...k.tugraz.at, richard.fellner@...dent.tugraz.at,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Kees Cook <keescook@...gle.com>,
        Hugh Dickins <hughd@...gle.com>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH 12/30] x86, kaiser: map GDT into user page tables

On Mon, 20 Nov 2017, Andy Lutomirski wrote:
> On Mon, Nov 20, 2017 at 12:22 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > On Fri, 10 Nov 2017, Dave Hansen wrote:
> >>       __set_fixmap(get_cpu_gdt_ro_index(cpu), get_cpu_gdt_paddr(cpu), prot);
> >> +
> >> +     /* CPU 0's mapping is done in kaiser_init() */
> >> +     if (cpu) {
> >> +             int ret;
> >> +
> >> +             ret = kaiser_add_mapping((unsigned long) get_cpu_gdt_ro(cpu),
> >> +                                      PAGE_SIZE, __PAGE_KERNEL_RO);
> >> +             /*
> >> +              * We do not have a good way to fail CPU bringup.
> >> +              * Just WARN about it and hope we boot far enough
> >> +              * to get a good log out.
> >> +              */
> >
> > The GDT fixmap can be set up before the CPU is started. There is no reason
> > to do that in cpu_init().
> >
> >> +
> >> +     /*
> >> +      * We could theoretically do this in setup_fixmap_gdt().
> >> +      * But, we would need to rewrite the above page table
> >> +      * allocation code to use the bootmem allocator.  The
> >> +      * buddy allocator is not available at the time that we
> >> +      * call setup_fixmap_gdt() for CPU 0.
> >> +      */
> >> +     kaiser_add_user_map_early(get_cpu_gdt_ro(0), PAGE_SIZE,
> >> +                               __PAGE_KERNEL_RO | _PAGE_GLOBAL);
> >
> > This one is needs to stay.
> 
> When you rebase on to my latest version, this should change to mapping
> the entire cpu_entry_area.

Too much flux left and right :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ