Tainted Kernel

2430阅读 0评论2014-11-29 mpoix
分类:LINUX

By on December 10, 2012

What is Kernel Taint ?

The Linux kernel maintains a “taint state” and logs for the same are stored in Kernel error messages.
Kernel taint state indicates that something has happened to the running kernel that results in Kernel error or hang and this can be troubleshooted by analysing the kernel source code.
Some of the information in the taint relates to whether the information provided by the kernel in an error message can be considered trustworthy.

Steps to  check kernel taint status

root@server[#] cat /proc/sys/kernel/tainted

If  it returns  any non-zero  value then it means your kernel is tainted . The value will be a combined number of all applying kernel taint flags added together. You can find a list of currently used kernel flags under:

Taint values

1 – A module with a non-GPL license has been loaded, this includes modules with no license. Set by modutils >= 2.4.9 and module-init-tools.
2 – A module was force loaded by insmod -f. Set by modutils >= 2.4.9 and module-init-tools.
4 – Unsafe SMP processors: SMP with CPUs not designed for SMP.
8 – A module was forcibly unloaded from the system by rmmod -f.
16 – A hardware machine check error occurred on the system.
32 – A bad page was discovered on the system.
64 – The user has asked that the system be marked “tainted”. This could be because they are running software that directly modifies the hardware, or for other reasons.
128 – The system has died.
256 – The ACPI DSDT has been overridden with one supplied by the user instead of using the one provided by the hardware.
512 – A kernel warning has occurred.
1024 – A module from drivers/staging was loaded.
268435456 – Unsupported hardware
536870912 – Technology Preview code was loaded

Taint Flags

The taint status of the kernel not only indicates whether or not the kernel has been tainted but also indicates what type(s) of event caused the kernel to be marked as tainted. This information is encoded through single-character flags in the string following “Tainted:” in a kernel error message.

You can get the taint  flags in dmesg command output

root@server[#] dmesg | grep -i taint

Below are the taint flags

The taint flags above are implemented in the standard Linux kernel and indicate the information provided in kernel error messages is not necessarily to be trusted.

In SUSE kernels, additional taint flags are implemented.

This entry is filed under and tagged , , , .


上一篇:LaTex表格并排
下一篇:安装Bumblebee