* + mm-vmalloc-use-%p-for-pointer-formatting.patch added to mm-unstable branch
@ 2026-09-18 20:05 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2026-09-18 20:05 UTC (permalink / raw)
To: mm-commits, urezki, bigeasy, akpm
The patch titled
Subject: mm/vmalloc: Use %p for pointer formatting
has been added to the -mm mm-unstable branch. Its filename is
mm-vmalloc-use-%p-for-pointer-formatting.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmalloc-use-%p-for-pointer-formatting.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: mm/vmalloc: Use %p for pointer formatting
Date: Fri, 18 Sep 2026 12:50:13 +0200
Commit 45ec16908e84e ("mm: use %pK for /proc/vmallocinfo") introduced the
%pK in order not to leak kernel pointers. Since commit ad67b74d2469d
("printk: hash addresses printed with %p") pointers are hashed by default
and the behaviour can be controller by `hash_pointers' boot argument. The
policy on %p is to not introduce new ones. Removing %pK makes it possible
to remove its handling from the library.
Looking at the output, having the pointer in the output makes it
possible to distinguish the individual entries.
Use %p instead %pK.
/proc/vmallocinfo has mode 0400, so this change doesn't make kernel
pointer information available to unprivileged userspace.
Link: https://lore.kernel.org/20260918105013.UpdykT6j@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Uladzislau Rezki <urezki@gmail.com>
---
mm/vmalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/vmalloc.c~mm-vmalloc-use-%p-for-pointer-formatting
+++ a/mm/vmalloc.c
@@ -5316,7 +5316,7 @@ static void show_purge_info(struct seq_f
for_each_vmap_node(vn) {
spin_lock(&vn->lazy.lock);
list_for_each_entry(va, &vn->lazy.head, list) {
- seq_printf(m, "0x%pK-0x%pK %7ld unpurged vm_area\n",
+ seq_printf(m, "0x%p-0x%p %7ld unpurged vm_area\n",
(void *)va->va_start, (void *)va->va_end,
va_size(va));
}
@@ -5339,7 +5339,7 @@ static int vmalloc_info_show(struct seq_
list_for_each_entry(va, &vn->busy.head, list) {
if (!va->vm) {
if (va->flags & VMAP_RAM)
- seq_printf(m, "0x%pK-0x%pK %7ld vm_map_ram\n",
+ seq_printf(m, "0x%p-0x%p %7ld vm_map_ram\n",
(void *)va->va_start, (void *)va->va_end,
va_size(va));
@@ -5353,7 +5353,7 @@ static int vmalloc_info_show(struct seq_
/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */
smp_rmb();
- seq_printf(m, "0x%pK-0x%pK %7ld",
+ seq_printf(m, "0x%p-0x%p %7ld",
v->addr, v->addr + v->size, v->size);
if (v->caller)
_
Patches currently in -mm which might be from bigeasy@linutronix.de are
mm-vmalloc-use-%p-for-pointer-formatting.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* + mm-vmalloc-use-%p-for-pointer-formatting.patch added to mm-unstable branch
@ 2026-09-19 1:06 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2026-09-19 1:06 UTC (permalink / raw)
To: mm-commits, urezki, sj, bigeasy, akpm
The patch titled
Subject: mm/vmalloc: Use %p for pointer formatting
has been added to the -mm mm-unstable branch. Its filename is
mm-vmalloc-use-%p-for-pointer-formatting.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmalloc-use-%p-for-pointer-formatting.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: mm/vmalloc: Use %p for pointer formatting
Date: Fri, 18 Sep 2026 12:50:13 +0200
Commit 45ec16908e84e ("mm: use %pK for /proc/vmallocinfo") introduced the
%pK in order not to leak kernel pointers. Since commit ad67b74d2469d
("printk: hash addresses printed with %p") pointers are hashed by default
and the behaviour can be controlled by `hash_pointers' boot argument. The
policy on %p is to not introduce new ones. Removing %pK makes it possible
to remove its handling from the library.
Looking at the output, having the pointer in the output makes it
possible to distinguish the individual entries.
Use %p instead %pK.
/proc/vmallocinfo has mode 0400, so this change doesn't make kernel
pointer information available to unprivileged userspace.
Link: https://lore.kernel.org/20260918105013.UpdykT6j@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: SJ Park <sj@kernel.org>
Cc: Uladzislau Rezki <urezki@gmail.com>
---
mm/vmalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/vmalloc.c~mm-vmalloc-use-%p-for-pointer-formatting
+++ a/mm/vmalloc.c
@@ -5337,7 +5337,7 @@ static void show_purge_info(struct seq_f
for_each_vmap_node(vn) {
spin_lock(&vn->lazy.lock);
list_for_each_entry(va, &vn->lazy.head, list) {
- seq_printf(m, "0x%pK-0x%pK %7ld unpurged vm_area\n",
+ seq_printf(m, "0x%p-0x%p %7ld unpurged vm_area\n",
(void *)va->va_start, (void *)va->va_end,
va_size(va));
}
@@ -5360,7 +5360,7 @@ static void show_busy_info(struct seq_fi
list_for_each_entry(va, &vn->busy.head, list) {
if (!va->vm) {
if (va->flags & VMAP_RAM)
- seq_printf(m, "0x%pK-0x%pK %7ld vm_map_ram\n",
+ seq_printf(m, "0x%p-0x%p %7ld vm_map_ram\n",
(void *)va->va_start, (void *)va->va_end,
va_size(va));
@@ -5374,7 +5374,7 @@ static void show_busy_info(struct seq_fi
/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */
smp_rmb();
- seq_printf(m, "0x%pK-0x%pK %7ld",
+ seq_printf(m, "0x%p-0x%p %7ld",
v->addr, v->addr + v->size, v->size);
if (v->caller)
_
Patches currently in -mm which might be from bigeasy@linutronix.de are
mm-vmalloc-use-%p-for-pointer-formatting.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-19 1:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 20:05 + mm-vmalloc-use-%p-for-pointer-formatting.patch added to mm-unstable branch Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2026-09-19 1:06 Andrew Morton
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.