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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090105092619.GA3699@cmpxchg.org>
Date:	Mon, 5 Jan 2009 10:26:19 +0100
From:	Johannes Weiner <hannes@...xchg.org>
To:	Robert Hancock <hancockr@...w.ca>
Cc:	linux-kernel@...r.kernel.org, david@...g.hm,
	Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: early exception error

On Fri, Jan 02, 2009 at 02:57:17PM -0600, Robert Hancock wrote:
> Cyrill Gorcunov wrote:
> >
> >Here is a new picture if someone would like to jump into
> >the bug handling
> >
> >	http://linux.lang.hm/linux/IMG00033.jpg
> 
> alloc_bootmem_core is a reasonably big function, it would be useful if 
> we could track down what line it's blowing up on.. Can you try to find 
> out what line that fault address (ffffffff8096452a in this crash) is on 
> as described in Documentation/BUG-HUNTING, i.e. build with 
> CONFIG_DEBUG_INFO enabled, run gdb on vmlinux and do:
> 
> l *0xffffffff8096452a

He has booted with bootmem debugging output.  Given that the bdebug()
describing the request wasn't hit yet, it must be one of the BUG_ON()s
(or bdata is NULL).

If you can find out the line with gdb, this would be great.

Besides that it might be useful to move the bdebug() before the
BUG_ON()s.  With the line info available, the expressions that trigger
a bug are pretty unambiguous, but since we would print the parameters
anyway we can as well do so before a possible panic to quickly deduce
what went wrong without decoding.

	Hannes

---
Subject: bootmem: print request details before BUG_ON(them)

Moving the request details print-out before the sanity checks that
might panic() enables us to analyse invalid requests without having
access to the line information of the stack dump.

Signed-off-by: Johannes Weiner <hannes@...xchg.org>
---

diff --git a/mm/bootmem.c b/mm/bootmem.c
index ac5a891..51a0ccf 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -435,6 +435,10 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
 	unsigned long fallback = 0;
 	unsigned long min, max, start, sidx, midx, step;
 
+	bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
+		bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
+		align, goal, limit);
+
 	BUG_ON(!size);
 	BUG_ON(align & (align - 1));
 	BUG_ON(limit && goal + size > limit);
@@ -442,10 +446,6 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
 	if (!bdata->node_bootmem_map)
 		return NULL;
 
-	bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
-		bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
-		align, goal, limit);
-
 	min = bdata->node_min_pfn;
 	max = bdata->node_low_pfn;
 
--
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