* [PATCH] powerpc/mm: Fix printing of process table address
@ 2018-03-28 3:09 Balbir Singh
2022-03-09 9:09 ` Christophe Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Balbir Singh @ 2018-03-28 3:09 UTC (permalink / raw)
To: linuxppc-dev
New changes to %p cause the information printed at boot
about radix-mmu partition and process table opaque, if
we really want to protect those values, we should make
dmesg more secure using CONFIG_SECURITY_DMESG_RESTRICT
Before the patches:
radix-mmu: Partition table (ptrval)
radix-mmu: Process table (ptrval) and radix root for kernel: (ptrval)
After the patches
radix-mmu: Partition table c0000000ffff0000
radix-mmu: Process table c0000000fe000000 and radix root for kernel: c0000000015a0000
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
arch/powerpc/mm/pgtable-radix.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
index 2e10a964e290..3f676e89c3a6 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -329,7 +329,8 @@ static void __init radix_init_pgtable(void)
* physical address here.
*/
register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12);
- pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd);
+ pr_info("Process table %px and radix root for kernel: %px\n",
+ process_tb, init_mm.pgd);
asm volatile("ptesync" : : : "memory");
asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : :
"r" (TLBIEL_INVAL_SET_LPID), "r" (0));
@@ -363,7 +364,7 @@ static void __init radix_init_partition_table(void)
mmu_partition_table_set_entry(0, dw0, 0);
pr_info("Initializing Radix MMU\n");
- pr_info("Partition table %p\n", partition_tb);
+ pr_info("Partition table %px\n", partition_tb);
}
void __init radix_init_native(void)
--
2.13.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/mm: Fix printing of process table address
2018-03-28 3:09 [PATCH] powerpc/mm: Fix printing of process table address Balbir Singh
@ 2022-03-09 9:09 ` Christophe Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy @ 2022-03-09 9:09 UTC (permalink / raw)
To: Balbir Singh, linuxppc-dev
Le 28/03/2018 à 05:09, Balbir Singh a écrit :
> New changes to %p cause the information printed at boot
> about radix-mmu partition and process table opaque, if
> we really want to protect those values, we should make
> dmesg more secure using CONFIG_SECURITY_DMESG_RESTRICT
>
> Before the patches:
>
> radix-mmu: Partition table (ptrval)
> radix-mmu: Process table (ptrval) and radix root for kernel: (ptrval)
>
> After the patches
>
> radix-mmu: Partition table c0000000ffff0000
> radix-mmu: Process table c0000000fe000000 and radix root for kernel: c0000000015a0000
>
> Signed-off-by: Balbir Singh <bsingharora@gmail.com>
This patch was superseded by ec5b705c4836 ("powerpc/mm/radix: remove
useless kernel messages")
> ---
> arch/powerpc/mm/pgtable-radix.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
> index 2e10a964e290..3f676e89c3a6 100644
> --- a/arch/powerpc/mm/pgtable-radix.c
> +++ b/arch/powerpc/mm/pgtable-radix.c
> @@ -329,7 +329,8 @@ static void __init radix_init_pgtable(void)
> * physical address here.
> */
> register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12);
> - pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd);
> + pr_info("Process table %px and radix root for kernel: %px\n",
> + process_tb, init_mm.pgd);
> asm volatile("ptesync" : : : "memory");
> asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : :
> "r" (TLBIEL_INVAL_SET_LPID), "r" (0));
> @@ -363,7 +364,7 @@ static void __init radix_init_partition_table(void)
> mmu_partition_table_set_entry(0, dw0, 0);
>
> pr_info("Initializing Radix MMU\n");
> - pr_info("Partition table %p\n", partition_tb);
> + pr_info("Partition table %px\n", partition_tb);
> }
>
> void __init radix_init_native(void)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-09 9:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-28 3:09 [PATCH] powerpc/mm: Fix printing of process table address Balbir Singh
2022-03-09 9:09 ` 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).