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] [day] [month] [year] [list]
Message-ID: <1743687869.3572880.1467123830368.JavaMail.zimbra@redhat.com>
Date:	Tue, 28 Jun 2016 10:23:50 -0400 (EDT)
From:	Abhijith Das <adas@...hat.com>
To:	cluster-devel@...hat.com, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Cc:	Miklos Szeredi <mszeredi@...hat.com>, Jens Axboe <axboe@...com>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] fs: Do not check for valid page->mapping in
 page_cache_pipe_buf_confirm

----- Original Message -----
> From: "Abhi Das" <adas@...hat.com>
> To: cluster-devel@...hat.com, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
> Cc: "Abhi Das" <adas@...hat.com>, "Miklos Szeredi" <mszeredi@...hat.com>, "Jens Axboe" <axboe@...com>, "Al Viro"
> <viro@...iv.linux.org.uk>
> Sent: Wednesday, May 25, 2016 10:24:45 PM
> Subject: [PATCH] fs: Do not check for valid page->mapping in page_cache_pipe_buf_confirm
> 
> If the page is truncated after being spliced into the pipe, it's
> probably not invalid.
> 
> For filesystems that invalidate pages, we used to return -ENODATA
> even though the data is there, it's just possibly different from
> what was spliced into the pipe. We shouldn't have to throw away
> the buffer or return error in this case.
> 
> Signed-off-by: Abhi Das <adas@...hat.com>
> CC: Miklos Szeredi <mszeredi@...hat.com>
> CC: Jens Axboe <axboe@...com>
> CC: Al Viro <viro@...iv.linux.org.uk>
> ---
>  fs/splice.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/fs/splice.c b/fs/splice.c
> index dd9bf7e..b9899b99 100644
> --- a/fs/splice.c
> +++ b/fs/splice.c
> @@ -106,15 +106,6 @@ static int page_cache_pipe_buf_confirm(struct
> pipe_inode_info *pipe,
>  		lock_page(page);
>  
>  		/*
> -		 * Page got truncated/unhashed. This will cause a 0-byte
> -		 * splice, if this is the first page.
> -		 */
> -		if (!page->mapping) {
> -			err = -ENODATA;
> -			goto error;
> -		}
> -
> -		/*
>  		 * Uh oh, read-error from disk.
>  		 */
>  		if (!PageUptodate(page)) {
> --
> 2.4.3
> 
> 

Hi Jens/Al,

Any comments on this patch? FWIW, I've done some testing on GFS2 w/ this patch
and it seems to be holding up ok. The test is designed to verify writes using
splice reads and even if the pages were truncated, the data read in from the
spliced pipe looks consistent with what was expected.

Cheers!
--Abhi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ