Re: [PATCH v9 3/5] modules: Allow extended modversions without basic MODVERSIONS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/22/24 4:19 PM, Matthew Maurer wrote:
> If you know that your kernel modules will only ever be loaded by a newer
> kernel, you can disable BASIC_MODVERSIONS to save space. This also
> allows easy creation of test modules to seee how tooling will respond to
> modules that only have the new format.
> 
> Signed-off-by: Matthew Maurer <mmaurer@xxxxxxxxxx>
> ---
>  kernel/module/Kconfig    | 15 +++++++++++++++
>  scripts/Makefile.modpost |  1 +
>  scripts/mod/modpost.c    | 19 +++++++++++--------
>  3 files changed, 27 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig
> index a31c617cd67d3d66b24d2fba34cbd5cc9c53ab78..f28b361494c4b4cc2446d683589f9452a0043b2b 100644
> --- a/kernel/module/Kconfig
> +++ b/kernel/module/Kconfig
> @@ -161,6 +161,7 @@ config MODULE_UNLOAD_TAINT_TRACKING
>  config MODVERSIONS
>  	bool "Module versioning support"
>  	depends on !COMPILE_TEST
> +	selects BASIC_MODVERSIONS

tested?  'selects' is not valid.

>  	help
>  	  Usually, you have to use modules compiled with your kernel.
>  	  Saying Y here makes it sometimes possible to use modules
> @@ -218,6 +219,20 @@ config EXTENDED_MODVERSIONS
>  	  The most likely reason you would enable this is to enable Rust
>  	  support. If unsure, say N.
>  
> +config BASIC_MODVERSIONS
> +	bool "Basic Module Versioning Support"
> +	depends on MODVERSIONS
> +	help
> +	  This enables basic MODVERSIONS support, allowing older tools or
> +	  kernels to potentially load modules.
> +
> +	  Disabling this may cause older `modprobe` or `kmod` to be unable
> +	  to read MODVERSIONS information from built modules. With this
> +	  disabled, older kernels may treat this module as unversioned.
> +
> +	  This is enabled by default when MODVERSIONS are enabled.
> +	  If unsure, say Y.
> +
>  config MODULE_SRCVERSION_ALL
>  	bool "Source checksum for all modules"
>  	help


-- 
~Randy





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux