From: sashiko-bot@kernel.org
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
Date: Mon, 31 Aug 2026 11:07:51 +0000 [thread overview]
Message-ID: <20260831110751.D43E71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260831-bind_taint-v2-2-1082d631213b@linuxfoundation.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Syntax error in the !CONFIG_MODULES fallback stub of add_taint_module() causes a hard build failure.
--
commit 14dacce69702c442db10ec87f486fae504b3514f
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
This commit adds a new taint flag, TAINT_FORCED_BIND, which is set whenever
userspace binds or unbinds a driver via sysfs. This helps developers identify
when fuzzing tools or userspace have forcefully reassigned devices.
> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index d17bd91490ee4..c51ad96d4de4b 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
[ ... ]
> @@ -241,6 +242,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
>
> dev = bus_find_device_by_name(bus, NULL, buf);
> if (dev && dev->driver == drv) {
> + add_taint_module(drv->owner, TAINT_FORCED_BIND, LOCKDEP_STILL_OK);
[Severity: Low]
Does this call break the build when CONFIG_MODULES is disabled?
Looking at the fallback stub in include/linux/module.h for !CONFIG_MODULES,
there is a syntax error in the parameter list (an extra comma instead of a
space):
static inline void add_taint_module(struct module *mod, unsigned flag,
enum lockdep_ok, lockdep_ok)
{
add_taint(flag, lockdep_ok);
}
Using add_taint_module() here exposes this syntax error, which causes a hard
build failure when compiling without module support.
> device_driver_detach(dev);
> err = count;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831-bind_taint-v2-0-1082d631213b@linuxfoundation.org?part=2
next prev parent reply other threads:[~2026-08-31 11:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 10:51 [PATCH v2 0/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-08-31 10:51 ` [PATCH v2 1/2] module: pull out add_taint_module() to be public Greg Kroah-Hartman
2026-08-31 10:57 ` sashiko-bot
2026-08-31 11:07 ` Greg Kroah-Hartman
2026-08-31 11:14 ` Bradley Morgan
2026-08-31 11:28 ` Greg Kroah-Hartman
2026-08-31 11:38 ` Bradley Morgan
2026-08-31 10:51 ` [PATCH v2 2/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-08-31 11:07 ` sashiko-bot [this message]
2026-08-31 11:47 ` Aaron Tomlin
2026-08-31 11:57 ` [PATCH v2 0/2] " Bradley Morgan
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=20260831110751.D43E71F000E9@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