On Wed, Nov 08, 2017 at 11:46:47AM -0800, Dave Hansen wrote:
>
> From: Dave Hansen <[email protected]>
>
> init_mm is for kernel-exclusive use. If someone is allocating page
> tables for it, do not set _PAGE_USER on them.
>
> Signed-off-by: Dave Hansen <[email protected]>
> Reviewed-by: Thomas Gleixner <[email protected]>
> Cc: Moritz Lipp <[email protected]>
> Cc: Daniel Gruss <[email protected]>
> Cc: Michael Schwarz <[email protected]>
> Cc: Richard Fellner <[email protected]>
> Cc: Andy Lutomirski <[email protected]>
> Cc: Linus Torvalds <[email protected]>
> Cc: Kees Cook <[email protected]>
> Cc: Hugh Dickins <[email protected]>
> Cc: [email protected]
> ---
>
> b/arch/x86/include/asm/pgalloc.h | 33 ++++++++++++++++++++++++++++-----
> 1 file changed, 28 insertions(+), 5 deletions(-)
>
> diff -puN
> arch/x86/include/asm/pgalloc.h~kaiser-prep-clear-_PAGE_USER-for-init_mm
> arch/x86/include/asm/pgalloc.h
> --- a/arch/x86/include/asm/pgalloc.h~kaiser-prep-clear-_PAGE_USER-for-init_mm
> 2017-11-08 10:45:25.928681403 -0800
> +++ b/arch/x86/include/asm/pgalloc.h 2017-11-08 10:45:25.931681403 -0800
> @@ -61,20 +61,37 @@ static inline void __pte_free_tlb(struct
> ___pte_free_tlb(tlb, pte);
> }
>
> +/*
> + * init_mm is for kernel-exclusive use. Any page tables that
> + * are seteup for it should not be usable by userspace.
s/seteup/setup/
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.