any way to see the running kernel's "vermagic" string?

Robert P. J. Day rpjday at crashcourse.ca
Tue Oct 16 10:52:49 EDT 2012


  perhaps i've just overlooked it but is there an easy way to see the
current kernel's calculated "vermagic" string, as defined in the
header file include/linux/vermagic.h thusly?

... snip ...
#define VERMAGIC_STRING                                                 \
        UTS_RELEASE " "                                                 \
        MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT                     \
        MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS       \
        MODULE_ARCH_VERMAGIC

  i'm just interested in examining the vermagic string you can see for
any loadable module, as in:

$ modinfo vfat
filename:       /lib/modules/3.6.0-oct8+/kernel/fs/fat/vfat.ko
author:         Gordon Chaffee
description:    VFAT filesystem support
license:        GPL
srcversion:     68B6C644F1532E86ADCB2CB
depends:        fat
intree:         Y
vermagic:       3.6.0-oct8+ SMP mod_unload modversions

and following the load logic in kernel/module.c to see what happens at
each step of a module load, and that (obviously) involves some
comparisons.  thanks.

rday


-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the Kernelnewbies mailing list