• Huang, Ying's avatar
    x86: fix NX bit handling in change_page_attr() · 4c881ca1
    Huang, Ying authored
    This patch fixes a bug of change_page_attr/change_page_attr_addr on
    Intel i386/x86_64 CPUs.  After changing page attribute to be
    executable with these functions, the page remains un-executable on
    Intel i386/x86_64 CPU.  Because on Intel i386/x86_64 CPU, only if the
    "NX" bits of all three level page tables are cleared (PAE is enabled),
    the corresponding page is executable (refer to section 4.13.2 of Intel
    64 and IA-32 Architectures Software Developer's Manual).  So, the bug
    is fixed through clearing the "NX" bit of PMD when splitting the huge
    PMD.
    Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    4c881ca1
pageattr.c 7.31 KB