Linux driver-core infrastructure
 help / color / mirror / Atom feed
* Re: [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing
       [not found] ` <3cc3e8c6-c6e8-4625-a88f-f5708b935dab@p183>
@ 2026-05-07  9:28   ` Danilo Krummrich
  2026-05-07 13:52     ` Alexey Dobriyan
  0 siblings, 1 reply; 2+ messages in thread
From: Danilo Krummrich @ 2026-05-07  9:28 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-fsdevel, driver-core

(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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing
  2026-05-07  9:28   ` [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing Danilo Krummrich
@ 2026-05-07 13:52     ` Alexey Dobriyan
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Dobriyan @ 2026-05-07 13:52 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-fsdevel, driver-core

On Thu, May 07, 2026 at 11:28:29AM +0200, Danilo Krummrich wrote:
> (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.

Yes. WARN prints enough information to locate the bug, so stale function
name just goes away.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-07 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5f794f46-5afd-405c-9747-76f2c95d4598@p183>
     [not found] ` <3cc3e8c6-c6e8-4625-a88f-f5708b935dab@p183>
2026-05-07  9:28   ` [PATCH] sysfs: upgrade OOB write by buggy .show hook into WARNing Danilo Krummrich
2026-05-07 13:52     ` Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox