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

2014-08-28 Thread StephanT




Stab in the dark - at boot, is it picking up a different module version
>from an initramfs?
>
>
>
>
>You a genius, man !
>Will double check but this should be.
>Thanks a lot.___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


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

2014-08-28 Thread Valdis . Kletnieks
On Thu, 28 Aug 2014 09:41:18 -0700, StephanT said:
> 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.

Stab in the dark - at boot, is it picking up a different module version
from an initramfs?


pgpKLS1_Lzm6w.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


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

2014-08-28 Thread StephanT
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 
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.kletni...@vt.edu" 
 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 0xa005d000 (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@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


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

2014-08-28 Thread Valdis . Kletnieks
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 0xa005d000 (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...


pgpWknhGCI85Y.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


What part of the kernel code maintains /proc/modules

2014-08-28 Thread StephanT
Hi,

Just want to know why in /proc/modules some of the modules are marked (F). Like:

usb_storage 56610 0 - Live 0xa005d000 (F)


Thanks,
Stephan.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies