How can I know what is tainting my kernel

Jonathan Neuschäfer j.neuschaefer at gmx.net
Sun Nov 13 13:47:11 EST 2011


On Sat, Nov 12, 2011 at 04:39:59PM -0800, Greg KH wrote:
> On Sun, Nov 13, 2011 at 01:18:47AM +0100, Jonathan Neuschäfer wrote:
> > On Sat, Nov 12, 2011 at 03:49:53PM -0800, Greg KH wrote:
> > > On Sat, Nov 12, 2011 at 08:23:32PM -0200, Daniel Hilst Selli wrote:
> > > > Two questions about taint system..
> > > > 
> > > > 1. I have a installation of archlinux with kernel 3.0, just after boot I 
> > > > cat /proc/sys/kenrel/tainted and receives 1024, but cat 
> > > > /var/log/messages | grep -i taint gives me no output. How can I know 
> > > > what is tainting my kernel?
> > > 
> > > Look for the "BIOS is broken..." message, 1024 is
> > > TAINT_FIRMWARE_WORKAROUND.
> > 
> > No, it's TAINT_CRAP.
> 
> Really?  As the person who added TAINT_CRAP to the kernel, for some
> foolish reason I thought that was the 10th bit, not the 11th bit, which
> would be 1024, right?

It's defined as 10 in kernel.h, which makes it actually the 11th bit,
and it's documented as 1024 in Documentation/sysctl/kernel.txt.

> 
> > > > 2. I was studying char devices, and have writed some code. I have put 
> > > > the MODULE_LICENSE("GPL"); on the module, build it, put it on a initrd 
> > > > image and boot with qemu using -kernel and -initrd options. When I 
> > > > loadit with modprobe I receives a message on console saying that kernel 
> > > > was tainted and /proc/sys/kernel/tainted gives me 4024. There is any 
> > > > other thing on module, besides license that can taint the kernel?
> > > 
> > > Yes, lots of things, look at kernel.h for the full list.
> > 
> > It's also documented in Documentation/sysctl/kernel.txt, but
> > TAINT_FIRMWARE_WORKAROUND and TAINT_OOT_MODULE are not.
> 
> TAINT_OOT_MODULE is not in 3.0.

Okay, that was a bit off-topic. My point was that the "tainted" entry is
only documented up to TAINT_CRAP in the current mainline kernel.

thanks,
	Jonathan Neuschäfer



More information about the Kernelnewbies mailing list