lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201121011652.2006613-1-willmcvicker@google.com>
Date:   Sat, 21 Nov 2020 01:16:49 +0000
From:   Will McVicker <willmcvicker@...gle.com>
To:     Jessica Yu <jeyu@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>
Cc:     linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
        kernel-team@...gle.com, Will McVicker <willmcvicker@...gle.com>
Subject: [PATCH v1 0/2] Add support to capture external module's SCM version

These two patches add module support to capture an external module's SCM
version as a MODULE_INFO() attribute. This allows users to identity the SCM
version of a given kernel module by using the modinfo tool or on the device
via sysfs:

  cat /sys/module/<module>/scmversion

It's important to note that the sysfs node is necessary in order to get the SCM
version of modules that were loaded from the ramdisk in first stage init.
I have updated scripts/setlocalversion to support this for git, mercurial, and
subversion.

Here is the example output I used to test these patches with a simple module
versioned with git, hg, and svn:

  $ modinfo simple_module.ko | egrep 'scmversion|vermagic'
  scmversion:     gbf35fd9b6412
  vermagic:       5.10.0-rc4-00110-gd83461f36865 SMP mod_unload

  $ modinfo simple_module.ko | egrep 'scmversion|vermagic'
  scmversion:     hge5037af323b9
  vermagic:       5.10.0-rc4-00110-gd83461f36865 SMP mod_unload

  $ modinfo simple_module.ko | egrep 'scmversion|vermagic'
  scmversion:     svn1
  vermagic:       5.10.0-rc4-00110-gd83461f36865 SMP mod_unload

Will McVicker (2):
  scripts/setlocalversion: allow running in a subdir
  modules: add scmversion field

 include/linux/module.h   |  1 +
 kernel/module.c          | 20 ++++++++++++++++++++
 scripts/Makefile.modpost | 19 +++++++++++++++++--
 scripts/mod/modpost.c    | 28 +++++++++++++++++++++++++++-
 scripts/setlocalversion  |  5 ++---
 5 files changed, 67 insertions(+), 6 deletions(-)

-- 
2.29.2.454.gaff20da3a2-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ