Re: [PATCH v1 2/2] modules: add scmversion field

From: Greg KH
Date: Mon Nov 23 2020 - 04:29:39 EST


On Sat, Nov 21, 2020 at 01:16:51AM +0000, Will McVicker wrote:
> Add the modinfo field `scmversion` to include the SCM version of kernel
> modules, e.g. git sha1. This allows one to identify the exact source
> code version of a given kernel module.
>
> You can retrieve it in two ways,
>
> 1) By using modinfo
> > modinfo -F scmversion <module_name>
> 2) By module sysfs node
> > cat /sys/module/<module_name>/scmversion

I agree with Christoph that this doesn't help any in-kernel stuff, so I
don't think it can be merged. Why not just build these modules as part
of the normal kernel build process, the Android build system should
allow that, right?

But even if it was ok, you are adding new sysfs attributes without a
Documentation/ABI/ update, which is not ok either, so always remember
that for future patches.

thanks,

greg k-h