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]
Date:	Wed, 26 Nov 2008 08:24:45 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	linux-kernel@...r.kernel.org, x86@...nel.org,
	akpm@...ux-foundation.org, Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH] scripts: script from kerneloops.org to pretty print
	oops dumps


* Arjan van de Ven <arjan@...radead.org> wrote:

> From 57b0deb1ad706a94e3118baee4127676f465c4ab Mon Sep 17 00:00:00 2001
> From: Arjan van de Ven <arjan@...ux.intel.com>
> Date: Wed, 5 Nov 2008 19:00:36 -0800
> Subject: [PATCH] scripts: script from kerneloops.org to pretty print oops dumps
> 
> We're strugling all the time to figure out where the code came from
> that oopsed.. The script below (a adaption from a script used by kerneloops.org)
> can help developers quite a bit, at least for non-module cases.
> 
> It works and looks like this:
> 
> [/home/arjan/linux]$ dmesg | perl scripts/markup_oops.pl vmlinux
>  {
>  	struct agp_memory *memory;
> 
>  	memory = agp_allocate_memory(agp_bridge, pg_count, type);
>  c055c10f:	89 c2                	mov    %eax,%edx
>  	if (memory == NULL)
>  c055c111:	74 19                	je     c055c12c <agp_allocate_memory_wrap+0x30>
>  /* This function must only be called when current_controller != NULL */
>  static void agp_insert_into_pool(struct agp_memory * temp)
>  {
>  	struct agp_memory *prev;
> 
>  	prev = agp_fe.current_controller->pool;
>  c055c113:	a1 ec dc 8f c0       	mov    0xc08fdcec,%eax
> *c055c118:	8b 40 10             	mov    0x10(%eax),%eax     <----- faulting instruction
> 
>  	if (prev != NULL) {
>  c055c11b:	85 c0                	test   %eax,%eax
>  c055c11d:	74 05                	je     c055c124 <agp_allocate_memory_wrap+0x28>
>  		prev->prev = temp;
>  c055c11f:	89 50 04             	mov    %edx,0x4(%eax)
>  		temp->next = prev;
>  c055c122:	89 02                	mov    %eax,(%edx)
>  	}
>  	agp_fe.current_controller->pool = temp;
>  c055c124:	a1 ec dc 8f c0       	mov    0xc08fdcec,%eax
>  c055c129:	89 50 10             	mov    %edx,0x10(%eax)
>  	if (memory == NULL)
>  		return NULL;
> 
>  	agp_insert_into_pool(memory);
> 
> so in this case, we faulted while dereferencing agp_fe.current_controller pointer, and we get to see
> exactly which function and line it affects... Personally I find this very useful, and I can
> see value for having this script in the kernel for more-than-just-me to use.
> 
> Caveats:
> * It only works for oopses not-in-modules
> * It only works nicely for kernels compiled with CONFIG_DEBUG_INFO
> * It's not very fast.
> * It only works on x86
> 
> Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
> ---
>  scripts/markup_oops.pl |  162 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 162 insertions(+), 0 deletions(-)
>  create mode 100644 scripts/markup_oops.pl

looks useful - Andrew, Sam, any objections to this?

	Ingo
--
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