What part of the kernel code maintains /proc/modules
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Thu Aug 28 10:53:25 EDT 2014
On Wed, 27 Aug 2014 16:55:23 -0700, StephanT said:
> Just want to know why in /proc/modules some of the modules are marked (F). Li
ke:
>
> usb_storage 56610 0 - Live 0xffffffffa005d000 (F)
kernel/modules.c has a function module_flags_taint():
static size_t module_flags_taint(struct module *mod, char *buf)
{
size_t l = 0;
if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
buf[l++] = 'P';
if (mod->taints & (1 << TAINT_OOT_MODULE))
buf[l++] = 'O';
if (mod->taints & (1 << TAINT_FORCED_MODULE))
buf[l++] = 'F';
if (mod->taints & (1 << TAINT_CRAP))
buf[l++] = 'C';
if (mod->taints & (1 << TAINT_UNSIGNED_MODULE))
buf[l++] = 'E';
/*
* TAINT_FORCED_RMMOD: could be added.
* TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
* apply to modules.
*/
return l;
}
Somebody 'modprobe -f' that module into the kernel, and it may or may not
actually work properly because it wasn't compiled against the kernel that
is running. Hilarity can result if it's using a different definition for
some random 'struct foo' than the rest of the kernel...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140828/bf3e9a4b/attachment.bin
More information about the Kernelnewbies
mailing list