From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: X86 ML <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Borislav Petkov <bp@alien8.de>, Brian Gerst <brgerst@gmail.com>,
David Laight <David.Laight@aculab.com>,
Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH PTI v2 3/6] x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy
Date: Mon, 11 Dec 2017 17:24:57 +0100 [thread overview]
Message-ID: <20171211162457.ppimodxxzdtoono7@gmail.com> (raw)
In-Reply-To: <CALCETrX+o1Vnq8=jL8bWAypw9k7MZy4+0vGauitf=rjP=tVy4g@mail.gmail.com>
* Andy Lutomirski <luto@kernel.org> wrote:
> On Mon, Dec 11, 2017 at 5:39 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Andy Lutomirski <luto@kernel.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@kernel.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
next prev parent reply other threads:[~2017-12-11 16:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 6:47 [PATCH PTI v2 0/6] Clean up pgd handling and fix VSYSCALL and LDT Andy Lutomirski
2017-12-11 6:47 ` [PATCH PTI v2 1/6] x86/pti: Vastly simplify pgd synchronization Andy Lutomirski
2017-12-11 6:47 ` [PATCH PTI v2 2/6] Revert "x86/mm/pti: Disable native VSYSCALL" Andy Lutomirski
2017-12-11 6:47 ` [PATCH PTI v2 3/6] x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy Andy Lutomirski
2017-12-11 13:39 ` Ingo Molnar
2017-12-11 16:01 ` Andy Lutomirski
2017-12-11 16:24 ` Ingo Molnar [this message]
2017-12-11 6:47 ` [PATCH PTI v2 4/6] x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode Andy Lutomirski
2017-12-11 6:47 ` [PATCH PTI v2 5/6] x86/pti: Map the vsyscall page if needed Andy Lutomirski
2017-12-11 6:47 ` [PATCH PTI v2 6/6] x86/pti: Put the LDT in its own PGD if PTI is on Andy Lutomirski
2017-12-11 17:49 ` Dave Hansen
2017-12-11 18:40 ` Andy Lutomirski
2017-12-11 19:32 ` Dave Hansen
2017-12-11 19:39 ` Andy Lutomirski
2017-12-11 19:47 ` Dave Hansen
2017-12-11 20:06 ` Andy Lutomirski
2017-12-11 6:54 ` [PATCH PTI v2 0/6] Clean up pgd handling and fix VSYSCALL and LDT Andy Lutomirski
2017-12-12 16:01 ` Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171211162457.ppimodxxzdtoono7@gmail.com \
--to=mingo@kernel.org \
--cc=David.Laight@aculab.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.