From: Arvind Sankar <nivedita@alum.mit.edu> To: Kees Cook <keescook@chromium.org> Cc: "Tobin C . Harding" <me@tobin.cc>, Tycho Andersen <tycho@tycho.ws>, kernel-hardening@lists.openwall.com, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc/32: Stop printing the virtual memory layout Date: Thu, 5 Mar 2020 10:08:37 -0500 [thread overview] Message-ID: <20200305150837.835083-1-nivedita@alum.mit.edu> (raw) In-Reply-To: <202003021038.8F0369D907@keescook> For security, don't display the kernel's virtual memory layout. Kees Cook points out: "These have been entirely removed on other architectures, so let's just do the same for ia32 and remove it unconditionally." 071929dbdd86 ("arm64: Stop printing the virtual memory layout") 1c31d4e96b8c ("ARM: 8820/1: mm: Stop printing the virtual memory layout") 31833332f798 ("m68k/mm: Stop printing the virtual memory layout") fd8d0ca25631 ("parisc: Hide virtual kernel memory layout") adb1fe9ae2ee ("mm/page_alloc: Remove kernel address exposure in free_reserved_area()") Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> --- arch/powerpc/mm/mem.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index ef7b1119b2e2..df2c143b6bf7 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -331,23 +331,6 @@ void __init mem_init(void) #endif mem_init_print_info(NULL); -#ifdef CONFIG_PPC32 - pr_info("Kernel virtual memory layout:\n"); -#ifdef CONFIG_KASAN - pr_info(" * 0x%08lx..0x%08lx : kasan shadow mem\n", - KASAN_SHADOW_START, KASAN_SHADOW_END); -#endif - pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); -#ifdef CONFIG_HIGHMEM - pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n", - PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP)); -#endif /* CONFIG_HIGHMEM */ - if (ioremap_bot != IOREMAP_TOP) - pr_info(" * 0x%08lx..0x%08lx : early ioremap\n", - ioremap_bot, IOREMAP_TOP); - pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n", - VMALLOC_START, VMALLOC_END); -#endif /* CONFIG_PPC32 */ } void free_initmem(void) -- 2.24.1
WARNING: multiple messages have this Message-ID (diff)
From: Arvind Sankar <nivedita@alum.mit.edu> To: Kees Cook <keescook@chromium.org> Cc: Tycho Andersen <tycho@tycho.ws>, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>, linuxppc-dev@lists.ozlabs.org, "Tobin C . Harding" <me@tobin.cc> Subject: [PATCH] powerpc/32: Stop printing the virtual memory layout Date: Thu, 5 Mar 2020 10:08:37 -0500 [thread overview] Message-ID: <20200305150837.835083-1-nivedita@alum.mit.edu> (raw) In-Reply-To: <202003021038.8F0369D907@keescook> For security, don't display the kernel's virtual memory layout. Kees Cook points out: "These have been entirely removed on other architectures, so let's just do the same for ia32 and remove it unconditionally." 071929dbdd86 ("arm64: Stop printing the virtual memory layout") 1c31d4e96b8c ("ARM: 8820/1: mm: Stop printing the virtual memory layout") 31833332f798 ("m68k/mm: Stop printing the virtual memory layout") fd8d0ca25631 ("parisc: Hide virtual kernel memory layout") adb1fe9ae2ee ("mm/page_alloc: Remove kernel address exposure in free_reserved_area()") Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> --- arch/powerpc/mm/mem.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index ef7b1119b2e2..df2c143b6bf7 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -331,23 +331,6 @@ void __init mem_init(void) #endif mem_init_print_info(NULL); -#ifdef CONFIG_PPC32 - pr_info("Kernel virtual memory layout:\n"); -#ifdef CONFIG_KASAN - pr_info(" * 0x%08lx..0x%08lx : kasan shadow mem\n", - KASAN_SHADOW_START, KASAN_SHADOW_END); -#endif - pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); -#ifdef CONFIG_HIGHMEM - pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n", - PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP)); -#endif /* CONFIG_HIGHMEM */ - if (ioremap_bot != IOREMAP_TOP) - pr_info(" * 0x%08lx..0x%08lx : early ioremap\n", - ioremap_bot, IOREMAP_TOP); - pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n", - VMALLOC_START, VMALLOC_END); -#endif /* CONFIG_PPC32 */ } void free_initmem(void) -- 2.24.1
next prev parent reply other threads:[~2020-03-05 15:08 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-26 21:50 [PATCH] x86/mm/init_32: Don't print out kernel memory layout if KASLR Arvind Sankar 2020-02-29 23:51 ` Kees Cook 2020-03-01 0:11 ` Arvind Sankar 2020-03-02 18:38 ` Kees Cook 2020-03-05 15:05 ` [PATCH] microblaze: Stop printing the virtual memory layout Arvind Sankar 2020-03-05 20:50 ` Tycho Andersen 2020-03-09 10:09 ` Michal Simek 2020-03-05 15:06 ` [PATCH] nds32/mm: " Arvind Sankar 2020-03-05 20:50 ` Tycho Andersen 2020-03-05 15:08 ` Arvind Sankar [this message] 2020-03-05 15:08 ` [PATCH] powerpc/32: " Arvind Sankar 2020-03-05 20:50 ` Tycho Andersen 2020-03-05 20:50 ` Tycho Andersen 2022-03-09 19:35 ` Christophe Leroy 2020-03-05 15:10 ` [PATCH] sh: " Arvind Sankar 2020-03-05 15:10 ` Arvind Sankar 2020-03-05 15:18 ` John Paul Adrian Glaubitz 2020-03-05 15:18 ` John Paul Adrian Glaubitz 2020-03-05 15:38 ` Joe Perches 2020-03-05 15:38 ` Joe Perches 2020-03-05 15:38 ` Joe Perches 2020-03-05 15:41 ` John Paul Adrian Glaubitz 2020-03-05 15:41 ` John Paul Adrian Glaubitz 2020-03-05 15:46 ` Arvind Sankar 2020-03-05 15:46 ` Arvind Sankar 2020-03-05 15:49 ` John Paul Adrian Glaubitz 2020-03-05 15:49 ` John Paul Adrian Glaubitz 2020-03-05 15:56 ` Arvind Sankar 2020-03-05 15:56 ` Arvind Sankar 2020-03-05 20:51 ` Tycho Andersen 2020-03-05 20:51 ` Tycho Andersen 2020-03-05 20:56 ` John Paul Adrian Glaubitz 2020-03-05 20:56 ` John Paul Adrian Glaubitz 2020-03-05 21:17 ` Kees Cook 2020-03-05 21:17 ` Kees Cook 2020-03-05 17:34 ` Kees Cook 2020-03-05 17:34 ` Kees Cook 2020-03-06 8:04 ` Geert Uytterhoeven 2020-03-06 8:04 ` Geert Uytterhoeven 2020-03-06 8:04 ` Geert Uytterhoeven 2020-03-08 12:17 ` Kaiwan N Billimoria 2020-03-08 12:29 ` Kaiwan N Billimoria 2020-03-08 12:17 ` Kaiwan N Billimoria 2020-03-05 15:11 ` [PATCH] xtensa/mm: " Arvind Sankar 2020-03-05 20:51 ` Tycho Andersen 2020-03-06 7:54 ` Max Filippov 2020-03-06 7:54 ` Max Filippov 2020-03-01 0:22 ` [PATCH v2] x86/mm/init_32: " Arvind Sankar 2020-03-02 15:29 ` Tycho Andersen 2020-03-02 18:39 ` Kees Cook 2020-03-05 15:01 ` [PATCH v3] " Arvind Sankar 2020-03-05 17:28 ` Kees Cook 2020-03-05 20:49 ` Tycho Andersen 2020-03-05 23:00 ` [tip: x86/mm] x86/mm/init/32: " tip-bot2 for Arvind Sankar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200305150837.835083-1-nivedita@alum.mit.edu \ --to=nivedita@alum.mit.edu \ --cc=benh@kernel.crashing.org \ --cc=keescook@chromium.org \ --cc=kernel-hardening@lists.openwall.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=me@tobin.cc \ --cc=mpe@ellerman.id.au \ --cc=paulus@samba.org \ --cc=tycho@tycho.ws \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.