From: Greg KH <gregkh@linuxfoundation.org>
To: harshal24-chavan <harshal24.chavan@gmail.com>
Cc: io-uring@vger.kernel.org, axboe@kernel.dk, krisman@kernel.org,
kees@kernel.org, gustavoars@kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] io_uring/register: add IORING_REGISTER_CLONE_FILES opcode
Date: Fri, 19 Jun 2026 09:54:23 +0200 [thread overview]
Message-ID: <2026061902-clerk-common-4c84@gregkh> (raw)
In-Reply-To: <20260619065700.12465-1-harshal24.chavan@gmail.com>
On Fri, Jun 19, 2026 at 12:27:00PM +0530, harshal24-chavan wrote:
> Currently, if an application wants to duplicate registered file
> descriptors from one io_uring instance to another, it must manually
> unregister and re-register them, incurring unnecessary overhead.
>
> Add IORING_REGISTER_CLONE_FILES to allow direct cloning of the file
> table from a source ring to a destination ring. This implementation
> strictly mirrors the io_clone_buffers UAPI, supporting partial offsets
> and the IORING_REGISTER_DST_REPLACE flag.
>
> To ensure lock synchronization safety, destination nodes are strictly
> allocated as new, private io_rsrc_nodes rather than sharing references
> across rings.
>
> ---
> v3:
> - Rewrote the cloning loop to allocate private destination nodes via io_rsrc_node_alloc to fix non-atomic ref lock synchronization (Jens).
> - Maintained partial offset/copy support to mirror io_clone_buffers UAPI (Jens).
> - Gated the replacement free check on ctx->file_table.data.nr (Gabriel).
> - Prevented self-cloning by checking ctx == src_ctx (Gabriel).
> - Removed submitter_task check to allow cross-thread pooling setups (Gabriel).
> v2: Dropped unrelated whitespace formatting changes from v1
>
> Signed-off-by: harshal24-chavan <harshal24.chavan@gmail.com>
Needs to be a name, not an email alias, and above the --- line.
thanks,
greg k-h
next prev parent reply other threads:[~2026-06-19 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 6:57 [PATCH v3] io_uring/register: add IORING_REGISTER_CLONE_FILES opcode harshal24-chavan
2026-06-19 7:54 ` Greg KH [this message]
2026-06-19 8:37 ` Harshal Chavan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026061902-clerk-common-4c84@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=axboe@kernel.dk \
--cc=gustavoars@kernel.org \
--cc=harshal24.chavan@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=kees@kernel.org \
--cc=krisman@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox