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: <CAOQ4uxjySyTMRQDuFDsA1XVK210K+8CHh3LoSU2zYynh5OyF_w@mail.gmail.com>
Date: Fri, 23 Aug 2024 11:19:09 +0200
From: Amir Goldstein <amir73il@...il.com>
To: ed.tsai@...iatek.com, Christian Brauner <brauner@...nel.org>
Cc: Matthew Wilcox <willy@...radead.org>, Miklos Szeredi <miklos@...redi.hu>, 
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, 
	Matthias Brugger <matthias.bgg@...il.com>, 
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, chun-hung.wu@...iatek.com, 
	linux-fsdevel@...r.kernel.org, linux-unionfs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 1/1] backing-file: convert to using fops->splice_write

Christian,

Would you mind picking up this fix via the vfs tree?
The reason that the Fixes tag points to fuse passthrough patch is twofold:

1. fuse passthrough is a new user of backing_file_splice_write() which
    can have a fuse or overlayfs backing file with custom ->splice_write()
2. overlayfs can have a backing upper file which is a fuse passthrough
    file with a custom ->splice_write()

Thanks,
Amir.

On Mon, Jul 8, 2024 at 9:23 AM <ed.tsai@...iatek.com> wrote:
>
> From: Ed Tsai <ed.tsai@...iatek.com>
>
> Filesystems may define their own splice write. Therefore, use the file
> fops instead of invoking iter_file_splice_write() directly.
>

Fixes: 5ca73468612d ("fuse: implement splice read/write passthrough")
Reviewed-by: Amir Goldstein <amir73il@...il.com>

> Signed-off-by: Ed Tsai <ed.tsai@...iatek.com>
> ---
>  fs/backing-file.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/backing-file.c b/fs/backing-file.c
> index afb557446c27..8860dac58c37 100644
> --- a/fs/backing-file.c
> +++ b/fs/backing-file.c
> @@ -303,13 +303,16 @@ ssize_t backing_file_splice_write(struct pipe_inode_info *pipe,
>         if (WARN_ON_ONCE(!(out->f_mode & FMODE_BACKING)))
>                 return -EIO;
>
> +       if (!out->f_op->splice_write)
> +               return -EINVAL;
> +
>         ret = file_remove_privs(ctx->user_file);
>         if (ret)
>                 return ret;
>
>         old_cred = override_creds(ctx->cred);
>         file_start_write(out);
> -       ret = iter_file_splice_write(pipe, out, ppos, len, flags);
> +       ret = out->f_op->splice_write(pipe, out, ppos, len, flags);
>         file_end_write(out);
>         revert_creds(old_cred);
>
> --
> 2.18.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ