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: <20071214000350.GK21616@stusta.de>
Date:	Fri, 14 Dec 2007 01:03:50 +0100
From:	Adrian Bunk <bunk@...nel.org>
To:	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: Print taint info in more places.

On Thu, Dec 13, 2007 at 05:49:27PM -0500, Dave Jones wrote:
> We've found in the past that various bug reports have had minimal
> information, just a few printk's rather than a complete oops,
> and it's taken several round-trips with the bug reporter before
> we've discovered they had some proprietary module loaded.
> 
> The patches below adds dumping of the tainted state to some
> extra parts of the kernel that report 'bad things' happening.
> These patches have been in the Fedora kernel for some time now,
> and have proved useful often.
> 
> Signed-off-by: Dave Jones <davej@...hat.com>
> 
> 
> --- linux-2.6/include/asm-generic/bug.h~	2007-02-12 16:18:21.000000000 -0500
> +++ linux-2.6/include/asm-generic/bug.h	2007-02-12 16:19:57.000000000 -0500
> @@ -3,6 +3,10 @@
>  
>  #include <linux/compiler.h>
>  
> +#ifndef __ASSEMBLY__
> +extern const char *print_tainted(void);
> +#endif
> +
>  #ifdef CONFIG_BUG
>  
>  #ifdef CONFIG_GENERIC_BUG
> @@ -22,7 +26,8 @@ struct bug_entry {
>  
>  #ifndef HAVE_ARCH_BUG
>  #define BUG() do { \
> -	printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
> +	printk(KERN_ERR "BUG: failure at %s:%d/%s()! (%s)\n",
> +		__FILE__, __LINE__, __FUNCTION__, print_tainted()); \
>  	panic("BUG!"); \
>  } while (0)
>  #endif
>...

Note that this only changes a handful of architectures and most likely 
not the ones you are interested in.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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