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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 08 Mar 2023 15:54:36 +0000
From:   David Howells <dhowells@...hat.com>
To:     Miklos Szeredi <miklos@...redi.hu>
Cc:     dhowells@...hat.com, Jens Axboe <axboe@...nel.dk>,
        Al Viro <viro@...iv.linux.org.uk>,
        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>,
        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>,
        linux-unionfs@...r.kernel.org
Subject: Re: [PATCH v16 03/13] overlayfs: Implement splice-read

Miklos Szeredi <miklos@...redi.hu> wrote:

> > +       ret = -EINVAL;
> > +       if (!real.file->f_op->splice_read)
> > +               goto out_fdput;
> > +
> > +       ret = rw_verify_area(READ, real.file, ppos, len);
> > +       if (unlikely(ret < 0))
> > +               goto out_fdput;
> > +
> > +       old_cred = ovl_override_creds(file_inode(in)->i_sb);
> > +       ret = real.file->f_op->splice_read(real.file, ppos, pipe, len, flags);
> 
> I don't think you replied to my suggestion of using a helper here.
> E.g. it could be as simple as exporting do_splice_to(), or renaming it
> to vfs_splice_read() to be more readable.  It would remove the
> boilerplate and be more robust if any changes are done to the splice
> reading code.

Using do_splice_to() as a helper is probably a good idea, though both Willy
and Christoph seem to dislike it.

The pipe occupancy check has already been done, so I'm not sure if it should
be repeated - though it probably wouldn't hurt.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ