Re: What part of the kernel code maintains /proc/modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 
Thanks for the answer. Still cannot understand:

-bash-4.1# uname -r
3.10.14-100.146887.clp6.x86_64

-bash-4.1# modinfo usb-storage.ko 
filename:       usb-storage.ko
license:        GPL
description:    USB Mass Storage driver for Linux
author:         Matthew Dharm <mdharm-usb@xxxxxxxxxxxxxxxxxx>
alias:          usb:v*p*d*dc*dsc*dp*ic08isc06ip50in*
... lots of aliases ...
alias:          usb:v03EBp2002d0100dc*dsc*dp*ic*isc*ip*in*
depends:        
intree:         Y
vermagic:       3.10.14-100.146887.clp6.x86_64 SMP mod_unload 
parm:           option_zero_cd:ZeroCD mode (1=Force Modem (default), 2=Allow CD-Rom (uint)
parm:           swi_tru_install:TRU-Install mode (1=Full Logic (def), 2=Force CD-Rom, 3=Force Modem) (uint)
parm:           delay_use:seconds to delay before using a new device (uint)
parm:           quirks:supplemental list of device IDs and their quirks (string)


As shown above both have the same Version - they were built together on the same system. If I unload and load back the usb-storage the (F) disappears. After re-boot the (F) is back.

Any idea why 

Thanks.


On Thursday, August 28, 2014 7:53 AM, "Valdis.Kletnieks@xxxxxx" <Valdis.Kletnieks@xxxxxx> wrote:


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...



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux