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:   Mon, 11 Dec 2017 17:24:57 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     X86 ML <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Borislav Petkov <bp@...en8.de>,
        Brian Gerst <brgerst@...il.com>,
        David Laight <David.Laight@...lab.com>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH PTI v2 3/6] x86/vsyscall/64: Explicitly set _PAGE_USER in
 the pagetable hierarchy


* Andy Lutomirski <luto@...nel.org> wrote:

> On Mon, Dec 11, 2017 at 5:39 AM, Ingo Molnar <mingo@...nel.org> wrote:
> >
> > * Andy Lutomirski <luto@...nel.org> wrote:
> >
> >> The kernel is very erratic as to which pagetables have _PAGE_USER
> >> set.  The vsyscall page gets lucky: it seems that all of the
> >> relevant pagetables are among the apparently arbitrary ones that set
> >> _PAGE_USER.  Rather than relying on chance, just explicitly set
> >> _PAGE_USER.
> >>
> >> This will let us clean up pagetable setup to stop setting
> >> _PAGE_USER.  The added code can also be reused by pagetable
> >> isolation to manage the _PAGE_USER bit in the usermode tables.
> >>
> >> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> >> ---
> >>  arch/x86/entry/vsyscall/vsyscall_64.c | 33 ++++++++++++++++++++++++++++++++-
> >>  1 file changed, 32 insertions(+), 1 deletion(-)
> >
> > Btw., would it make sense to clean up all this confusion?
> >
> > In particular a 'KERNEL' pre of post fix is ambiguous in this context I think, and
> > the PAGE_KERNEL_ prefix is actively harmful I think and is at the root of the
> > confusion.
> >
> > So if renamed it and used this nomenclature consistently instead:
> >
> >   PAGE_USER_
> >   PAGE_SYSTEM_
> 
> Like _PAGE_USER_VSYSCALL?
> 
> Anyway, that's not the confusion I'm talking about.  I'm talking about
> _KERNPG_TABLE vs _PAGE_TABLE.  The latter should be called
> _USERPG_TABLE, and a whole bunch of its users should be switched to
> _KERNPG_TABLE.

Yeah.

> But, since PTI is intended for backporting, I think these types of big
> cleanups should wait.

Absolutely.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ