lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5mus-f5y+p16hkaYZWA=fCAiMGT1vpMawbVCZ2EC0K5Pxg@mail.gmail.com>
Date: Thu, 26 Jun 2025 09:07:49 -0500
From: Steve French <smfrench@...il.com>
To: Paulo Alcantara <pc@...guebit.org>
Cc: David Howells <dhowells@...hat.com>, Christian Brauner <brauner@...nel.org>, 
	Steve French <sfrench@...ba.org>, linux-cifs@...r.kernel.org, netfs@...ts.linux.dev, 
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfs: Fix i_size updating

added to for-next pending testing

On Thu, Jun 26, 2025 at 8:39 AM Paulo Alcantara <pc@...guebit.org> wrote:
>
> David Howells <dhowells@...hat.com> writes:
>
> > Fix the updating of i_size, particularly in regard to the completion of DIO
> > writes and especially async DIO writes by using a lock.
> >
> > The bug is triggered occasionally by the generic/207 xfstest as it chucks a
> > bunch of AIO DIO writes at the filesystem and then checks that fstat()
> > returns a reasonable st_size as each completes.
> >
> > The problem is that netfs is trying to do "if new_size > inode->i_size,
> > update inode->i_size" sort of thing but without a lock around it.
> >
> > This can be seen with cifs, but shouldn't be seen with kafs because kafs
> > serialises modification ops on the client whereas cifs sends the requests
> > to the server as they're generated and lets the server order them.
> >
> > Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support")
> > Signed-off-by: David Howells <dhowells@...hat.com>
> > cc: Steve French <sfrench@...ba.org>
> > cc: Paulo Alcantara <pc@...guebit.org>
> > cc: linux-cifs@...r.kernel.org
> > cc: netfs@...ts.linux.dev
> > cc: linux-fsdevel@...r.kernel.org
> > ---
> >  fs/netfs/buffered_write.c |    2 ++
> >  fs/netfs/direct_write.c   |    8 ++++++--
> >  2 files changed, 8 insertions(+), 2 deletions(-)
>
> Reviewed-by: Paulo Alcantara (Red Hat) <pc@...guebit.org>
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ