For security reasons do not expose the virtual kernel memory layout to userspace.
Unified · Split
| @@ -629,7 +629,12 @@ void __init mem_init(void) · 628 unmodified lines | |||
| 629 | #endif | 629 | #endif |
| 630 | 630 | ||
| 631 | mem_init_print_info(NULL); | 631 | mem_init_print_info(NULL); |
| 632 | #ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */ | 632 | |
| 633 | #if 0 | ||
| 634 | /* | ||
| 635 | * Do not expose the virtual kernel memory layout to userspace. | ||
| 636 | * But keep code for debugging purposes. | ||
| 637 | */ | ||
| 633 | printk("virtual kernel memory layout:\n" | 638 | printk("virtual kernel memory layout:\n" |
| 634 | " vmalloc : 0x%px - 0x%px (%4ld MB)\n" | 639 | " vmalloc : 0x%px - 0x%px (%4ld MB)\n" |
| 635 | " memory : 0x%px - 0x%px (%4ld MB)\n" | 640 | " memory : 0x%px - 0x%px (%4ld MB)\n" |