Skip to content

Commit

Permalink
parisc: Hide virtual kernel memory layout
Browse files Browse the repository at this point in the history
For security reasons do not expose the virtual kernel memory layout to
userspace.

Signed-off-by: Helge Deller <[email protected]>
Suggested-by: Kees Cook <[email protected]>
Cc: [email protected] # 4.15
Reviewed-by: Kees Cook <[email protected]>
  • Loading branch information
hdeller committed Mar 2, 2018
1 parent 0adb24e commit fd8d0ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/parisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,12 @@ void __init mem_init(void)
#endif

mem_init_print_info(NULL);
#ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */

#if 0
/*
* Do not expose the virtual kernel memory layout to userspace.
* But keep code for debugging purposes.
*/
printk("virtual kernel memory layout:\n"
" vmalloc : 0x%px - 0x%px (%4ld MB)\n"
" memory : 0x%px - 0x%px (%4ld MB)\n"
Expand Down

0 comments on commit fd8d0ca

Please sign in to comment.