lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1946561.0luHp2vXsY@rfietze>
Date:   Wed, 24 Jun 2020 14:15:24 +0200
From:   Roman Fietze <roman.fietze@...na.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH] print_hex_dump: use %px when using DUMP_PREFIX_ADDRESS

This function is mainly used for debugging. But for that purpose the
hashed memory address of the dumped data provides no useful
information at all.

Note: There are only very few locations in the kernel, where
print_hex_dump is not used with KERN_DEBUG and DUMP_PREFIX_ADDRESS.

Signed-off-by: Roman Fietze <roman.fietze@...na.com>
---
 lib/hexdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/hexdump.c b/lib/hexdump.c
index 147133f8eb2f..52dd2fc1c8b4 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -256,7 +256,7 @@ void print_hex_dump(const char *level, const char 
*prefix_str, int prefix_type,
 
                switch (prefix_type) {
                case DUMP_PREFIX_ADDRESS:
-                       printk("%s%s%p: %s\n",
+                       printk("%s%s%px: %s\n",
                               level, prefix_str, ptr + i, linebuf);
                        break;
                case DUMP_PREFIX_OFFSET:
-- 
2.26.2


-- 

Roman Fietze
Entwicklungsingenieur
MAGNA Telemotive GmbH
Breitwiesen
73347 Mühlhausen
Tel.: +49 7335 18493-45



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ