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:   Tue, 23 May 2023 21:43:14 +0100
From:   David Howells <dhowells@...hat.com>
To:     Damien Le Moal <dlemoal@...nel.org>
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>,
        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>,
        "Darrick J . Wong" <djwong@...nel.org>, linux-xfs@...r.kernel.org
Subject: Re: [PATCH v22 25/31] zonefs: Provide a splice-read wrapper

Damien Le Moal <dlemoal@...nel.org> wrote:

> > +	if (len > 0) {
> > +		ret = filemap_splice_read(in, ppos, pipe, len, flags);
> > +		if (ret == -EIO)
> 
> Is -EIO the only error that filemap_splice_read() may return ? There are other
> IO error codes that we could get from the block layer, e.g. -ETIMEDOUT etc. So
> "if (ret < 0)" may be better here ?

It can return -ENOMEM, -EINTR and -EAGAIN at least, none of which really count
as I/O errors.  I based the splice function on what zonefs_file_read_iter()
does:

	} else {
		ret = generic_file_read_iter(iocb, to);
		if (ret == -EIO)
			zonefs_io_error(inode, false);
	}

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ