Re: [BUG] fs/btrfs: KASAN "args" initialization gripe in btrfs_ioctl_get_csums()
From: David Sterba
Date: Mon Jul 20 2026 - 07:11:30 EST
On Tue, Jul 14, 2026 at 03:38:43PM -0700, Paul E. McKenney wrote:
> > > Fix (or at least suppress) this by initializing "args" to "{ 0 }".
> >
> > This is a little weird, as @args is immediately written with
> > copy_from_user().
>
> I was wondering about that myself. Perhaps it refuses to assume that
> the entirety of args is overwritten?
>
> > So I'd say this may be specific to certain compiler version.
> > Mind to provide the name and version of the compiler?
>
> gcc version 11.5.0 20240719 (Red Hat 11.5.0-14) (GCC)
The 'maybe-uninitialized' warning occasionaly catches some arch and
compiler combination that does not recognize the effects of
initialization. The versions I see in fs/btrfs log are 10.2,
loongarch64-gcc 12.3.1, gcc8 on m68k or mips, gcc 5 on ppc. Eventually
reported when -Os is enabled.