[lkml]   [2017]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 24/30] x86, kaiser: disable native VSYSCALL
On 11/09/2017 05:04 PM, Andy Lutomirski wrote:
> On Thu, Nov 9, 2017 at 4:57 PM, Dave Hansen <> wrote:
>> On 11/09/2017 04:53 PM, Andy Lutomirski wrote:
>>>> The KAISER code attempts to "poison" the user portion of the kernel page
>>>> tables. It detects the entries pages that it wants that it wants to
>>>> poison in two ways:
>>>> * Looking for addresses >= PAGE_OFFSET
>>>> * Looking for entries without _PAGE_USER set
>>> What do you mean "poison"?
>> I meant the _PAGE_NX magic that we do in here:
>> to ensure that userspace is unable to run on the kernel PGD.
> Aha, I get it. Why not just drop the _PAGE_USER check? You could
> instead warn if you see a _PAGE_USER page that doesn't have the
> correct address for the vsyscall.

The _PAGE_USER check helps us with kernel things that want to create
mappings below PAGE_OFFSET. The EFI code was the prime user for this.
Without this, we poison the EFI mappings and the EFI calls die.

I think there might have also been a case for the secondary CPU bringup
that needed hacking if we didn't do this.

 \ /
  Last update: 2017-11-10 02:23    [W:0.110 / U:2.320 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site