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]
Message-ID: <Y8irne7Dj6H6GIc8@ZenIV>
Date:   Thu, 19 Jan 2023 02:31:57 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     David Howells <dhowells@...hat.com>
Cc:     Christoph Hellwig <hch@....de>,
        Matthew Wilcox <willy@...radead.org>,
        linux-fsdevel@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>,
        Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
        Jeff Layton <jlayton@...nel.org>,
        Logan Gunthorpe <logang@...tatee.com>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 20/34] vfs: Make splice use iov_iter_extract_pages()

On Mon, Jan 16, 2023 at 11:10:25PM +0000, David Howells wrote:

> diff --git a/fs/splice.c b/fs/splice.c
> index 19c5b5adc548..c3433266ba1b 100644
> --- a/fs/splice.c
> +++ b/fs/splice.c
> @@ -1159,14 +1159,18 @@ static int iter_to_pipe(struct iov_iter *from,
>  	size_t total = 0;
>  	int ret = 0;
>  
> +	/* For the moment, all pages attached to a pipe must have refs, not pins. */
> +	if (WARN_ON(iov_iter_extract_mode(from, FOLL_SOURCE_BUF) != FOLL_GET))
> +		return -EIO;

Huh?  WTF does that have to do with pins?  Why would we be pinning the _source_
pages anyway?  We do want them referenced, for obvious reasons (they might be
stuck in the pipe), but that has nothing to do with get vs. pin.

If anything, this is one place where we want the semantics of iov_iter_get_pages...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ