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
| ||
|
Message-ID: <844305.1703000788@warthog.procyon.org.uk> Date: Tue, 19 Dec 2023 15:46:28 +0000 From: David Howells <dhowells@...hat.com> To: Jeff Layton <jlayton@...nel.org> Cc: dhowells@...hat.com, Steve French <smfrench@...il.com>, Matthew Wilcox <willy@...radead.org>, Marc Dionne <marc.dionne@...istor.com>, Paulo Alcantara <pc@...guebit.com>, Shyam Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>, Dominique Martinet <asmadeus@...ewreck.org>, Eric Van Hensbergen <ericvh@...nel.org>, Ilya Dryomov <idryomov@...il.com>, Christian Brauner <christian@...uner.io>, linux-cachefs@...hat.com, 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-fsdevel@...r.kernel.org, linux-mm@...ck.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v4 28/39] netfs: Implement support for unbuffered/DIO read Jeff Layton <jlayton@...nel.org> wrote: > > +static int netfs_copy_xarray_to_iter(struct netfs_io_request *rreq, > > + struct xarray *xa, struct iov_iter *dst, > > + unsigned long long start, size_t avail) > ... > > + xas_for_each(&xas, folio, ULONG_MAX) { > > + size_t offset; > > + > > + if (xas_retry(&xas, folio)) > > + continue; > > + > > + /* There shouldn't be a need to call xas_pause() as no one else > > + * should be modifying the xarray we're iterating over. > > + * Really, we only need the RCU readlock to keep lockdep happy > > + * inside xas_for_each(). > > + */ > > + rcu_read_unlock(); > > + > > Are you sure it's still safe to access "folio" once you've dropped the > rcu_read_lock? I wonder if you need to take a reference or something. > > I guess if this is a "private" xarray then nothing should be modifying > it? It is a private xarray in this case. The only reason I need the RCU read lock is because the xarray code will complain if we're not holding it:-/. Actually, I can probably excise the bounce buffer code for this series as nothing in 9p or afs currently uses it. It's needed for content crypto - so ceph will need it. David
Powered by blists - more mailing lists