From: Adrian Bunk <bunk@kernel.org>
To: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Print taint info in more places.
Date: Fri, 14 Dec 2007 01:03:50 +0100 [thread overview]
Message-ID: <20071214000350.GK21616@stusta.de> (raw)
In-Reply-To: <20071213224927.GA18639@redhat.com>
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@redhat.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
next prev parent reply other threads:[~2007-12-14 0:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 22:49 Print taint info in more places Dave Jones
2007-12-13 23:08 ` Andi Kleen
2007-12-13 23:43 ` Mauricio Mauad Menegaz Filho
2007-12-13 23:52 ` Dave Jones
2007-12-14 0:12 ` Dave Jones
2007-12-14 0:03 ` Adrian Bunk [this message]
2007-12-14 0:16 ` Dave Jones
2007-12-14 1:30 ` Dave Jones
2007-12-14 7:25 ` Jeremy Fitzhardinge
2007-12-14 7:55 ` Dave Jones
2007-12-14 15:38 ` Matt Mackall
2007-12-14 16:56 ` Dave Jones
2007-12-14 12:09 ` Jon Masters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214000350.GK21616@stusta.de \
--to=bunk@kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.