From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25AF82DEA9B for ; Mon, 4 May 2026 07:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777880084; cv=none; b=EblDcqcj2iLSkZMNeCY/4pt5rMLCC2TvOQNeubcES5rFvQM4S6jDVdUlxpKzRRQHYjcMUND8xDwPN6UaDhO9cDjpbVlIRkol6RQdLXlc3tbQi2zJ0/p/3u+t+Fs8Am+e54tTQPJ0V5N4C4DsQX7VPULQWX7wbO/GLFLz8rEcYyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777880084; c=relaxed/simple; bh=H6egnWjtmRg3Wpu7WIbhUI+AJb/XOyvV8VVR1HJ4rBY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=layEI4mxapDCuJwWRPXnJQMhj2KLD08VUppwiIeYmQgykI9oHAAGUL6WKkqeemoHfR3K14oBYTy1OWc2EGpc81y0jZ8zyp/EfQ0JyqXiPIdIcgxoCEzfmdwjme8lgC+qB9K14KV89V/zYJrPb77UkG5v3Y/CBdLWmOjhAblNJ/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b=i3j/wyBE; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b="i3j/wyBE" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso29878235e9.2 for ; Mon, 04 May 2026 00:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20251104.gappssmtp.com; s=20251104; t=1777880080; x=1778484880; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=T8Am8QvwPOlSf+dSkObzcsYC2FIMD4Og3MRHu3U4LRk=; b=i3j/wyBEIT33FolOHB/7rIOsKtvSQq+YlRrt3k+E9o+hslD02yMlDBsWvIAZE2/DV6 IrnZDQz/BMRek/MXsZL66zzBmfgWMIKSPTjoGuaK0ZG+o1dFR2HA1HW3ZxV1ksLSopwn P3mVK7m809Q+FDxjVdQuAom6mt6t06aV3A3NXaKaJE75uwEL0MdH1nzL7byiihxmMekP U1o5yxX9ok69zwITNctyOkETOPEbHBjTfM6PfILvKdl/6pgDTfo0b5CN8o1QmLaeGof+ Frqkc93XEX1Lc43hSRVvg6YD7mZLDcLCYJ7GyPyLlNK3jgYj7cCU5YFhSskWfbV2zRkt J1cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777880080; x=1778484880; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T8Am8QvwPOlSf+dSkObzcsYC2FIMD4Og3MRHu3U4LRk=; b=Q7WyWraqVBb34YK8Yr00lmhkhzowyUshvU731alrVV6dDUD2f1SAuzTgBgxQKle1B1 kU1RLcVxfUZ66MpkFpMUdJ0/PWHO498BNTSGwhOfgOfkW0YXDDDVNEyZQo3QfK6HZONu I07MPNzsrrFcJOZBH13Pdac8qNLDO7nh3W+2re07yoFlSseVNafJ1nELC61KDMHBc3Pl kZYtdpwEr4x7jZhweI8JspyLL/nCqLNdaHD8NMirCLR5npNPFgqOVjFTQYFkvGzXjK4q QMtj2Qmki+7XQftiYhElQTFpsjm4vGpz1H6fUvi10r7kwHRemZldmNh2xV/TYtHQTus3 6s4A== X-Forwarded-Encrypted: i=1; AFNElJ8ILLkv0w+t6bjY1Qwyq0TGB7++HQDWz+ns0TyaEfSURh8jTu3oj7ZsEi7kwTYpthrlKv4XDliy0fAKNPw=@vger.kernel.org X-Gm-Message-State: AOJu0YzQ6E6MJpqzNddiipAUj/ow0nOJ7bv7xB2t77Qv1FIwKEq08gez vpZIllEX7et5j9Te9oYzDz4izm5CGX9w5rZYsUBznKy24xqy52offBICHEqDwo7ckOo= X-Gm-Gg: AeBDievRGC43nq3/0FDXjb2L0OoXcgtuAUwKu9StPksqy5j/QRoUv4miFreVFwnHbCU QV+w784Rv7h6+lGKOGY1U0j93u6ZBYARgVrFYfOZ5SIqRpoL9apMc+/s5Kw65gSBkAvuP/SD166 Ihn3iYd9poOoB6cRj/pMBjr+dUEQWc1kKGNS28c6fSxEkdWzEbxnt9zlT++lXYBu++mUVELPWvp yNxHuByCiUnywnsQvef8Dvhzuzl62w7+Hx0e5eTiiy5E85Pl3MW7Dovh9KJ1lEWb6cz5oTUdn3Q h1KPH5vLiPBF4qXsLkHuRdHuAZZhMUxG2Ep8nJ7TLj2mpWU8h59i9saTouSa8/lB3CCPDtuvh1g 60+UKD8QFZ7aF3H5rBM9wLvRUe9B7fZxt/iPW3MyCNao68s/vPAtlNt0KeSP9NBiVsx0dwbb+Dz ujAGp0Ar8cwpDRS8FmJsuNNQw45lXdejal2WgqljBOsHBH/8hGLFKCiShxBAZVYZH+0gcnhhDfq X7XoBr+N45qJAzrC4Bj X-Received: by 2002:a05:600c:a118:b0:489:ecee:c4ef with SMTP id 5b1f17b1804b1-48a9865daacmr92637525e9.13.1777880080191; Mon, 04 May 2026 00:34:40 -0700 (PDT) Received: from [10.211.8.175] ([213.147.98.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-44a981dee7asm24650614f8f.21.2026.05.04.00.34.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2026 00:34:39 -0700 (PDT) Message-ID: <393cb843-a625-4a7d-9817-be77cfc50037@kernel.dk> Date: Mon, 4 May 2026 01:34:38 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: io_uring: should IORING_TIMEOUT_ABS honour the submitter's time namespace? To: Xie Maoyi , Pavel Begunkov Cc: Andrei Vagin , "io-uring@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <85b63dbc-1fb3-4913-9419-90908c5b6358@gmail.com> Content-Language: en-US From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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