* [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
@ 2025-02-24 17:23 Caleb Sander Mateos
2025-02-24 17:44 ` Jens Axboe
2025-02-24 19:11 ` Jens Axboe
0 siblings, 2 replies; 7+ messages in thread
From: Caleb Sander Mateos @ 2025-02-24 17:23 UTC (permalink / raw)
To: Jens Axboe, Pavel Begunkov; +Cc: Caleb Sander Mateos, io-uring, linux-kernel
io_is_compat() is already defined to return false if CONFIG_COMPAT is
disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
compiler optimize out the dead code when CONFIG_COMPAT is disabled.
Signed-off-by: Caleb Sander Mateos <[email protected]>
---
io_uring/waitid.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/io_uring/waitid.c b/io_uring/waitid.c
index 4034b7e3026f..54e69984cd8a 100644
--- a/io_uring/waitid.c
+++ b/io_uring/waitid.c
@@ -40,11 +40,10 @@ static void io_waitid_free(struct io_kiocb *req)
kfree(req->async_data);
req->async_data = NULL;
req->flags &= ~REQ_F_ASYNC_DATA;
}
-#ifdef CONFIG_COMPAT
static bool io_waitid_compat_copy_si(struct io_waitid *iw, int signo)
{
struct compat_siginfo __user *infop;
bool ret;
@@ -65,24 +64,21 @@ static bool io_waitid_compat_copy_si(struct io_waitid *iw, int signo)
return ret;
Efault:
ret = false;
goto done;
}
-#endif
static bool io_waitid_copy_si(struct io_kiocb *req, int signo)
{
struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid);
bool ret;
if (!iw->infop)
return true;
-#ifdef CONFIG_COMPAT
if (io_is_compat(req->ctx))
return io_waitid_compat_copy_si(iw, signo);
-#endif
if (!user_write_access_begin(iw->infop, sizeof(*iw->infop)))
return false;
unsafe_put_user(signo, &iw->infop->si_signo, Efault);
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 17:23 [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT Caleb Sander Mateos
@ 2025-02-24 17:44 ` Jens Axboe
2025-02-24 17:53 ` Caleb Sander Mateos
2025-02-24 19:11 ` Jens Axboe
1 sibling, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2025-02-24 17:44 UTC (permalink / raw)
To: Caleb Sander Mateos, Pavel Begunkov; +Cc: io-uring, linux-kernel
On 2/24/25 10:23 AM, Caleb Sander Mateos wrote:
> io_is_compat() is already defined to return false if CONFIG_COMPAT is
> disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
> compiler optimize out the dead code when CONFIG_COMPAT is disabled.
Would you mind if I fold this into Pavel's patch? I can keep it
standalone too, just let me know.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 17:44 ` Jens Axboe
@ 2025-02-24 17:53 ` Caleb Sander Mateos
2025-02-24 17:55 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Caleb Sander Mateos @ 2025-02-24 17:53 UTC (permalink / raw)
To: Jens Axboe; +Cc: Pavel Begunkov, io-uring, linux-kernel
On Mon, Feb 24, 2025 at 9:44 AM Jens Axboe <[email protected]> wrote:
>
> On 2/24/25 10:23 AM, Caleb Sander Mateos wrote:
> > io_is_compat() is already defined to return false if CONFIG_COMPAT is
> > disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
> > compiler optimize out the dead code when CONFIG_COMPAT is disabled.
>
> Would you mind if I fold this into Pavel's patch? I can keep it
> standalone too, just let me know.
Fine by me, though I thought Pavel was suggesting keeping it separate:
https://lore.kernel.org/io-uring/[email protected]/T/#u
Thanks,
Caleb
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 17:53 ` Caleb Sander Mateos
@ 2025-02-24 17:55 ` Jens Axboe
2025-02-24 19:10 ` Pavel Begunkov
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2025-02-24 17:55 UTC (permalink / raw)
To: Caleb Sander Mateos; +Cc: Pavel Begunkov, io-uring, linux-kernel
On 2/24/25 10:53 AM, Caleb Sander Mateos wrote:
> On Mon, Feb 24, 2025 at 9:44 AM Jens Axboe <[email protected]> wrote:
>>
>> On 2/24/25 10:23 AM, Caleb Sander Mateos wrote:
>>> io_is_compat() is already defined to return false if CONFIG_COMPAT is
>>> disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
>>> compiler optimize out the dead code when CONFIG_COMPAT is disabled.
>>
>> Would you mind if I fold this into Pavel's patch? I can keep it
>> standalone too, just let me know.
>
> Fine by me, though I thought Pavel was suggesting keeping it separate:
> https://lore.kernel.org/io-uring/[email protected]/T/#u
I'm reading it as he has other stuff that will go on top. I don't see
any reason to double stage this part, might as well remove the
CONFIG dependency at the same time, if it's doable.
Pavel?
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 17:55 ` Jens Axboe
@ 2025-02-24 19:10 ` Pavel Begunkov
2025-02-24 19:10 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Begunkov @ 2025-02-24 19:10 UTC (permalink / raw)
To: Jens Axboe, Caleb Sander Mateos; +Cc: io-uring, linux-kernel
On 2/24/25 17:55, Jens Axboe wrote:
> On 2/24/25 10:53 AM, Caleb Sander Mateos wrote:
>> On Mon, Feb 24, 2025 at 9:44 AM Jens Axboe <[email protected]> wrote:
>>>
>>> On 2/24/25 10:23 AM, Caleb Sander Mateos wrote:
>>>> io_is_compat() is already defined to return false if CONFIG_COMPAT is
>>>> disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
>>>> compiler optimize out the dead code when CONFIG_COMPAT is disabled.
>>>
>>> Would you mind if I fold this into Pavel's patch? I can keep it
>>> standalone too, just let me know.
>>
>> Fine by me, though I thought Pavel was suggesting keeping it separate:
>> https://lore.kernel.org/io-uring/[email protected]/T/#u
>
> I'm reading it as he has other stuff that will go on top. I don't see
> any reason to double stage this part, might as well remove the
> CONFIG dependency at the same time, if it's doable.
>
> Pavel?
I'm not sure why you'd want that, but I don't mind
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 19:10 ` Pavel Begunkov
@ 2025-02-24 19:10 ` Jens Axboe
0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2025-02-24 19:10 UTC (permalink / raw)
To: Pavel Begunkov, Caleb Sander Mateos; +Cc: io-uring, linux-kernel
On 2/24/25 12:10 PM, Pavel Begunkov wrote:
> On 2/24/25 17:55, Jens Axboe wrote:
>> On 2/24/25 10:53 AM, Caleb Sander Mateos wrote:
>>> On Mon, Feb 24, 2025 at 9:44?AM Jens Axboe <[email protected]> wrote:
>>>>
>>>> On 2/24/25 10:23 AM, Caleb Sander Mateos wrote:
>>>>> io_is_compat() is already defined to return false if CONFIG_COMPAT is
>>>>> disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
>>>>> compiler optimize out the dead code when CONFIG_COMPAT is disabled.
>>>>
>>>> Would you mind if I fold this into Pavel's patch? I can keep it
>>>> standalone too, just let me know.
>>>
>>> Fine by me, though I thought Pavel was suggesting keeping it separate:
>>> https://lore.kernel.org/io-uring/[email protected]/T/#u
>>
>> I'm reading it as he has other stuff that will go on top. I don't see
>> any reason to double stage this part, might as well remove the
>> CONFIG dependency at the same time, if it's doable.
>>
>> Pavel?
>
> I'm not sure why you'd want that, but I don't mind
Just because it imho should've been in the initial commit, so I'd
consider it more of a fixup commit. But if you're fine with it, I'll
fold it in with a note.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT
2025-02-24 17:23 [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT Caleb Sander Mateos
2025-02-24 17:44 ` Jens Axboe
@ 2025-02-24 19:11 ` Jens Axboe
1 sibling, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2025-02-24 19:11 UTC (permalink / raw)
To: Pavel Begunkov, Caleb Sander Mateos; +Cc: io-uring, linux-kernel
On Mon, 24 Feb 2025 10:23:36 -0700, Caleb Sander Mateos wrote:
> io_is_compat() is already defined to return false if CONFIG_COMPAT is
> disabled. So remove the additional #ifdef CONFIG_COMPAT guards. Let the
> compiler optimize out the dead code when CONFIG_COMPAT is disabled.
>
>
Applied, thanks!
[1/1] io_uring/waitid: remove #ifdef CONFIG_COMPAT
commit: 0cd64345c4ba127d27fa07a133d108ea92d38361
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-24 19:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 17:23 [PATCH] io_uring/waitid: remove #ifdef CONFIG_COMPAT Caleb Sander Mateos
2025-02-24 17:44 ` Jens Axboe
2025-02-24 17:53 ` Caleb Sander Mateos
2025-02-24 17:55 ` Jens Axboe
2025-02-24 19:10 ` Pavel Begunkov
2025-02-24 19:10 ` Jens Axboe
2025-02-24 19:11 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox