Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/32: Stop printing Kernel virtual memory layout

Printing of Kernel virtual memory layout was added for debug purpose
by commit f637a49e507c ("powerpc: Minor cleanups of kernel virt
address space definitions")

For security reasons, don't display the kernel's virtual memory layout.

Other architectures have removed it through following commits.

Commit 071929dbdd86 ("arm64: Stop printing the virtual memory layout")
Commit 1c31d4e96b8c ("ARM: 8820/1: mm: Stop printing the virtual memory layout")
Commit 31833332f798 ("m68k/mm: Stop printing the virtual memory layout")
Commit fd8d0ca25631 ("parisc: Hide virtual kernel memory layout")
Commit 681ff0181bbf ("x86/mm/init/32: Stop printing the virtual memory layout")

Commit 681ff0181bbf ("x86/mm/init/32: Stop printing the virtual memory
layout") thought x86 was the last one, but in reality powerpc/32 still
had it.

So remove it now on powerpc/32 as well.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Kees Cook <kees@kernel.org>
[Maddy: Added "Commit" in commit message to avoid checkpatch error]
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/430bc8c1f2ff2eb9224b04450e22db472b0b9fa9.1736361630.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Madhavan Srinivasan
2bf3caa7 2c1cbbab

-22
-22
arch/powerpc/mm/mem.c
··· 319 319 per_cpu(next_tlbcam_idx, smp_processor_id()) = 320 320 (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) - 1; 321 321 #endif 322 - 323 - #ifdef CONFIG_PPC32 324 - pr_info("Kernel virtual memory layout:\n"); 325 - #ifdef CONFIG_KASAN 326 - pr_info(" * 0x%08lx..0x%08lx : kasan shadow mem\n", 327 - KASAN_SHADOW_START, KASAN_SHADOW_END); 328 - #endif 329 - pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); 330 - #ifdef CONFIG_HIGHMEM 331 - pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n", 332 - PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP)); 333 - #endif /* CONFIG_HIGHMEM */ 334 - if (ioremap_bot != IOREMAP_TOP) 335 - pr_info(" * 0x%08lx..0x%08lx : early ioremap\n", 336 - ioremap_bot, IOREMAP_TOP); 337 - pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n", 338 - VMALLOC_START, VMALLOC_END); 339 - #ifdef MODULES_VADDR 340 - pr_info(" * 0x%08lx..0x%08lx : modules\n", 341 - MODULES_VADDR, MODULES_END); 342 - #endif 343 - #endif /* CONFIG_PPC32 */ 344 322 } 345 323 346 324 void free_initmem(void)