dump_pagetables.c (6ea24cf79e055f0a62a64baa8587e2254a493c7b) | dump_pagetables.c (0483e1fa6e09d4948272680f691dccb1edb9677f) |
---|---|
1/* 2 * Debug helper to dump the current kernel pagetables of the system 3 * so that we can see what the various memory ranges are set to. 4 * 5 * (C) Copyright 2008 Intel Corporation 6 * 7 * Author: Arjan van de Ven <arjan@linux.intel.com> 8 * --- 58 unchanged lines hidden (view full) --- 67#endif 68}; 69 70/* Address space markers hints */ 71static struct addr_marker address_markers[] = { 72 { 0, "User Space" }, 73#ifdef CONFIG_X86_64 74 { 0x8000000000000000UL, "Kernel Space" }, | 1/* 2 * Debug helper to dump the current kernel pagetables of the system 3 * so that we can see what the various memory ranges are set to. 4 * 5 * (C) Copyright 2008 Intel Corporation 6 * 7 * Author: Arjan van de Ven <arjan@linux.intel.com> 8 * --- 58 unchanged lines hidden (view full) --- 67#endif 68}; 69 70/* Address space markers hints */ 71static struct addr_marker address_markers[] = { 72 { 0, "User Space" }, 73#ifdef CONFIG_X86_64 74 { 0x8000000000000000UL, "Kernel Space" }, |
75 { PAGE_OFFSET, "Low Kernel Mapping" }, 76 { VMALLOC_START, "vmalloc() Area" }, 77 { VMEMMAP_START, "Vmemmap" }, | 75 { 0/* PAGE_OFFSET */, "Low Kernel Mapping" }, 76 { 0/* VMALLOC_START */, "vmalloc() Area" }, 77 { 0/* VMEMMAP_START */, "Vmemmap" }, |
78# ifdef CONFIG_X86_ESPFIX64 79 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 }, 80# endif 81# ifdef CONFIG_EFI 82 { EFI_VA_END, "EFI Runtime Services" }, 83# endif 84 { __START_KERNEL_map, "High Kernel Mapping" }, 85 { MODULES_VADDR, "Modules" }, --- 343 unchanged lines hidden (view full) --- 429 430void ptdump_walk_pgd_level_checkwx(void) 431{ 432 ptdump_walk_pgd_level_core(NULL, NULL, true); 433} 434 435static int __init pt_dump_init(void) 436{ | 78# ifdef CONFIG_X86_ESPFIX64 79 { ESPFIX_BASE_ADDR, "ESPfix Area", 16 }, 80# endif 81# ifdef CONFIG_EFI 82 { EFI_VA_END, "EFI Runtime Services" }, 83# endif 84 { __START_KERNEL_map, "High Kernel Mapping" }, 85 { MODULES_VADDR, "Modules" }, --- 343 unchanged lines hidden (view full) --- 429 430void ptdump_walk_pgd_level_checkwx(void) 431{ 432 ptdump_walk_pgd_level_core(NULL, NULL, true); 433} 434 435static int __init pt_dump_init(void) 436{ |
437 /* 438 * Various markers are not compile-time constants, so assign them 439 * here. 440 */ 441#ifdef CONFIG_X86_64 442 address_markers[LOW_KERNEL_NR].start_address = PAGE_OFFSET; 443 address_markers[VMALLOC_START_NR].start_address = VMALLOC_START; 444 address_markers[VMEMMAP_START_NR].start_address = VMEMMAP_START; 445#endif |
|
437#ifdef CONFIG_X86_32 | 446#ifdef CONFIG_X86_32 |
438 /* Not a compile-time constant on x86-32 */ | |
439 address_markers[VMALLOC_START_NR].start_address = VMALLOC_START; 440 address_markers[VMALLOC_END_NR].start_address = VMALLOC_END; 441# ifdef CONFIG_HIGHMEM 442 address_markers[PKMAP_BASE_NR].start_address = PKMAP_BASE; 443# endif 444 address_markers[FIXADDR_START_NR].start_address = FIXADDR_START; 445#endif 446 447 return 0; 448} 449 450__initcall(pt_dump_init); 451MODULE_LICENSE("GPL"); 452MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>"); 453MODULE_DESCRIPTION("Kernel debugging helper that dumps pagetables"); | 447 address_markers[VMALLOC_START_NR].start_address = VMALLOC_START; 448 address_markers[VMALLOC_END_NR].start_address = VMALLOC_END; 449# ifdef CONFIG_HIGHMEM 450 address_markers[PKMAP_BASE_NR].start_address = PKMAP_BASE; 451# endif 452 address_markers[FIXADDR_START_NR].start_address = FIXADDR_START; 453#endif 454 455 return 0; 456} 457 458__initcall(pt_dump_init); 459MODULE_LICENSE("GPL"); 460MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>"); 461MODULE_DESCRIPTION("Kernel debugging helper that dumps pagetables"); |