x86-64: fix overlap of modules and fixmap areas
authorJan Beulich <jbeulich@novell.com>
Thu, 31 Jul 2008 15:48:31 +0000 (16:48 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 15:31:50 +0000 (17:31 +0200)
Plus add a build time check so this doesn't go unnoticed again.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/head64.c
include/asm-x86/pgtable_64.h

index 1b318e903bf63f14bd4f514ad8fd5916289bb979..9bfc4d72fb2e26b757ffad4bffd8b0de7a45de39 100644 (file)
@@ -88,6 +88,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
        BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
        BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) ==
                                (__START_KERNEL & PGDIR_MASK)));
+       BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) <= MODULES_END);
 
        /* clear bss before set_intr_gate with early_idt_handler */
        clear_bss();
index ac5fff4cc58aaf364eb41d5027f8e851aceef915..549144d03d99e7972ec2d4806b1763c2c41c933f 100644 (file)
@@ -151,7 +151,7 @@ static inline void native_pgd_clear(pgd_t *pgd)
 #define VMALLOC_END      _AC(0xffffe1ffffffffff, UL)
 #define VMEMMAP_START   _AC(0xffffe20000000000, UL)
 #define MODULES_VADDR    _AC(0xffffffffa0000000, UL)
-#define MODULES_END      _AC(0xfffffffffff00000, UL)
+#define MODULES_END      _AC(0xffffffffff000000, UL)
 #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
 
 #ifndef __ASSEMBLY__