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: <Z-VvkDUUWLSqJ1tM@sidongui-MacBookPro.local>
Date: Fri, 28 Mar 2025 00:32:32 +0900
From: Sidong Yang <sidong.yang@...iosa.ai>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
	Mark Harmstone <maharmstone@...com>, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH 6.14] btrfs: ioctl: error on fixed buffer flag for
 io-uring cmd

On Thu, Mar 27, 2025 at 02:58:11PM +0000, Pavel Begunkov wrote:
> On 3/26/25 15:57, Sidong Yang wrote:
> > Currently, the io-uring fixed buffer cmd flag is silently dismissed,
> > even though it does not work. This patch returns an error when the flag
> > is set, making it clear that operation is not supported.
> 
> IIRC, the feature where you use the flag hasn't been merged
> yet and is targeting 6.16. In this case you need to send this
> patch for 6.15, and once merged stable will try to pick it up
> from there.

Thanks, I mistakenly thought the feature would be merged in 6.15. If so,
I need send this for 6.15 after sending the patch for the fixed buffer feature.

> 
> > Fixes: 34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Sidong Yang <sidong.yang@...iosa.ai>
> > ---
> >   fs/btrfs/ioctl.c | 11 +++++++++++
> >   1 file changed, 11 insertions(+)
> > 
> > diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> > index 6c18bad53cd3..62bb9e11e8d6 100644
> > --- a/fs/btrfs/ioctl.c
> > +++ b/fs/btrfs/ioctl.c
> > @@ -4823,6 +4823,12 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
> >   		ret = -EPERM;
> >   		goto out_acct;
> >   	}
> > +
> > +	if (cmd->flags & IORING_URING_CMD_FIXED) {
> > +		ret = -EOPNOTSUPP;
> > +		goto out_acct;
> > +	}
> > +
> >   	file = cmd->file;
> >   	inode = BTRFS_I(file->f_inode);
> >   	fs_info = inode->root->fs_info;
> > @@ -4959,6 +4965,11 @@ static int btrfs_uring_encoded_write(struct io_uring_cmd *cmd, unsigned int issu
> >   		goto out_acct;
> >   	}
> > +	if (cmd->flags & IORING_URING_CMD_FIXED) {
> > +		ret = -EOPNOTSUPP;
> > +		goto out_acct;
> > +	}
> > +
> >   	file = cmd->file;
> >   	sqe_addr = u64_to_user_ptr(READ_ONCE(cmd->sqe->addr));
> 
> -- 
> Pavel Begunkov
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ