kernel メッセージのTaintedについて
kernelのメッセージが出た時にいつもNot taintedって出てましたが、このまえ、初めて、Taintedって出ていたのでメモしました。
これまでは、以下のようなNot taintedってメッセージ。Notって書いてあったのであまり気にしていませんでした。
Apr 22 16:48:27 dev001 kernel: Pid: 2429, comm: perl Not tainted 2.6.32-431.el6.x86_64 #1
それがこんな感じのメッセージ出ていたのでちょっとびっくり。
(Tainted: G W -- ------------ )
調べてみたところ、フラグの意味は以下のような感じみたいです。
/** * print_tainted - return a string to represent the kernel taint state. * * 'P' - Proprietary module has been loaded. * 'F' - Module has been forcibly loaded. * 'S' - SMP with CPUs not designed for SMP. * 'R' - User forced a module unload. * 'M' - System experienced a machine check exception. * 'B' - System has hit bad_page. * 'U' - Userspace-defined naughtiness. * 'D' - Kernel has oopsed before * 'A' - ACPI table overridden. * 'W' - Taint on warning. * 'C' - modules from drivers/staging are loaded. * 'I' - Working around severe firmware bug. * 'O' - Out-of-tree module has been loaded. * 'E' - Unsigned module has been loaded. * 'L' - A soft lockup has previously occurred. * 'K' - Kernel has been live patched. * * The string is overwritten by the next call to print_tainted(). */
http://askubuntu.com/questions/248470/what-does-the-kernel-taint-value-mean
あと、procからtaintedのstatusも確認できました。 何もなければ、0なのですが、warningが出ている状態だと、512が返ってきていました。
cat /proc/sys/kernel/tainted
statusの意味は以下のとおり。
tainted: Non-zero if the kernel has been tainted. Numeric values, which can be ORed together: 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. 2048 - The system is working around a severe firmware bug. 4096 - An out-of-tree module has been loaded. 8192 - An unsigned module has been loaded in a kernel supporting module signature. 16384 - A soft lockup has previously occurred on the system. 32768 - The kernel has been live patched.
https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
taintedという響きから嫌だなぁと思っていましたが、同じtaintedでも中身によって掘り下げれそうですね。