From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 1980E365A1D for ; Mon, 4 May 2026 10:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888974; cv=none; b=O6Q8GgHEY4hLCaFVbGuVvdlEwWZYwjYarycRHLdTYt5sKRNvolPsMt+hNW0K5y0cWH17zF75dJUqTdhmTYZnqZmJvgN+Rfmw2QBbSdD4oqFfCkFc79lnRcztebtsbX5LRAdVROhPiAhq2Mbte+sgjdWlbbPL9jVcfy7H57JXcOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888974; c=relaxed/simple; bh=yTnRoT8/gtQjN2YFeyJd42bDte0cAIPr9a5XzGIEZZU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rYffW7wuAjhnM4nbgvoEU1iSxkq2G3MTBts3Aqaa9Qj9gw5zSfMxVpu12T45lsr71CvHKEduoPNUbVa63mYxXLXjxEtAStNO3Kidkih3K/E/9WhseX5foYIasCYo2iLOwG3TS9XHlHRRrrt0hx6ka8+o/zl1W6dklJAY6dwTKCY= 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=oCKYdR1n; arc=none smtp.client-ip=209.85.128.46 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="oCKYdR1n" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso31642965e9.2 for ; Mon, 04 May 2026 03:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20251104.gappssmtp.com; s=20251104; t=1777888970; x=1778493770; 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=mipNGf7zERnFzoc2aGvUG8Q2gFM+M1wRRQUhPAJmgco=; b=oCKYdR1nOEiXUTTx5hhlyczfQX6ebU0rXzNnGTkTX8pe8U5fQEwfucjRo7C9tOjxvg FoMhuLjD4Dt5xmrAevq+vyoa0d5mpguNRjlmsfv32muemEL/YQvkHq5+wskhSqF+NFN4 9Qb/uRaPSq2yeIaQwXF12v7P0H9p2vWY5Ig+QBILmsQRxiu3hVZlU/FtzIvwb1GHxJlc eTuujAhgVse5uvTR1ucBV/EX8Mru09MzosXCgBRE5GGCmSdJPEFUSdH6xpn6kMHfP0Kr J1y3++Pcyh90SYtc9xXSn5LWMekZmVJq8mlHWmtuFATdWrTr89uvMDuHykZIQsThxjNu ZLGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777888970; x=1778493770; 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=mipNGf7zERnFzoc2aGvUG8Q2gFM+M1wRRQUhPAJmgco=; b=o9VUFC+7yxtdpZnW/iHXL4tK1Ua0sMqmpomAk7/ltpD/oB47uISFnaZfYkyUVLy3ER uFSYr0qGvMUhu3sVj50p2XCkrfHiulQ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8191 with SMTP id 5b1f17b1804b1-48a9852d122mr138512425e9.5.1777888970407; Mon, 04 May 2026 03:02:50 -0700 (PDT) Received: from [10.211.9.114] ([213.147.98.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-44a8ef52854sm24846687f8f.12.2026.05.04.03.02.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2026 03:02:49 -0700 (PDT) Message-ID: <6f8e0462-33ea-4b14-a211-c01e9629b558@kernel.dk> Date: Mon, 4 May 2026 04:02:48 -0600 Precedence: bulk X-Mailing-List: io-uring@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: Pavel Begunkov , Xie Maoyi Cc: Andrei Vagin , "io-uring@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <85b63dbc-1fb3-4913-9419-90908c5b6358@gmail.com> <988f7486-0353-4239-badc-6c0dc9b3abd7@gmail.com> Content-Language: en-US From: Jens Axboe In-Reply-To: <988f7486-0353-4239-badc-6c0dc9b3abd7@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/4/26 1:48 AM, Pavel Begunkov wrote: > 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 That'd be fine too. -- Jens Axboe