]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/fault.c
x86: check vmlinux limits, 64-bit
[linux-2.6] / arch / x86 / mm / fault.c
index c0c82bc143c98966e9e5e88634560096b5ae4923..81fcbeec389279de08c9ce0a83d6260e1bdf4777 100644 (file)
@@ -91,13 +91,10 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr,
        int prefetch = 0;
        unsigned char *max_instr;
 
-#ifdef CONFIG_X86_32
-       /* Catch an obscure case of prefetch inside an NX page: */
-       if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16))
-               return 0;
-#endif
-
-       /* If it was a exec fault on NX page, ignore */
+       /*
+        * If it was a exec (instruction fetch) fault on NX page, then
+        * do not ignore the fault:
+        */
        if (error_code & PF_INSTR)
                return 0;
 
@@ -979,9 +976,5 @@ void vmalloc_sync_all(void)
                if (address == start)
                        start = address + PGDIR_SIZE;
        }
-       /* Check that there is no need to do the same for the modules area. */
-       BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
-       BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) ==
-                               (__START_KERNEL & PGDIR_MASK)));
 #endif
 }