All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace.patch added to mm-unstable branch
@ 2022-11-08 21:26 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-11-08 21:26 UTC (permalink / raw)
  To: mm-commits, thomas.petazzoni, catalin.marinas, alexandre.belloni,
	clement.leger, akpm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2486 bytes --]


The patch titled
     Subject: mm/kmemleak: use %pK to display kernel pointers in backtrace
has been added to the -mm mm-unstable branch.  Its filename is
     mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace.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 the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Clément Léger <clement.leger@bootlin.com>
Subject: mm/kmemleak: use %pK to display kernel pointers in backtrace
Date: Tue, 8 Nov 2022 10:43:22 +0100

Currently, %p is used to display kernel pointers in backtrace which result
in a hashed value that is not usable to correlate the address for debug. 
Use %pK which will respect the kptr_restrict configuration value and thus
allow to extract meaningful information from the backtrace.

Link: https://lkml.kernel.org/r/20221108094322.73492-1-clement.leger@bootlin.com
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/kmemleak.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/kmemleak.c~mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace
+++ a/mm/kmemleak.c
@@ -361,7 +361,7 @@ static void print_unreferenced(struct se
 
 	for (i = 0; i < nr_entries; i++) {
 		void *ptr = (void *)entries[i];
-		warn_or_seq_printf(seq, "    [<%p>] %pS\n", ptr, ptr);
+		warn_or_seq_printf(seq, "    [<%pK>] %pS\n", ptr, ptr);
 	}
 }
 
_

Patches currently in -mm which might be from clement.leger@bootlin.com are

mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-08 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 21:26 + mm-kmemleak-use-%pk-to-display-kernel-pointers-in-backtrace.patch added to mm-unstable branch 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.