lkml.org 
[lkml]   [2017]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch V181 37/54] x86/mm/pti: Map ESPFIX into user space
    From: Andy Lutomirski <luto@kernel.org>

    Map the ESPFIX pages into user space when PTI is enabled.

    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: David Laight <David.Laight@aculab.com>
    Cc: Borislav Petkov <bp@alien8.de>
    ---
    arch/x86/mm/pti.c | 11 +++++++++++
    1 file changed, 11 insertions(+)

    --- a/arch/x86/mm/pti.c
    +++ b/arch/x86/mm/pti.c
    @@ -256,6 +256,16 @@ static void __init pti_clone_user_shared
    }

    /*
    + * Clone the ESPFIX P4D into the user space visinble page table
    + */
    +static void __init pti_setup_espfix64(void)
    +{
    +#ifdef CONFIG_X86_ESPFIX64
    + pti_clone_p4d(ESPFIX_BASE_ADDR);
    +#endif
    +}
    +
    +/*
    * Clone the populated PMDs of the entry and irqentry text and force it RO.
    */
    static void __init pti_clone_entry_text(void)
    @@ -276,4 +286,5 @@ void __init pti_init(void)

    pti_clone_user_shared();
    pti_clone_entry_text();
    + pti_setup_espfix64();
    }

    \
     
     \ /
      Last update: 2017-12-20 23:04    [W:4.083 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site