From: sashiko-bot@kernel.org
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-trace-kernel@vger.kernel.org, linux-modules@vger.kernel.org
Subject: Re: [PATCH v4 1/3] module: pull out add_taint_module() to be public
Date: Mon, 14 Sep 2026 14:38:06 +0000 [thread overview]
Message-ID: <20260914143807.5895E1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260914-bind_taint-v4-1-eadf8a090903@linuxfoundation.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing EXPORT_SYMBOL for add_taint_module() causes link failures for loadable modules.
--
commit af64416dcd45d326037820ed7ffd035efeed6ec0
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
module: pull out add_taint_module() to be public
This commit extracts add_taint_module() and makes it a globally accessible
function so that other kernel code can call it to taint specific modules.
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index d0e1e0bd2ad06..444d990c99832 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
[ ... ]
> @@ -191,11 +191,21 @@ static inline int strong_try_module_get(struct module *mod)
> return -ENOENT;
> }
>
> -static inline void add_taint_module(struct module *mod, unsigned flag,
> - enum lockdep_ok lockdep_ok)
> +/**
> + * add_taint_module: add a taint flag if not already set for a specific module
> + * @mod: pointer to the module that caused the problem
> + * @flag: one of the TAINT_* constants.
> + * @lockdep_ok: whether lock debugging is still OK.
> + *
> + * If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
> + * some noteworthy-but-not-corrupting cases, it can be set to true.
> + */
> +void add_taint_module(struct module *mod, unsigned flag,
> + enum lockdep_ok lockdep_ok)
> {
> add_taint(flag, lockdep_ok);
> - set_bit(flag, &mod->taints);
> + if (mod)
> + set_bit(flag, &mod->taints);
> }
[Severity: Low]
Since the commit message mentions that other kernel code might want to call
add_taint_module(), does this function need an EXPORT_SYMBOL() declaration?
Without an export, if a loadable module attempts to use this function as a
module-aware counterpart to add_taint(), it will cause a build error
due to an undefined reference during the modpost stage.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-bind_taint-v4-0-eadf8a090903@linuxfoundation.org?part=1
next prev parent reply other threads:[~2026-09-14 14:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 14:30 [PATCH v4 0/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-09-14 14:30 ` [PATCH v4 1/3] module: pull out add_taint_module() to be public Greg Kroah-Hartman
2026-09-14 14:38 ` sashiko-bot [this message]
2026-09-14 14:30 ` [PATCH v4 2/3] module: fix up documentation for add_taint() and add_taint_module() Greg Kroah-Hartman
2026-09-14 14:42 ` Bradley Morgan
2026-09-18 15:44 ` Aaron Tomlin
2026-09-14 14:30 ` [PATCH v4 3/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-09-14 14:43 ` sashiko-bot
2026-09-18 16:39 ` [PATCH v4 0/3] " Danilo Krummrich
2026-09-18 17:25 ` Greg Kroah-Hartman
2026-09-18 17:29 ` Bradley Morgan
2026-09-22 7:39 ` Uwe Kleine-König
2026-09-22 13:40 ` David Lechner
2026-09-22 21:04 ` Armin Wolf
2026-09-23 6:29 ` Uwe Kleine-König
2026-09-23 9:27 ` Greg Kroah-Hartman
2026-09-23 9:54 ` Uwe Kleine-König
2026-09-23 10:29 ` Greg Kroah-Hartman
2026-09-23 20:52 ` Armin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260914143807.5895E1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox