/ proc / modules中标记为(F)的模块


9

在我的3.10系统上,/ proc / modules中列出的某些模块标记为(F)。我想找出原因(F)。我确定模块不是强制加载的,而是使用内核构建的。您能否指出哪个内核代码创建了/ proc / modules?

usb_storage 56610 0 - Live 0xffffffffa005d000 (F)

如果我卸载并重新装回此模块,则(F)消失。


除了代码(仍在寻找那一点)外,到目前为止,我发现的第二个最佳资源是:unixhelp.ed.ac.uk/CGI/man-cgi?proc+5tldp.org / HOWTO / html_single/模块HOWTO。这有点太有用:centos.org/docs/5/html/Deployment_Guide-en-US/...
SLM

谢谢你。在引用/ proc / modules的部分中,您的第三个指针说明了第六列,即内存偏移量。它说此信息由分析器使用-这是我的问题。标有(F)的模块时,探查器默默拒绝工作。
Stephan T.

Answers:


11

来自的输出中的列/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.

参考文献

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.