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-prev] [day] [month] [year] [list]
Message-Id: <20070530143515.9642b45c.randy.dunlap@oracle.com>
Date:	Wed, 30 May 2007 14:35:15 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Hugh Dickins <hugh@...itas.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jayson Santos <jaysonsantos2003@...oo.com.br>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 3/3 -mm] prio_tree: use lib/hexdump

On Tue, 15 May 2007 19:56:31 +0100 (BST) Hugh Dickins wrote:

> So dump vma and the one it's supposed to resemble: I had expected to use
> print_hex_dump(), but that's designed for u8 dumps, whereas almost every
> field of vm_area_struct is either a pointer or an unsigned long - which
> look nonsense dumped as u8s.

From: Randy Dunlap <randy.dunlap@...cle.com>

Use modified lib/hexdump in mm/prio_tree dump_vma().

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 mm/prio_tree.c |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

--- linux-2622-rc2mm1-slub.orig/mm/prio_tree.c
+++ linux-2622-rc2mm1-slub/mm/prio_tree.c
@@ -69,16 +69,9 @@
 
 static void dump_vma(struct vm_area_struct *vma)
 {
-	void **ptr = (void **) vma;
-	int i;
-
-	printk("vm_area_struct at %p:", ptr);
-	for (i = 0; i < sizeof(*vma)/sizeof(*ptr); i++, ptr++) {
-		if (!(i & 3))
-			printk("\n");
-		printk(" %p", *ptr);
-	}
-	printk("\n");
+	printk("vm_area_struct at %p:\n", vma);
+	print_hex_dump("", " ", DUMP_PREFIX_NONE, 32, sizeof(void *),
+		vma, sizeof(*vma), 0);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ