• Arjan van de Ven's avatar
    x86: turn the check_exec function into function that · ed724be6
    Arjan van de Ven authored
    What the check_exec() function really is trying to do is enforce certain
    bits in the pgprot that are required by the x86 architecture, but that
    callers might not be aware of (such as NX bit exclusion of the BIOS
    area for BIOS based PCI access; it's not uncommon to ioremap the BIOS
    region for various purposes and normally ioremap() memory has the NX bit
    set).
    
    This patch turns the check_exec() function into static_protections()
    which also is now used to make sure the kernel text area remains non-NX
    and that the .rodata section remains read-only. If the architecture
    ends up requiring more such mandatory prot settings for specific areas,
    this is now a reasonable place to add these.
    Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    ed724be6
pageattr.c 8.18 KB