From: Helge Deller Subject: Re: [GIT PULL] parisc architecture fixes for 4.15-rc7 Date: Fri, 12 Jan 2018 22:57:15 +0100 Message-ID: <20180112215715.GA8246@ls3530.fritz.box> References: <20180107162123.GA9715@ls3530.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Kees Cook , linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Return-path: In-Reply-To: List-ID: List-Id: linux-parisc.vger.kernel.org Subject: [PATCH] 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 diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 48f41399fc0b..cab32ee824d2 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"