From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, X86 ML <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Brian Gerst <brgerst@gmail.com>,
David Laight <David.Laight@aculab.com>,
Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] LDT improvements
Date: Thu, 7 Dec 2017 18:23:39 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1712071814200.1835@nanos> (raw)
In-Reply-To: <CALCETrVrQRUn6PoBBGSD8+-wRrWp3mQtKY1sYnCRFyDBte5usA@mail.gmail.com>
On Thu, 7 Dec 2017, Andy Lutomirski wrote:
> On Thu, Dec 7, 2017 at 4:43 AM, Borislav Petkov <bp@alien8.de> wrote:
> > On Wed, Dec 06, 2017 at 11:22:21PM -0800, Andy Lutomirski wrote:
> >> I think I like this approach. I also think it might be nice to move the
> >> whole cpu_entry_area into this new pgd range so that we can stop mucking
> >> around with the fixmap.
> >
> > Yeah, and also, I don't like the idea of sacrificing a whole PGD
> > only for the LDT crap which is optional, even. Frankly - and this
> > is just me - I'd make CONFIG_KERNEL_PAGE_TABLE_ISOLATION xor
> > CONFIG_MODIFY_LDT_SYSCALL and don't give a rat's *ss about the LDT.
>
> The PGD sacrifice doesn't bother me. Putting a writable LDT map at a
> constant address does bother me. We could probably get away with RO
> if we trapped and handled the nasty faults, but that could be very
> problematic.
Where is the problem? You can map it RO into user space with the USER bit
cleared. The kernel knows how to access the real stuff.
> The version here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/pti&id=a74d1009ac72a1f04ec5bcd338a4bdbe170ab776
>
> actually seems to work.
The approach I've taken is to create a VMA and map it into user space with
the USER bit cleared. A little bit more effort code wise, but that avoids
all the page table muck and keeps it straight attached to the process.
Will post once in a bit.
Thanks,
tglx
next prev parent reply other threads:[~2017-12-07 17:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 7:22 Andy Lutomirski
2017-12-07 12:43 ` Borislav Petkov
2017-12-07 17:08 ` Andy Lutomirski
2017-12-07 17:23 ` Thomas Gleixner [this message]
2017-12-07 18:21 ` Andy Lutomirski
2017-12-08 7:34 ` Ingo Molnar
2017-12-08 9:34 ` Thomas Gleixner
2017-12-08 9:44 ` Ingo Molnar
2017-12-08 9:55 ` Thomas Gleixner
2017-12-08 11:31 ` Ingo Molnar
2017-12-08 16:38 ` Andy Lutomirski
2017-12-08 17:37 ` Thomas Gleixner
2017-12-08 17:42 ` Andy Lutomirski
2017-12-08 17:48 ` Peter Zijlstra
2017-12-08 13:20 ` Andy Lutomirski
2017-12-08 13:55 ` David Laight
2017-12-08 14:06 ` Peter Zijlstra
2017-12-08 16:20 ` Peter Zijlstra
2017-12-08 16:33 ` Andy Lutomirski
2017-12-08 16:46 ` David Laight
2017-12-08 16:47 ` Andy Lutomirski
2017-12-08 17:29 ` David Laight
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=alpine.DEB.2.20.1712071814200.1835@nanos \
--to=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®