来自的输出中的列/proc/modules
如下。
usb_storage 56610 0 - Live 0xffffffffa005d000 (F)
(1) (2) (3) (4) (5) (6) (7)
注意:我没有提到第7列的内容,但由于第6列的描述(请参见下文)并未涵盖此处显示的信息,因此我将其如此标记。
摘录-http: //www.centos.org/docs/5/html/Deployment_Guide-zh-CN/s1-proc-topfiles.html
- 第一列包含模块的名称。
- 第二列是指模块的内存大小(以字节为单位)。
- 第三列列出了当前加载了多少个模块实例。零值表示已卸载的模块。
- 第四列指出该模块是否要依赖另一个模块才能运行,并列出了这些其他模块。
- 第五列列出了模块所处的负载状态:“活动”,“正在加载”或“正在卸载”是唯一可能的值。
- 第六列列出了已加载模块的当前内核内存偏移量。该信息可用于调试目的或用于分析工具(例如oprofile)。
我相信标有的列(F)
(即第七列)来自此文件-中panic.c
。
/**
* 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.
*
* The string is overwritten by the next call to print_tainted().
*/
这些代码也代表了kernel.txt
参考文档中提供的位掩码。
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.
参考文献