[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eac20e8d-d08c-4be7-a34f-b511798f0a57@infradead.org>
Date: Fri, 22 Nov 2024 16:53:07 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Matthew Maurer <mmaurer@...gle.com>, Michael Ellerman
<mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
Luis Chamberlain <mcgrof@...nel.org>, Petr Pavlu <petr.pavlu@...e.com>,
Sami Tolvanen <samitolvanen@...gle.com>, Daniel Gomez
<da.gomez@...sung.com>, Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Jonathan Corbet <corbet@....net>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org,
rust-for-linux@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v9 3/5] modules: Allow extended modversions without basic
MODVERSIONS
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@...gle.com>
> ---
> 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
Powered by blists - more mailing lists