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: <16ac38b7-6a3a-9f18-b8fa-ca3bfe053504@linux.alibaba.com>
Date:   Fri, 28 Jan 2022 16:48:07 +0800
From:   Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: remove duplicate permission checks in do_sendfile()

ping.

Thanks.

On 11/30/21 4:02 PM, Tianjia Zhang wrote:
> The permission check for out.file is mainly performed in the function
> rw_verify_area(), and this check is called twice in the function
> do_splice_direct() and before calling do_splice_direct(). This is a
> redundant check and it is necessary to remove.
> 
> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
> ---
>   fs/read_write.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/fs/read_write.c b/fs/read_write.c
> index 0074afa7ecb3..bc7c3fcc3400 100644
> --- a/fs/read_write.c
> +++ b/fs/read_write.c
> @@ -1238,9 +1238,6 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
>   #endif
>   	opipe = get_pipe_info(out.file, true);
>   	if (!opipe) {
> -		retval = rw_verify_area(WRITE, out.file, &out_pos, count);
> -		if (retval < 0)
> -			goto fput_out;
>   		file_start_write(out.file);
>   		retval = do_splice_direct(in.file, &pos, out.file, &out_pos,
>   					  count, fl);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ