From: Pavel Begunkov <[email protected]>
To: Anuj gupta <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 1/1] io_uring: compile out compat param passing
Date: Mon, 24 Feb 2025 12:16:28 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACzX3As3UyR3AuQBt=48DSjbzvAQoG18u_O_j0PCNpZWHL-=pQ@mail.gmail.com>
On 2/24/25 02:56, Anuj gupta wrote:
>> #ifdef CONFIG_COMPAT
>> - if (req->ctx->compat)
>> + if (io_is_compat(req->ctx))
>> return io_iov_compat_buffer_select_prep(rw);
>> #endif
>
> Should the #ifdef CONFIG_COMPAT be removed here since io_is_compat() already
> accounts for it?
We can if same is done for io_iov_compat_buffer_select_prep() and
we can prove it doesn't use anything compiled out for !COMPAT (which
seems so).
>> @@ -120,7 +120,7 @@ static int __io_import_iovec(int ddir, struct io_kiocb *req,
>> nr_segs = 1;
>> }
>> ret = __import_iovec(ddir, buf, sqe_len, nr_segs, &iov, &io->iter,
>> - req->ctx->compat);
>> + io_is_compat(req->ctx));
>
> Should we also update other places that use ctx->compat (e.g., rsrc.c, net.c,
> uring_cmd.c) to use the new io_is_compat() helper for consistency?
That would be a wider messier change split in multiple patches, which
I was thinking to avoid. This patch is a good first step, and once
merged future changes can be made independently.
Let me see what I can do, but I don't want touching rsrc.c for now
to avoid unnecessary changes. And then more can be done to get more
code out of ifdef and let the compiler optimise it out.
--
Pavel Begunkov
prev parent reply other threads:[~2025-02-24 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-23 17:43 [PATCH 1/1] io_uring: compile out compat param passing Pavel Begunkov
2025-02-24 2:56 ` Anuj gupta
2025-02-24 12:16 ` Pavel Begunkov [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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