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

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

 



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

Attachment: pgpIM_KhDD65N.pgp
Description: PGP signature

_______________________________________________
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