diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
commit | 08b74a000942a380fe028845f92cd3a0dee827d5 (patch) | |
tree | aa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/templates/image.bug/include-1tainted | |
parent | Adding upstream version 4.19.249. (diff) | |
download | linux-debian/4.19.249-2.tar.xz linux-debian/4.19.249-2.zip |
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/templates/image.bug/include-1tainted')
-rw-r--r-- | debian/templates/image.bug/include-1tainted | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/templates/image.bug/include-1tainted b/debian/templates/image.bug/include-1tainted new file mode 100644 index 000000000..921922e3c --- /dev/null +++ b/debian/templates/image.bug/include-1tainted @@ -0,0 +1,55 @@ +TAINT_PROPRIETARY_MODULE=0 +TAINT_FORCED_MODULE=1 +TAINT_UNSAFE_SMP=2 +TAINT_FORCED_RMMOD=3 +TAINT_MACHINE_CHECK=4 +TAINT_BAD_PAGE=5 +TAINT_USER=6 +TAINT_DIE=7 +TAINT_OVERRIDDEN_ACPI_TABLE=8 +TAINT_WARN=9 +TAINT_CRAP=10 +TAINT_FIRMWARE_WORKAROUND=11 +TAINT_OOT_MODULE=12 +TAINT_UNSIGNED_MODULE=13 +TAINT_SOFTLOCKUP=14 +TAINT_LIVEPATCH=15 + +_check() { + if [ $(($tainted & 1<<$1)) -ne 0 ]; then + result_short="$result_short$2" + result_long="$result_long * $3\n" + fi +} + +add_1tainted() { + tainted=$(cat /proc/sys/kernel/tainted) + if [ "$tainted" -gt 0 ]; then + local result_short result_long + _check $TAINT_PROPRIETARY_MODULE 'P' 'Proprietary module has been loaded.' + _check $TAINT_FORCED_MODULE 'F' 'Module has been forcibly loaded.' + _check $TAINT_UNSAFE_SMP 'S' 'SMP with CPUs not designed for SMP.' + _check $TAINT_FORCED_RMMOD 'R' 'User forced a module unload.' + _check $TAINT_MACHINE_CHECK 'M' 'System experienced a machine check exception.' + _check $TAINT_BAD_PAGE 'B' 'System has hit bad_page.' + _check $TAINT_USER 'U' 'Userspace-defined naughtiness.' + _check $TAINT_DIE 'D' 'Kernel has oopsed before.' + _check $TAINT_OVERRIDDEN_ACPI_TABLE 'A' 'ACPI table overridden.' + _check $TAINT_WARN 'W' 'Taint on warning.' + _check $TAINT_CRAP 'C' 'Module from drivers/staging has been loaded.' + _check $TAINT_FIRMWARE_WORKAROUND 'I' 'Working around severe firmware bug.' + _check $TAINT_OOT_MODULE 'O' 'Out-of-tree module has been loaded.' + _check $TAINT_UNSIGNED_MODULE 'E' 'Unsigned module has been loaded.' + _check $TAINT_SOFTLOCKUP 'L' 'Kernel has detected soft lockup before.' + _check $TAINT_LIVEPATCH 'K' 'Live patch has been loaded.' + echo "** Tainted: $result_short ($tainted)" >&3 + printf "$result_long" >&3 + else + echo '** Not tainted' >&3 + fi + echo >&3 +} + +ask_1tainted() { + true +} |