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: <20240220-autoteile-enthoben-a9a16739b2b9@brauner>
Date: Tue, 20 Feb 2024 10:51:26 +0100
From: Christian Brauner <brauner@...nel.org>
To: Linux regressions mailing list <regressions@...ts.linux.dev>
Cc: David Howells <dhowells@...hat.com>, 
	Christian Brauner <christian@...uner.io>, Eric Van Hensbergen <ericvh@...nel.org>, 
	Dominique Martinet <asmadeus@...ewreck.org>, Jeff Layton <jlayton@...nel.org>, 
	Matthew Wilcox <willy@...radead.org>, netfs@...ts.linux.dev, linux-afs@...ts.infradead.org, 
	linux-cifs@...r.kernel.org, linux-nfs@...r.kernel.org, ceph-devel@...r.kernel.org, 
	v9fs@...ts.linux.dev, linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org, linux_oss@...debyte.com
Subject: Re: [PATCH 2/2] netfs: Fix missing zero-length check in unbuffered
 write

On Mon, Feb 19, 2024 at 09:38:33AM +0100, Linux regression tracking (Thorsten Leemhuis) wrote:
> On 29.01.24 10:49, David Howells wrote:
> > Fix netfs_unbuffered_write_iter() to return immediately if
> > generic_write_checks() returns 0, indicating there's nothing to write.
> > Note that netfs_file_write_iter() already does this.
> > 
> > Also, whilst we're at it, put in checks for the size being zero before we
> > even take the locks.  Note that generic_write_checks() can still reduce the
> > size to zero, so we still need that check.
> > 
> > Without this, a warning similar to the following is logged to dmesg:
> > 
> > 	netfs: Zero-sized write [R=1b6da]
> > 
> > and the syscall fails with EIO, e.g.:
> > 
> > 	/sbin/ldconfig.real: Writing of cache extension data failed: Input/output error
> > 
> > This can be reproduced on 9p by:
> > 
> > 	xfs_io -f -c 'pwrite 0 0' /xfstest.test/foo
> > 
> > Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support")
> > Reported-by: Eric Van Hensbergen <ericvh@...nel.org>
> > Link: https://lore.kernel.org/r/ZbQUU6QKmIftKsmo@FV7GG9FTHL/
> 
> David, thx for fixing Eric's regression, which I'm tracking.
> 
> Christian, just wondering: that patch afaics is sitting in vfs.netfs for
> about three weeks now -- is that intentional or did it maybe fell
> through the cracks somehow?

I've moved it to vfs.fixes now and will send later this week. Thanks for
the reminder!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ