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:	Thu, 3 Jan 2008 12:00:34 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andi Kleen <ak@...e.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [20/20] x86: Print which shared library/executable
	faulted in segfault etc. messages


* Andi Kleen <ak@...e.de> wrote:

> They now look like
> 
> hal-resmgr[13791]: segfault at 3c rip 2b9c8caec182 rsp 7fff1e825d30 
> error 4 in libacl.so.1.1.0[2b9c8caea000+6000]
> 
> This makes it easier to pinpoint bugs to specific libraries.

yep, that's really useful.

I think the patch needs one more iteration though:

> And printing the offset into a mapping also always allows to find the 
> correct fault point in a library even with randomized mappings. Previously
> there was no way to actually find the correct code address inside
> the randomized mapping.
> 
> Relies on earlier patch to shorten the printk formats.
> 
> They are often now longer than 80 characters, but I think that's worth 
> it.

why not make it multi-line? that way the %lx hack wouldnt be needed 
either.

> +void print_vma_addr(char *prefix, unsigned long ip)
> +{
> +	struct mm_struct *mm = current->mm;
> +	struct vm_area_struct *vma;
> +	down_read(&mm->mmap_sem);
> +	vma = find_vma(mm, ip);

grumble. Proper CodingStyle please.

> +		if (buf) {
> +			char *p, *s;
> +			p = d_path(f->f_dentry, f->f_vfsmnt, buf, PAGE_SIZE);

this one too.

> +	if (show_unhandled_signals && printk_ratelimit()) {
> +		printk("%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
>  	       me->comm,me->pid,where,frame,regs->ip,regs->sp,regs->orig_ax);

and 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