android_kernel_msm-6.1_noth.../kernel/module
Will McVicker d834db9f2c ANDROID: modules: re-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/all/20210121213641.3477522-1-willmcvicker@google.com/
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: Ib7c72c72f95c4545adb7cd4e842729557039ce3a
2023-03-01 01:47:13 +00:00
..
debug_kmemleak.c
decompress.c module: Fix NULL vs IS_ERR checking for module_get_next_page 2022-12-31 13:32:10 +01:00
gki_module.c ANDROID: GKI: Only protect exports if KMI symbols are present 2022-12-19 09:25:36 -08:00
internal.h ANDROID: GKI: Protect exports of protected GKI modules 2022-12-16 13:35:39 -08:00
kallsyms.c module: Increase readability of module_kallsyms_lookup_name() 2022-07-11 10:49:14 -07:00
Kconfig ANDROID: modules: re-introduce the MODULE_SCMVERSION config 2023-03-01 01:47:13 +00:00
kdb.c
livepatch.c
main.c ANDROID: modules: re-introduce the MODULE_SCMVERSION config 2023-03-01 01:47:13 +00:00
Makefile ANDROID: GKI: Fix symbol list wildcard 2023-02-01 01:39:47 +00:00
procfs.c module: Modify module_flags() to accept show_state argument 2022-07-14 17:40:23 -07:00
signing.c ANDROID: GKI: Add module load time symbol protection 2022-10-21 02:21:06 +00:00
strict_rwx.c
sysfs.c
tracking.c module: tracking: Keep a record of tainted unloaded modules only 2022-10-10 12:16:19 -07:00
tree_lookup.c
version.c