android_kernel_xiaomi_sm8450/scripts/mod
Will McVicker da2089a28a ANDROID: modules: introduce the MODULE_SCMVERSION config
Config MODULE_SCMVERSION introduces a new module attribute --
`scmversion` -- which can be used to identify a given module's SCM
version.  This is very useful for developers that update their kernel
independently from their kernel modules or vice-versa since the SCM
version provided by UTS_RELEASE (`uname -r`) will now differ from the
module's vermagic attribute.

For example, we have a CI setup that tests new kernel changes on the
hikey960 and db845c devices without updating their kernel modules. When
these tests fail, we need to be able to identify the exact device
configuration the test was using. By including MODULE_SCMVERSION, we can
identify the exact kernel and modules' SCM versions for debugging the
failures.

Additionally, by exposing the SCM version via the sysfs node
/sys/module/MODULENAME/scmversion, one can also verify the SCM versions
of the modules loaded from the initramfs. Currently, modinfo can only
retrieve module attributes from the module's ko on disk and not from the
actual module that is loaded in RAM.

You can retrieve the SCM version in two ways,

1) By using modinfo:
    > modinfo -F scmversion MODULENAME
2) By module sysfs node:
    > cat /sys/module/MODULENAME/scmversion

Bug: 180027765
Link: https://lore.kernel.org/lkml/20210121213641.3477522-1-willmcvicker@google.com
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: Ib7c72c72f95c4545adb7cd4e842729557039ce3a
2021-02-23 16:42:21 -08:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
devicetable-offsets.c soundwire: extend SDW_SLAVE_ENTRY 2020-06-30 21:26:17 +05:30
empty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file2alias.c soundwire: extend SDW_SLAVE_ENTRY 2020-06-30 21:26:17 +05:30
Makefile FROMLIST: scripts/mod: disable LTO for empty.c 2020-12-16 08:56:34 -08:00
mk_elfconfig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modpost.c ANDROID: modules: introduce the MODULE_SCMVERSION config 2021-02-23 16:42:21 -08:00
modpost.h UPSTREAM: modpost: refactor error handling and clarify error/fatal difference 2021-02-01 08:20:44 +00:00
sumversion.c FROMLIST: modpost: lto: strip .lto from module names 2020-12-16 08:56:34 -08:00