[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMcgbY6b5y1K4JFM@levanger>
Date: Sun, 14 Sep 2025 22:07:09 +0200
From: Nicolas Schier <nsc@...nel.org>
To: Alexey Gladkov <legion@...nel.org>
Cc: Nathan Chancellor <nathan@...nel.org>, Petr Pavlu <petr.pavlu@...e.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Daniel Gomez <da.gomez@...sung.com>, linux-kernel@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org,
Miguel Ojeda <ojeda@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v7 6/8] modpost: Add modname to mod_device_table alias
On Mon, Aug 18, 2025 at 06:55:00PM +0200, Alexey Gladkov wrote:
> At this point, if a symbol is compiled as part of the kernel,
> information about which module the symbol belongs to is lost.
>
> To save this it is possible to add the module name to the alias name.
> It's not very pretty, but it's possible for now.
>
> Cc: Miguel Ojeda <ojeda@...nel.org>
> Cc: Andreas Hindborg <a.hindborg@...nel.org>
> Cc: Danilo Krummrich <dakr@...nel.org>
> Cc: Alex Gaynor <alex.gaynor@...il.com>
> Cc: rust-for-linux@...r.kernel.org
> Signed-off-by: Alexey Gladkov <legion@...nel.org>
> Acked-by: Danilo Krummrich <dakr@...nel.org>
> ---
> include/linux/module.h | 14 +++++++++++++-
> rust/kernel/device_id.rs | 8 ++++----
> scripts/mod/file2alias.c | 18 ++++++++++++++----
> 3 files changed, 31 insertions(+), 9 deletions(-)
>
...
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 00586119a25b7..13021266a18f8 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1476,8 +1476,8 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
> {
> void *symval;
> char *zeros = NULL;
> - const char *type, *name;
> - size_t typelen;
> + const char *type, *name, *modname;
> + size_t typelen, modnamelen;
when applying the patch-set onto kbuild-next, gcc refuses to build this patch
(this possibly killing future bisecting):
../scripts/mod/file2alias.c: In function ‘handle_moddevtable’:
../scripts/mod/file2alias.c:1480:25: error: variable ‘modnamelen’ set but not used [-Werror=unused-but-set-variable]
1480 | size_t typelen, modnamelen;
| ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [../scripts/Makefile.host:131: scripts/mod/file2alias.o] Error
(-Werror is on for userprogs, since commit
27758d8c2583d10472b745a43ff86fef96c11ef7)
Introduction of modnamelen has to be moved to the next patch.
Kind regards
Nicolas
Powered by blists - more mailing lists