From: Helge Deller Date: Fri, 12 Jan 2018 21:57:15 +0000 (+0100) Subject: parisc: Hide virtual kernel memory layout X-Git-Tag: v4.16-rc4~13^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fd8d0ca2563151204f3fe555dc8ca4bcfe8677a3;p=users%2Fdwmw2%2Flinux.git parisc: Hide virtual kernel memory layout For security reasons do not expose the virtual kernel memory layout to userspace. Signed-off-by: Helge Deller Suggested-by: Kees Cook Cc: stable@vger.kernel.org # 4.15 Reviewed-by: Kees Cook --- diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 48f41399fc0b8..cab32ee824d2a 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -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"