From: Jens Axboe <axboe@kernel.dk>
To: Arnd Bergmann <arnd@arndb.de>, Christian Brauner <brauner@kernel.org>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] io_uring: add IORING_OP_WAITID support
Date: Fri, 14 Jul 2023 14:14:45 -0600 [thread overview]
Message-ID: <ca82bd8b-5868-8fbb-6701-061220a1ff97@kernel.dk> (raw)
In-Reply-To: <d53ed71a-3f57-4c5e-9117-82535aae7855@app.fastmail.com>
On 7/14/23 12:33?PM, Arnd Bergmann wrote:
> On Fri, Jul 14, 2023, at 17:47, Christian Brauner wrote:
>> On Tue, Jul 11, 2023 at 04:18:13PM -0600, Jens Axboe wrote:
>>> On 7/11/23 3:22?PM, Jens Axboe wrote:
>>>> On 7/11/23 3:11?PM, Arnd Bergmann wrote:
>
>>>>> Does this require argument conversion for compat tasks?
>>>>>
>>>>> Even without the rusage argument, I think the siginfo
>>>>> remains incompatible with 32-bit tasks, unfortunately.
>>>>
>>>> Hmm yes good point, if compat_siginfo and siginfo are different, then it
>>>> does need handling for that. Would be a trivial addition, I'll make that
>>>> change. Thanks Arnd!
>>>
>>> Should be fixed in the current version:
>>>
>>> https://git.kernel.dk/cgit/linux/commit/?h=io_uring-waitid&id=08f3dc9b7cedbd20c0f215f25c9a7814c6c601cc
>>
>> In kernel/signal.c in pidfd_send_signal() we have
>> copy_siginfo_from_user_any() it seems that a similar version
>> copy_siginfo_to_user_any() might be something to consider. We do have
>> copy_siginfo_to_user32() and copy_siginfo_to_user(). But I may lack
>> context why this wouldn't work here.
>
> We could add a copy_siginfo_to_user_any(), but I think open-coding
> it is easier here, since the in_compat_syscall() check does not
> work inside of the io_uring kernel thread, it has to be
> "if (req->ctx->compat)" in order to match the wordsize of the task
> that started the request.
Yeah, unifying this stuff did cross my mind when adding another one.
Which I think could still be done, you'd just need to pass in a 'compat'
parameter similar to how it's done for iovec importing.
But if it's ok with everybody I'd rather do that as a cleanup post this.
> Using copy_siginfo_to_user32() and copy_siginfo_to_user() is
> probably a good idea though, it's often faster and less
> error-prone than writing each member separately.
I was just pattern matching on the other use cases. I'll take a look at
the siginfo copy helpers, thanks!
--
Jens Axboe
next prev parent reply other threads:[~2023-07-14 20:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 20:43 [PATCHSET 0/5] Add io_uring support for waitid Jens Axboe
2023-07-11 20:43 ` [PATCH 1/5] exit: abtract out should_wake helper for child_wait_callback() Jens Axboe
2023-07-14 15:31 ` Christian Brauner
2023-07-11 20:43 ` [PATCH 2/5] exit: move core of do_wait() into helper Jens Axboe
2023-07-14 15:32 ` Christian Brauner
2023-07-11 20:43 ` [PATCH 3/5] exit: add kernel_waitid_prepare() helper Jens Axboe
2023-07-11 20:43 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
2023-07-14 15:38 ` Christian Brauner
2023-07-14 20:16 ` Jens Axboe
2023-07-14 20:21 ` Jens Axboe
2023-07-11 20:43 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-07-11 21:11 ` Arnd Bergmann
2023-07-11 21:22 ` Jens Axboe
2023-07-11 22:18 ` Jens Axboe
2023-07-14 15:47 ` Christian Brauner
2023-07-14 18:33 ` Arnd Bergmann
2023-07-14 20:14 ` Jens Axboe [this message]
2023-07-15 7:12 ` Arnd Bergmann
2023-07-15 14:06 ` Jens Axboe
2023-07-15 14:34 ` Jens Axboe
2023-07-15 20:23 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2023-08-02 23:14 [PATCHSET v2] Add io_uring support for waitid Jens Axboe
2023-08-02 23:14 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-08-09 11:27 ` Christian Brauner
2023-08-09 15:11 ` Jens Axboe
2023-08-11 14:16 [PATCHSET v3 0/5] Add io_uring support for waitid Jens Axboe
2023-08-11 14:16 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-09-09 15:11 [PATCHSET v4 0/5] Add io_uring support for waitid Jens Axboe
2023-09-09 15:11 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
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=ca82bd8b-5868-8fbb-6701-061220a1ff97@kernel.dk \
--to=axboe@kernel.dk \
--cc=arnd@arndb.de \
--cc=brauner@kernel.org \
--cc=io-uring@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.