Re: io_uring: should IORING_TIMEOUT_ABS honour the submitter's time namespace?

From: Pavel Begunkov

Date: Mon May 04 2026 - 03:48:37 EST


On 5/4/26 07:06, Jens Axboe wrote:
While verifying SQPOLL, I also noticed io_uring/wait.c around lines
230-234. The IORING_ENTER_ABS_TIMER path on io_uring_enter() parses
ext_arg->ts inline rather than going through io_parse_user_time, so it
does not pick up your fix. Same shape of bug, separate code path. PoC
on vanilla shows elapsed = 1 ms, patched shows ~1000 ms. I can send
the small follow-up patch for that path as a separate thread once your
IORING_OP_TIMEOUT side has landed, or fold it into the same series.
Whichever you prefer.

Yeah, I noticed that as well

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.

Unless there is some more unification b/w cq wait and timeout requests,
it'll very likely be cleaner to have two timens_ktime_to_host() call
sites, but I haven't taken a look

--
Pavel Begunkov