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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Apr 2023 23:22:31 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     David Howells <dhowells@...hat.com>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Christoph Hellwig <hch@...radead.org>,
        Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
        Jeff Layton <jlayton@...nel.org>,
        David Hildenbrand <david@...hat.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        Hillf Danton <hdanton@...a.com>,
        Christian Brauner <brauner@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Christoph Hellwig <hch@....de>,
        John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH v18 09/15] iov_iter: Kill ITER_PIPE

On Tue, Mar 14, 2023 at 10:07:51PM +0000, David Howells wrote:
> The ITER_PIPE-type iterator was only used for generic_file_splice_read(),
> but that has now been switched to either pull pages directly from the
> pagecache for buffered file splice-reads or to use ITER_BVEC instead for
> O_DIRECT file splice-reads.  This leaves ITER_PIPE unused - so remove it.

Wonderful, except that now you've got duplicates of ->read_iter() for
everyone who wants zero-copy on ->splice_read() ;-/

I understand the attraction of arbitrary seeks on those suckers; ITER_PIPE
is a massive headache in that respect.  But I really don't like what your
approach trades it for.

And you are nowhere near done - consider e.g. NFS.  Mainline has it
feed ITER_PIPE to nfs_file_read(), which does call generic_file_read_iter() -
after
        result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);

Sure, you can add nfs_file_splice_read() that would do what nfs_file_read()
does, calling filemap_spice_read() instead of generic_file_read_iter().

Repeat the same for ocfs2 (locking of its own).  And orangefs.  And
XFS (locking, again).  And your own AFS, while we are at it.  Et sodding
cetera - *everything* that uses generic_file_splice_read() with
->read_iter other than generic_file_read_iter() needs review and,
quite likely, a ->splice_read() instance of its own.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ