From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexey Dobriyan" <adobriyan@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
<linux-fsdevel@vger.kernel.org>, <driver-core@lists.linux.dev>
Subject: Re: [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing
Date: Thu, 07 May 2026 11:28:29 +0200 [thread overview]
Message-ID: <DICC6TIGNBZA.1ZW4SSME21HRF@kernel.org> (raw)
In-Reply-To: <3cc3e8c6-c6e8-4625-a88f-f5708b935dab@p183>
(Cc: driver-core)
On Thu May 7, 2026 at 11:01 AM CEST, Alexey Dobriyan wrote:
> Buggy .show hook will get just 1 line of dmesg:
>
> fill_read_buffer: ext4_attr_show+0x0/0x600 returned bad count
>
> It may or may not oops later in some unrelated process.
>
> But buggy .show hook most likely is corrupting random memory past sysfs
> buffer therefore deserving more. WARN, make it more visible and let
> QA machines panic earlier.
>
> Also, delete useless cast -- "count" is >=0 at this point.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
NIT: This patch also cleans up the stale "fill_read_buffer:" prefix, and instead
points out the actual caller, which could be mentioned in the commit message --
no need to resend for this though.
next parent reply other threads:[~2026-05-07 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5f794f46-5afd-405c-9747-76f2c95d4598@p183>
[not found] ` <3cc3e8c6-c6e8-4625-a88f-f5708b935dab@p183>
2026-05-07 9:28 ` Danilo Krummrich [this message]
2026-05-07 13:52 ` [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing Alexey Dobriyan
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=DICC6TIGNBZA.1ZW4SSME21HRF@kernel.org \
--to=dakr@kernel.org \
--cc=adobriyan@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rafael@kernel.org \
/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