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: <20250620154743.GY4037@twin.jikos.cz>
Date: Fri, 20 Jun 2025 17:47:43 +0200
From: David Sterba <dsterba@...e.cz>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
	David Sterba <dsterba@...e.com>, Jens Axboe <axboe@...nel.dk>,
	Mark Harmstone <maharmstone@...com>, linux-btrfs@...r.kernel.org,
	io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] io_uring/btrfs: remove struct io_uring_cmd_data

On Thu, Jun 19, 2025 at 01:27:44PM -0600, Caleb Sander Mateos wrote:
> btrfs's ->uring_cmd() implementations are the only ones using io_uring_cmd_data
> to store data that lasts for the lifetime of the uring_cmd. But all uring_cmds
> have to pay the memory and CPU cost of initializing this field and freeing the
> pointer if necessary when the uring_cmd ends. There is already a pdu field in
> struct io_uring_cmd that ->uring_cmd() implementations can use for storage. The
> only benefit of op_data seems to be that io_uring initializes it, so
> ->uring_cmd() can read it to tell if there was a previous call to ->uring_cmd().
> 
> Introduce a flag IORING_URING_CMD_REISSUE that ->uring_cmd() implementations can
> use to tell if this is the first call to ->uring_cmd() or a reissue of the
> uring_cmd. Switch btrfs to use the pdu storage for its btrfs_uring_encoded_data.
> If IORING_URING_CMD_REISSUE is unset, allocate a new btrfs_uring_encoded_data.
> If it's set, use the existing one in op_data. Free the btrfs_uring_encoded_data
> in the btrfs layer instead of relying on io_uring to free op_data. Finally,
> remove io_uring_cmd_data since it's now unused.
> 
> Caleb Sander Mateos (4):
>   btrfs/ioctl: don't skip accounting in early ENOTTY return
>   io_uring/cmd: introduce IORING_URING_CMD_REISSUE flag
>   btrfs/ioctl: store btrfs_uring_encoded_data in io_btrfs_cmd
>   io_uring/cmd: remove struct io_uring_cmd_data

The first patch is a fix so it can be put to a -rc queue.

The rest change the io_uring logic, so it's not up to me, but regarding
how to merge them either via btrfs or io_uring tree work for me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ