-   Slackware (
-   -   Question about kernel "tainted" vs. "not tainted" (

STDOUBT 07-13-2013 03:01 PM

Question about kernel "tainted" vs. "not tainted"
Joyful 20th anniversary greetings, all!

Recently, while messing with my GF's laptop, and during a kernel panic, I
noticed a message saying the kernel was "not tainted".
I was under the impression that the vanilla Linux kernel did contain non-Free blobs by default, thus the Linux-Libre project.
Being respectful (though not religious) about The Four Freedoms, I was happy
to find which details the "non-Freedom" bits inculded
in Slackware proper. It is mentioned there to switch to a Linux-Libre kernel
for the optimum Freedom experience. Now, I do not begrudge Slackware for not
adhering to the RMS Way, but it's nice to know that one could easily prune
a Slackware installation into religious compliance ;-)

So, to refine my question: how does a kernel report "not tainted" when in
fact binary, non-Free, blobs ship with it by default?
Maybe the definition of "tainted" doesn't mean what I think it means?
Much thanks for any insight!

volkerdi 07-13-2013 03:15 PM

The kernel will be marked as tainted if a kernel module is loaded that doesn't have a license compatible with the GPL. If you have such modules available but don't load them, the kernel is not tainted.

STDOUBT 07-13-2013 03:45 PM

Many thanks, Sahib!
What you say makes perfect sense as always.

mlslk31 07-13-2013 08:52 PM

The long list of Tainted conditions are here:

As for religious compliance of Linux, don't worry about it so much. There are distributions that are approved by GNU, and maybe they're pretty good:

You should also read this page about why distributions you've heard of do not make the grade:

It's rationalization, though. It sure seems like RMS has to either go nuts or add another requirement when he feels too much success coming on (GPLv3, anyone?). Also, if a distribution maintainer has to pare down Linux itself to be free enough for a Linux distribution, though, it might be time to re-evaluate whether that Linux distribution should be made at all. I'm glad that Pat's free-software packages tend to have the same sha256sum values as their upstream counterparts, whether the packages are free enough for everyone or not.

STDOUBT 07-14-2013 01:17 AM

Thanks for the links. I was interested in Dragora for a bit, but it's still soundly
enshrined in the larval stage. The other distros listed at just don't appeal to me.
Something interesting at the end of the page at your first link:

The primary reason for the 'Tainted: ' string is to tell kernel
debuggers if this is a clean kernel or if anything unusual has
occurred. Tainting is permanent: even if an offending module is
unloaded, the tainted value remains to indicate that the kernel is not
Not trustworthy? Permanent? That doesn't sound like a very thing to say.
I guess since the modules are closed, that means potentially "mystery code" has been run with
kernel-level privileges and therefore, no (easy) way to verify the integrity of the system overall?

On my T60p I'm using the open radeon driver which I've been told requires a closed kernel blob to work with X11 but it doesn't appear to be listed here...

root@darkstar:/mnt# dmesg |grep -i taint
[119314.789205] Pid: 21206, comm: pm-suspend Tainted: G        W  O 3.2.45-smp #1
[130565.805204] Pid: 1294, comm: pm-suspend Tainted: G        W  O 3.2.45-smp #1

I was surprised to learn pm-suspend taints the kernel (my particular hardware must be the culprit, requiring some closed firmware blob to be called).
And yet, based on the list at the "oops-tracing" link,the G and W values appear to indicate GPL compliance. Hmm.

mlslk31 07-14-2013 03:24 PM

Tainting is kind of like a marker. If a file system driver throws a taint, for instance, there's a very high chance that you should expect failure until you reboot and/or fix the problem that caused the taint. Some other subsystems are rather unpleasant that way as well.

Note that I grabbed the link off of via Google. The latest oops-tracing.txt mentions the "O", which specifies an out-of-tree, externally-built module.

The way I'd go about it is to shut the PC off, let it sit a few seconds, then power it back on again. The fresh boot session will be free of tainting. When you get that problem again, immediately go to the dmesg command and look for that first stack backtrace that doesn't have the "W" in it, even if it's marked as "Not tainted." That's a good candidate to send with a bug report to the appropriate people. Should you choose to go upstream, it really helps to run the latest version of the software.

BTW, the place I've seen these codes referenced a lot is the "F" flag. That way, the first question asked by support is, "How did you expect everything to work well after you force-loaded your modules?"

mancha 07-15-2013 02:47 AM

Check if your kernel is tainted with this bash 1-liner I just cooked up:


(t=$(cat /proc/sys/kernel/tainted 2>/dev/null) || exit 1;p=0;[ "$t" == "0" ] && echo -e "\nKernel not tainted." || { echo -e "\nKernel tainted:";for m in "A module with a non-GPL license has been loaded" "A module was force loaded by insmod -f." "Unsafe SMP processors: SMP with CPUs not designed for SMP." "A module was forcibly unloaded from the system by rmmod -f." "A hardware machine check error occurred on the system." "A bad page was discovered on the system." "The user has asked that the system be marked tainted." "The system has died" "The ACPI DSDT has been overridden with one supplied by the user" "A kernel warning has occurred." "A module from drivers/staging was loaded." "The system is working around a severe firmware bug." "An out-of-tree module has been loaded.";do [ $(( $t & (2**p) )) -eq $((2**p)) ] && echo -e "$((2**p))\t$m";(( p++ ));done })

syg00 07-15-2013 03:42 AM

A binary blob doesn't necessarily taint the kernel. The Intel wireless driver for instance.
The kernel devs have made allowance for out of tree firmware - and yes there was some angst at the decision.

brianL 07-15-2013 04:21 AM

From dmesg:

[ 6.916782] nvidia: module license 'NVIDIA' taints kernel
Taint bothering me, though. :)
I admire idealists like RMS, but wouldn't want to be one.

volkerdi 07-15-2013 03:39 PM


Originally Posted by syg00 (Post 4990459)
A binary blob doesn't necessarily taint the kernel. The Intel wireless driver for instance.
The kernel devs have made allowance for out of tree firmware - and yes there was some angst at the decision.

If the firmware is merely loaded by the kernel and doesn't actually run as kernel code, I agree that it doesn't taint the kernel. IIRC, the idea was to have the kernel report itself as tainted so that the developers wouldn't be bothered with bug reports possibly caused by closed source modules that they couldn't do anything about.

All times are GMT -5. The time now is 03:04 AM.