lkml.org 
[lkml]   [2018]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 28/37] x86/mm/pti: Map kernel-text to user-space on 32 bit kernels
    Date
    From: Joerg Roedel <jroedel@suse.de>

    Keeping the kernel text mapped with G bit set keeps its
    entries in the TLB across kernel entry/exit and improved the
    performance. The 64 bit x86 kernels already do this when
    there is no PCID, so do this in 32 bit as well since PCID is
    not even supported there.

    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    ---
    arch/x86/mm/init_32.c | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
    index c893c6a..8299b98 100644
    --- a/arch/x86/mm/init_32.c
    +++ b/arch/x86/mm/init_32.c
    @@ -956,4 +956,10 @@ void mark_rodata_ro(void)
    mark_nxdata_nx();
    if (__supported_pte_mask & _PAGE_NX)
    debug_checkwx();
    +
    + /*
    + * Do this after all of the manipulation of the
    + * kernel text page tables are complete.
    + */
    + pti_clone_kernel_text();
    }
    --
    2.7.4
    \
     
     \ /
      Last update: 2018-04-23 17:52    [W:4.151 / U:0.340 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site