]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86: CPA no alias checking for _NX
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Feb 2008 20:49:46 +0000 (21:49 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 18 Feb 2008 19:54:14 +0000 (20:54 +0100)
NX settings are not required to be consistent across alias mappings.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/pageattr.c

index 7b4a17236972bc90815204f766e9e8bfc389dc10..b8f53233151dd6d6548e4062c88bb5086eb576e5 100644 (file)
@@ -669,7 +669,7 @@ static int change_page_attr_set_clr(unsigned long addr, int numpages,
                                    pgprot_t mask_set, pgprot_t mask_clr)
 {
        struct cpa_data cpa;
-       int ret, cache;
+       int ret, cache, checkalias;
 
        /*
         * Check, if we are requested to change a not supported
@@ -695,7 +695,10 @@ static int change_page_attr_set_clr(unsigned long addr, int numpages,
        cpa.mask_clr = mask_clr;
        cpa.flushtlb = 0;
 
-       ret = __change_page_attr_set_clr(&cpa, 1);
+       /* No alias checking for _NX bit modifications */
+       checkalias = (pgprot_val(mask_set) | pgprot_val(mask_clr)) != _PAGE_NX;
+
+       ret = __change_page_attr_set_clr(&cpa, checkalias);
 
        /*
         * Check whether we really changed something: