Skip to content

Commit 9c4560e

Browse files
keestorvalds
authored andcommitted
taint: consolidate documentation
This consolidates the taint bit documentation into a single place with both numeric and letter values. Additionally adds the missing TAINT_AUX documentation. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Al Viro <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 47d4b26 commit 9c4560e

File tree

2 files changed

+31
-45
lines changed

2 files changed

+31
-45
lines changed

Documentation/sysctl/kernel.txt

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -964,32 +964,33 @@ detect a hard lockup condition.
964964

965965
tainted:
966966

967-
Non-zero if the kernel has been tainted. Numeric values, which
968-
can be ORed together:
969-
970-
1 - A module with a non-GPL license has been loaded, this
971-
includes modules with no license.
972-
Set by modutils >= 2.4.9 and module-init-tools.
973-
2 - A module was force loaded by insmod -f.
974-
Set by modutils >= 2.4.9 and module-init-tools.
975-
4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
976-
8 - A module was forcibly unloaded from the system by rmmod -f.
977-
16 - A hardware machine check error occurred on the system.
978-
32 - A bad page was discovered on the system.
979-
64 - The user has asked that the system be marked "tainted". This
980-
could be because they are running software that directly modifies
981-
the hardware, or for other reasons.
982-
128 - The system has died.
983-
256 - The ACPI DSDT has been overridden with one supplied by the user
984-
instead of using the one provided by the hardware.
985-
512 - A kernel warning has occurred.
986-
1024 - A module from drivers/staging was loaded.
987-
2048 - The system is working around a severe firmware bug.
988-
4096 - An out-of-tree module has been loaded.
989-
8192 - An unsigned module has been loaded in a kernel supporting module
990-
signature.
991-
16384 - A soft lockup has previously occurred on the system.
992-
32768 - The kernel has been live patched.
967+
Non-zero if the kernel has been tainted. Numeric values, which can be
968+
ORed together. The letters are seen in "Tainted" line of Oops reports.
969+
970+
1 (P): A module with a non-GPL license has been loaded, this
971+
includes modules with no license.
972+
Set by modutils >= 2.4.9 and module-init-tools.
973+
2 (F): A module was force loaded by insmod -f.
974+
Set by modutils >= 2.4.9 and module-init-tools.
975+
4 (S): Unsafe SMP processors: SMP with CPUs not designed for SMP.
976+
8 (R): A module was forcibly unloaded from the system by rmmod -f.
977+
16 (M): A hardware machine check error occurred on the system.
978+
32 (B): A bad page was discovered on the system.
979+
64 (U): The user has asked that the system be marked "tainted". This
980+
could be because they are running software that directly modifies
981+
the hardware, or for other reasons.
982+
128 (D): The system has died.
983+
256 (A): The ACPI DSDT has been overridden with one supplied by the user
984+
instead of using the one provided by the hardware.
985+
512 (W): A kernel warning has occurred.
986+
1024 (C): A module from drivers/staging was loaded.
987+
2048 (I): The system is working around a severe firmware bug.
988+
4096 (O): An out-of-tree module has been loaded.
989+
8192 (E): An unsigned module has been loaded in a kernel supporting module
990+
signature.
991+
16384 (L): A soft lockup has previously occurred on the system.
992+
32768 (K): The kernel has been live patched.
993+
65536 (X): Auxiliary taint, defined and used by for distros.
993994

994995
==============================================================
995996

kernel/panic.c

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -328,27 +328,12 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
328328
};
329329

330330
/**
331-
* print_tainted - return a string to represent the kernel taint state.
331+
* print_tainted - return a string to represent the kernel taint state.
332332
*
333-
* 'P' - Proprietary module has been loaded.
334-
* 'F' - Module has been forcibly loaded.
335-
* 'S' - SMP with CPUs not designed for SMP.
336-
* 'R' - User forced a module unload.
337-
* 'M' - System experienced a machine check exception.
338-
* 'B' - System has hit bad_page.
339-
* 'U' - Userspace-defined naughtiness.
340-
* 'D' - Kernel has oopsed before
341-
* 'A' - ACPI table overridden.
342-
* 'W' - Taint on warning.
343-
* 'C' - modules from drivers/staging are loaded.
344-
* 'I' - Working around severe firmware bug.
345-
* 'O' - Out-of-tree module has been loaded.
346-
* 'E' - Unsigned module has been loaded.
347-
* 'L' - A soft lockup has previously occurred.
348-
* 'K' - Kernel has been live patched.
349-
* 'X' - Auxiliary taint, for distros' use.
333+
* For individual taint flag meanings, see Documentation/sysctl/kernel.txt
350334
*
351-
* The string is overwritten by the next call to print_tainted().
335+
* The string is overwritten by the next call to print_tainted(),
336+
* but is always NULL terminated.
352337
*/
353338
const char *print_tainted(void)
354339
{

0 commit comments

Comments
 (0)