Re: io_uring: should IORING_TIMEOUT_ABS honour the submitter's time namespace?
From: Jens Axboe
Date: Mon May 04 2026 - 03:36:16 EST
On 5/4/26 1:23 AM, Xie Maoyi wrote:
> On 5/3/26, Jens Axboe wrote:
>> Might make sense to refactor a helper that does the time translation,
>> and then patch 1 would basically be Pavel's fix and patch 2 would be
>> sorting out the io_cqring_wait() translation as well. Both should be
>> able to use the refactored helper.
>
> Understood. I will prepare a 2-patch series along those lines:
>
> 1/2 io_uring: introduce io_timens_to_host_ktime() helper and apply
> it in IORING_OP_TIMEOUT / IORING_OP_LINK_TIMEOUT (= Pavel's
> fix for io_parse_user_time).
>
> 2/2 io_uring: route io_uring_enter()'s IORING_ENTER_ABS_TIMER path
> through the same helper (covers io_uring/wait.c around the
> ext_arg->ts parse).
Sounds good.
> Could you point me at the right base to develop on top of? Pavel's
> draft uses io_parse_user_time which is not in v7.0 mainline, so I
> assume the target is one of the io_uring trees (for-next?). I will
> also re-run the SQPOLL and ABS_TIMER reproducers against the
> series before sending.
Right, that helper landed in 7.1-rc, it's not in 7.0. Use my
io_uring-7.1 branch and we can land this in 7.1, and then for the stable
backports we just pull in the helper that you already have in 7.1. By
definition, work can only go into the currently open branch, which is
7.1. Anything else has to be stable backports.
--
Jens Axboe