All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] Add TAINT_DRIVER_OVERRIDE for usage of driver_override
Date: Fri, 25 Sep 2026 18:27:49 +0000	[thread overview]
Message-ID: <20260925182750.456D31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925182041.1025371-2-u.kleine-koenig@baylibre.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] bus: undeclared variable 'drv' breaks build in driver_override_store()
- [Low] docs: off-by-one error in tainted-kernels.rst loop bound
--

commit 2d672f63b60203b8c528977d9c5848655d98a583
Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

    Add TAINT_DRIVER_OVERRIDE for usage of driver_override
    
    Commit fcbfaffee51a ("driver core: add TAINT_FORCED_BIND for when
    userspace manually messes with devices and drivers") introduced a taint
    for usage of bind/unbind sysfs files that manually trigger driver probe
    and remove respectively.

> diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
> index abbf5e3dd7495..75750a9533e98 100644
> --- a/Documentation/admin-guide/tainted-kernels.rst
> +++ b/Documentation/admin-guide/tainted-kernels.rst
> @@ -74,7 +74,7 @@ a particular type of taint. It's best to leave that to the aforementioned
>  script, but if you need something quick you can use this shell command to check
>  which bits are set::
>  
> -	$ for i in $(seq 20); do echo $(($i-1)) $(($(cat /proc/sys/kernel/tainted)>>($i-1)&1));done
> +	$ for i in $(seq 21); do echo $(($i-1)) $(($(cat /proc/sys/kernel/tainted)>>($i-1)&1));done

[Severity: Low]
Will this script snippet fail to report the newly added bit 21? 

The loop bound `seq 21` generates numbers 1 through 21, which maps to indices
0 through 20 via `$i-1`. This appears to miss the new TAINT_DRIVER_OVERRIDE
bit.

[ ... ]

> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index c51ad96d4de4b..6e91210aab452 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -513,6 +513,7 @@ static ssize_t driver_override_store(struct device *dev,
>  {
>  	int ret;
>  
> +	add_taint_module(drv->owner, TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);

[Severity: Low]
Are we referencing an undeclared variable `drv` here? 

The signature of driver_override_store() only takes `dev`, `attr`, `buf`,
and `count`, so this causes a compilation failure when building bus.c.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260925182041.1025371-2-u.kleine-koenig@baylibre.com?part=1

  reply	other threads:[~2026-09-25 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 18:20 [PATCH] Add TAINT_DRIVER_OVERRIDE for usage of driver_override Uwe Kleine-König
2026-09-25 18:27 ` sashiko-bot [this message]
2026-09-25 18:42 ` Bradley Morgan
2026-09-25 18:59 ` Armin Wolf
2026-09-25 20:28 ` Uwe Kleine-König
2026-09-25 20:30   ` 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=20260925182750.456D31F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=u.kleine-koenig@baylibre.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.