* [nacked] lib-hexdump-add-a-raw-pointer-printing-format-for-slub-debugging.patch removed from -mm tree
@ 2021-05-24 23:51 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-24 23:51 UTC (permalink / raw)
To: cl, iamjoonsoo.kim, mm-commits, penberg, rientjes, swboyd, vbabka
The patch titled
Subject: lib/hexdump: add a raw pointer printing format for slub debugging
has been removed from the -mm tree. Its filename was
lib-hexdump-add-a-raw-pointer-printing-format-for-slub-debugging.patch
This patch was dropped because it was nacked
------------------------------------------------------
From: Stephen Boyd <swboyd@chromium.org>
Subject: lib/hexdump: add a raw pointer printing format for slub debugging
Patch series "slub: Print non-hashed pointers in slub debugging".
I was doing some debugging recently and noticed that my pointers were
being hashed while slub_debug was on the kernel commandline. Let's make
the prints in here meaningful in that case by pushing %px throughout.
Alternatively, we could force on no_hash_pointers if slub_debug is on the
commandline. Maybe that would be better?
The final patch is just something else I noticed while looking at the
code. The message argument is never used so the debugging messages are
not as clear as they could be.
This patch (of 3):
We want to get actual pointer addresses when we're looking at slub
debugging reports. Add another prefix format specifier that says we want
raw pointer addresses, i.e. %px, in the printk format.
Link: https://lkml.kernel.org/r/20210520013539.3733631-1-swboyd@chromium.org
Link: https://lkml.kernel.org/r/20210520013539.3733631-2-swboyd@chromium.org
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/printk.h | 1 +
lib/hexdump.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
--- a/include/linux/printk.h~lib-hexdump-add-a-raw-pointer-printing-format-for-slub-debugging
+++ a/include/linux/printk.h
@@ -567,6 +567,7 @@ extern const struct file_operations kmsg
enum {
DUMP_PREFIX_NONE,
DUMP_PREFIX_ADDRESS,
+ DUMP_PREFIX_RAW_ADDRESS,
DUMP_PREFIX_OFFSET
};
extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
--- a/lib/hexdump.c~lib-hexdump-add-a-raw-pointer-printing-format-for-slub-debugging
+++ a/lib/hexdump.c
@@ -211,8 +211,12 @@ EXPORT_SYMBOL(hex_dump_to_buffer);
* @level: kernel log level (e.g. KERN_DEBUG)
* @prefix_str: string to prefix each line with;
* caller supplies trailing spaces for alignment if desired
- * @prefix_type: controls whether prefix of an offset, address, or none
- * is printed (%DUMP_PREFIX_OFFSET, %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_NONE)
+ * @prefix_type: controls how prefix is printed
+ * %DUMP_PREFIX_OFFSET - offset prefix
+ * %DUMP_PREFIX_ADDRESS - hashed address prefix
+ * %DUMP_PREFIX_RAW_ADDRESS - non-hashed address prefix
+ * %DUMP_PREFIX_NONE - no prefix
+ *
* @rowsize: number of bytes to print per line; must be 16 or 32
* @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)
* @buf: data blob to dump
@@ -260,6 +264,10 @@ void print_hex_dump(const char *level, c
printk("%s%s%p: %s\n",
level, prefix_str, ptr + i, linebuf);
break;
+ case DUMP_PREFIX_RAW_ADDRESS:
+ printk("%s%s%px: %s\n",
+ level, prefix_str, ptr + i, linebuf);
+ break;
case DUMP_PREFIX_OFFSET:
printk("%s%s%.8x: %s\n", level, prefix_str, i, linebuf);
break;
_
Patches currently in -mm which might be from swboyd@chromium.org are
buildid-only-consider-gnu-notes-for-build-id-parsing.patch
buildid-add-api-to-parse-build-id-out-of-buffer.patch
buildid-stash-away-kernels-build-id-on-init.patch
buildid-stash-away-kernels-build-id-on-init-fix.patch
dump_stack-add-vmlinux-build-id-to-stack-traces.patch
module-add-printk-formats-to-add-module-build-id-to-stacktraces.patch
arm64-stacktrace-use-%psb-for-backtrace-printing.patch
x86-dumpstack-use-%psb-%pbb-for-backtrace-printing.patch
scripts-decode_stacktracesh-support-debuginfod.patch
scripts-decode_stacktracesh-silence-stderr-messages-from-addr2line-nm.patch
scripts-decode_stacktracesh-indicate-auto-can-be-used-for-base-path.patch
buildid-mark-some-arguments-const.patch
buildid-fix-kernel-doc-notation.patch
kdump-use-vmlinux_build_id-to-simplify.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-24 23:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 23:51 [nacked] lib-hexdump-add-a-raw-pointer-printing-format-for-slub-debugging.patch removed from -mm tree akpm
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.