linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/32: Stop printing the virtual memory layout
       [not found] <202003021038.8F0369D907@keescook>
@ 2020-03-05 15:08 ` Arvind Sankar
  2020-03-05 20:50   ` Tycho Andersen
  2022-03-09 19:35   ` Christophe Leroy
  0 siblings, 2 replies; 3+ messages in thread
From: Arvind Sankar @ 2020-03-05 15:08 UTC (permalink / raw)
  To: Kees Cook
  Cc: Tycho Andersen, kernel-hardening, linux-kernel, Paul Mackerras,
	linuxppc-dev, Tobin C . Harding

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/32: Stop printing the virtual memory layout
  2020-03-05 15:08 ` [PATCH] powerpc/32: Stop printing the virtual memory layout Arvind Sankar
@ 2020-03-05 20:50   ` Tycho Andersen
  2022-03-09 19:35   ` Christophe Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Tycho Andersen @ 2020-03-05 20:50 UTC (permalink / raw)
  To: Arvind Sankar
  Cc: Kees Cook, kernel-hardening, linux-kernel, Paul Mackerras,
	linuxppc-dev, Tobin C . Harding

On Thu, Mar 05, 2020 at 10:08:37AM -0500, Arvind Sankar wrote:
> 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>

Acked-by: Tycho Andersen <tycho@tycho.ws>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/32: Stop printing the virtual memory layout
  2020-03-05 15:08 ` [PATCH] powerpc/32: Stop printing the virtual memory layout Arvind Sankar
  2020-03-05 20:50   ` Tycho Andersen
@ 2022-03-09 19:35   ` Christophe Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Christophe Leroy @ 2022-03-09 19:35 UTC (permalink / raw)
  To: Arvind Sankar, Kees Cook
  Cc: Tycho Andersen, kernel-hardening, linux-kernel, Paul Mackerras,
	linuxppc-dev, Tobin C . Harding



Le 05/03/2020 à 16:08, Arvind Sankar a écrit :
> 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>

This patch doesn't apply anymore.

This patch is referenced in https://github.com/linuxppc/issues/issues/390

> ---
>   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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-09 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202003021038.8F0369D907@keescook>
2020-03-05 15:08 ` [PATCH] powerpc/32: Stop printing the virtual memory layout Arvind Sankar
2020-03-05 20:50   ` Tycho Andersen
2022-03-09 19:35   ` Christophe Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).