Check all loaded modules and report any that have their 'taint' flags set. The tainted module output format is: * <module_name> (<taint_flags>) Example output: Kernel is "tainted" for the following reasons: * externally-built ('out-of-tree') module was loaded (#12) * unsigned module was loaded (#13) Raw taint value as int/string: 12288/'G OE ' Tainted modules: * dump_test (OE)
Unified · Split
| @@ -211,9 +211,25 @@ else · 210 unmodified lines | |||
| 211 | addout "J" | 211 | addout "J" |
| 212 | echo " * fwctl's mutating debug interface was used (#19)" | 212 | echo " * fwctl's mutating debug interface was used (#19)" |
| 213 | fi | 213 | fi |
| 214 | echo "Raw taint value as int/string: $taint/'$out'" | ||
| 215 | |||
| 216 | # report on any tainted loadable modules | ||
| 217 | [ "$1" = "" ] && [ -r /sys/module/ ] && \ | ||
| 218 | cnt=`grep [A-Z] /sys/module/*/taint | wc -l` || cnt=0 | ||
| 214 | 219 | ||
| 220 | if [ $cnt -ne 0 ]; then | ||
| 221 | echo | ||
| 222 | echo "Tainted modules:" | ||
| 223 | for dir in `ls /sys/module` ; do | ||
| 224 | if [ -r /sys/module/$dir/taint ]; then | ||
| 225 | modtnt=`cat /sys/module/$dir/taint` | ||
| 226 | [ "$modtnt" = "" ] || echo " * $dir ($modtnt)" | ||
| 227 | fi | ||
| 228 | done | ||
| 229 | fi | ||
| 230 | |||
| 231 | echo | ||
| 215 | echo "For a more detailed explanation of the various taint flags see" | 232 | echo "For a more detailed explanation of the various taint flags see" |
| 216 | echo " Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources" | 233 | echo " Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources" |
| 217 | echo " or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html" | 234 | echo " or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html" |
| 218 | echo "Raw taint value as int/string: $taint/'$out'" | ||
| 219 | #EOF# | 235 | #EOF# |