From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 2226830F52B for ; Mon, 4 May 2026 07:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777880911; cv=none; b=aC9O4FLRkOod2ynCdfFD51kIgjPy8RWSq5iUpUmR8r3gNZe5zAQ4jIbLh6web80uUIYtEgOWzz4OUFYgg8KfwZRPPdSuFxbv19Tsme6BqQ55nfKP6xipZ/ZlWawY/D0Rc7k1IvBjBZfVLT5MNfA+FFGXx/bNL0OUfs9kD9lquY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777880911; c=relaxed/simple; bh=syP/zGuq+yDpz2ntWKmIkyUC4cRaNsdLDkiSlVzoXkY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gHpWrU+IN774L20274qpFqDKWZoaTYGPtmSYzM7QmIzZCYdFPg5Qd5YceI6StQJfaBJ0NrLsdWxztgQdTYa8puWnD9BqcDd5lSWz+45Im6dbTyCtc9e7RKo1AugfH+uJ9P9434N0lpGAyUgWoczmQeG5Vux4JVPJ3hqWlHkbYZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SA+yGwQL; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SA+yGwQL" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-449de065cb3so1299727f8f.2 for ; Mon, 04 May 2026 00:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777880908; x=1778485708; 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=kDtQ/aQ1w0ElKE7YAKSB1b+1NzDJOAnZ5IlgFYDi7x0=; b=SA+yGwQLvOxundI6OitPu2d74xPn2n0oBaGXFMHzT/X9sK8ndZLqU5RFDiWBPXPgCv st0MBjH8fnGbwf/G5Edpa5i23FT3iY+uHIFt4RqnHo2gAM9YaDvgicKRBWT4Wiorf/oy QfDo6gjmnH1Hzfdnv0DMMD9rwRdxNh/nvMuuhXNvcUVCbbyM8mnQ5ExcrtWp1kLlj6Lc SYjiF0iNFkg0KoIeKgsuMYIQNouam57KSRUca3InPScEhhE0l7qAYnskaFF9cgooWa95 elgx3oHRnrXHmAsY9ypasdBPLHAa/rna+671j8U0+0J98sLA1i0VBuIiyNEa9hfNkj2h F/Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777880908; x=1778485708; 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=kDtQ/aQ1w0ElKE7YAKSB1b+1NzDJOAnZ5IlgFYDi7x0=; b=JEBOzSHBpWo5p+J+lY6aLbR/pV1Tb5r1ZVto2hsklG9sryv8YvLjPGyiHLXo/1hFsz 7af/utyKzULcN2lzSuXqEmKXUT8PAZ6AN95CeDYPVw8C3yOIyZRSSwEuXuxF+ikeJlhX sxJAbTVLBQI4vSuoVgKqUWIqz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14826168f8f.23.1777880908394; Mon, 04 May 2026 00:48:28 -0700 (PDT) Received: from [10.211.10.33] ([213.147.98.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-44a981dee7asm24754038f8f.21.2026.05.04.00.48.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2026 00:48:27 -0700 (PDT) Message-ID: <988f7486-0353-4239-badc-6c0dc9b3abd7@gmail.com> Date: Mon, 4 May 2026 08:48:11 +0100 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: Jens Axboe , Xie Maoyi 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: Pavel Begunkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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