Re: [PATCH 00/23] KAISER: unmap most of the kernel from userspace page tables

From: Ingo Molnar
Date: Wed Nov 01 2017 - 04:54:38 EST



(Filled in the missing Cc: list)

* Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> wrote:

> tl;dr:
>
> KAISER makes it harder to defeat KASLR, but makes syscalls and
> interrupts slower. These patches are based on work from a team at
> Graz University of Technology posted here[1]. The major addition is
> support for Intel PCIDs which builds on top of Andy Lutomorski's PCID
> work merged for 4.14. PCIDs make KAISER's overhead very reasonable
> for a wide variety of use cases.

Ok, while I never thought I'd see the 4g:4g patch come to 64-bit kernels ;-),
this series is a lot better than earlier versions of this feature, and it
solves a number of KASLR timing attacks rather fundamentally.

Beyond the inevitable cavalcade of (solvable) problems that will pop up during
review, one major item I'd like to see addressed is runtime configurability: it
should be possible to switch between a CR3-flushing and a regular syscall and page
table model on the admin level, without restarting the kernel and apps. Distros
really, really don't want to double the number of kernel variants they have.

The 'Kaiser off' runtime switch doesn't have to be as efficient as
CONFIG_KAISER=n, at least initialloy, but at minimum it should avoid the most
expensive page table switching paths in the syscall entry codepaths.

Also, this series should be based on Andy's latest syscall entry cleanup work.

Thanks,

Ingo