From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.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 879683DC4A3 for ; Wed, 6 May 2026 09:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778058356; cv=none; b=FCDL1GZqcbAFiLh6sd664EJwBALOQq0LhqIkNC/eiMbnXt2tj7PBx7oTMk895Jq6GpleM8LYfA3kO3cUkAttVUW6NQAf0gXN8CvQPmQP8Zz2JsXWvCkZCL3nT0luKM6xvaUqNQlibPCH9XzvOWaBMZqWLELkWwBcff9BHb6H+04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778058356; c=relaxed/simple; bh=wlzQ3zLH5IstKehZiZ0CWYTOn6BTkx0ALRr0iBYkz40=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Z6rqKEFwM6oWX+KTWKrJvwO4goov8Z8SHsYtUlN5Dblnc04/IF8Ecsd7LIW1TxAIW+RV2nrDbN1/i4Q4y/5D035zWUq3/+lJcyYtY+GIVWi74zbR+4vVIIm4ttcN4ATVRmtHH4O5JZzjED1S3yI8HhmGg/1Fgno3wHy6CrBhOkA= 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=NZ8+FH0L; arc=none smtp.client-ip=209.85.128.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="NZ8+FH0L" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4893940bb5eso34010415e9.3 for ; Wed, 06 May 2026 02:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778058353; x=1778663153; 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=7ZB9RilwFR5SteBplF/teYxItIDeEzXLv+5HmDUxIXc=; b=NZ8+FH0LuF0dMLxmdaZ1oIaryQcXGc58y7W+O/Tk6dgFyoqR3KE7PYBaLbaMivSVep LnV7RkNXzXFO7mpBL9Uh0DKySaKmW7rynQXXFDvDZnTEltC4yeXZZPJJ9CIPxO6LE54n wYl+BC475ykvm6PIuTCcCH6wZWbcds6ZKDFiALCWVkY06DfX/WTDyM6GkKHw2esXCVn6 iT+OAA4zd6DPAq4x2JH5xW+fIdieUIsD4lVzaBTOc7enZsk6oWBAya8XdxsDAyw3mBbl IVH/JzU1M5syQFpZQ9KO8MGamjwbw2xLz/8HezhmQzXaQgHul4CKVS/xhx59fCYOH1Xb L2ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778058353; x=1778663153; 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=7ZB9RilwFR5SteBplF/teYxItIDeEzXLv+5HmDUxIXc=; b=H/ePUWTJlYCjLWfsrd6g5r7M2Xb3Q5p4r3tPHtqpeGOkkRDiRGZHAlo5rWIDBvZNuF ngYY7cNDLRhBhJyM9ADwUEK65cdP9hNLQP64Sf+QWwDuPjG4H2jvR8Jy241fvsqkNVxY kVoZPoe/nMnZPFff913ILC7M8D49rn/dSqSanZlqQ76bysMNQOu50Zi9kRokiHDhbBD3 n5fawMUyPeJtDjw/y9cNsnLdYP47TaVAxySZ3U1LLFfMZRQEHQP6YaBC342ulR5yUL4S 8AdbwbfaPxEzDDeK2pAp47jSpCioJgbvCghgZ9duMacyAgU4io6VSfZQF8IGAXTXOWTy rFPA== X-Forwarded-Encrypted: i=1; AFNElJ8KMPZViohcBVDRGkNRVnorHelAsmg/v6Y+evnpv8f7QnFw4hWEvo58hn7C76fo+ly51ryemoaj2s7wId4=@vger.kernel.org X-Gm-Message-State: AOJu0YyvDP1z7iG/EY4OnHzE0yVUMeeyqRCrOR9/dyNb8PUcrrVL+Uks kQxWY/+q+46rlnrCtZsCKVCAXqZTHhNcOICCoIyLL6bSLCRUj4YLhbFB X-Gm-Gg: AeBDiesaNXZw1Q1VN2bvxCKYP/Izc6doMP6rQUnk2lipVk1nbCsigisAx28U3qcqCXj vYUuiJk3EtZmxswRTz2fISu7OvYDpH1Mz63ssMHtd75fqQANyr0izOmOn21UZPbK+Ltt7apCKhi tAO5N4AnQud5bNu3eaB0izFOeIeeqP3EcMB2arOGLQfgE2VG49HEK0RRwbf+0n9FiNG9FFQWbYx L5s+8ztLtwKEfqhoXT9YKHa2EWxPWb3zD48TDT8TJFmNB9VHq0rAlEBHhTt25NFJWGumucrAdir VnHlgS0EpspPRPuCJFj1lWEbfcwNKIfcIS9HqosfOkE8QioRceJLGp2l+zKGef8yTFafh9LNqSn F/wrICTHWjX3fcPkDQcOn4aSLCiZu0JPzGtP0+genYSmJS8+rSXp36XfkyX4RP76iEspx8wI6+K e3aYq1SptgmigAzZcww0WEjNq+jiuI19/JYzF5DURtJnxciIKsTAnDJhclaGBhS5cQ2Cw7UMjUL LojnuxpvthwPUAMeDSnYEoabz2uyPh+4QnIcNyGrZfowfeB/GUl X-Received: by 2002:a05:600c:4f53:b0:48a:5565:ec3d with SMTP id 5b1f17b1804b1-48e51f44577mr44857185e9.22.1778058352858; Wed, 06 May 2026 02:05:52 -0700 (PDT) Received: from [10.109.92.22] ([86.33.71.194]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-450524834eesm10595105f8f.4.2026.05.06.02.05.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 May 2026 02:05:52 -0700 (PDT) Message-ID: Date: Wed, 6 May 2026 10:05:42 +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: [PATCH 0/2] io_uring: honour submitter's time namespace for ABS timeouts To: Maoyi Xie , Jens Axboe Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260504153755.1293932-1-maoyi.xie@ntu.edu.sg> Content-Language: en-US From: Pavel Begunkov In-Reply-To: <20260504153755.1293932-1-maoyi.xie@ntu.edu.sg> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/4/26 16:37, Maoyi Xie wrote: > This series addresses two io_uring code paths that arm an ABS > hrtimer from a timestamp supplied by the caller. Both paths skip > the conversion from the submitter's time namespace view to host > view via timens_ktime_to_host(). The clock is CLOCK_MONOTONIC by > default, or optionally CLOCK_BOOTTIME. > > All four other ABS timer interfaces already do this conversion: > timer_settime(TIMER_ABSTIME), clock_nanosleep(TIMER_ABSTIME), > alarm_timer_nsleep(TIMER_ABSTIME), and > timerfd_settime(TFD_TIMER_ABSTIME). > > Patch 1/2 (io_uring/timeout) covers IORING_OP_TIMEOUT and > IORING_OP_LINK_TIMEOUT via io_parse_user_time(). It is essentially > the draft Pavel posted on the original thread. I rebased it on > io_uring-7.1 and verified end to end. > > Patch 2/2 (io_uring/wait) covers the IORING_ENTER_ABS_TIMER path > in io_uring_enter(). That path parses ext_arg->ts inline rather > than going through io_parse_user_time(). Patch 1/2 therefore does > not cover it. > > Per Pavel and Jens's discussion on the original thread, the two > sites use two direct timens_ktime_to_host() call sites rather > than a shared helper. Patch 1/2 also splits the existing > io_timeout_get_clock() into a flags only io_flags_to_clock(), so > io_parse_user_time() can resolve the clock without a > struct io_timeout_data. > > SQPOLL is automatically covered. The SQPOLL kernel thread is > created via create_io_thread() with CLONE_THREAD and no CLONE_NEW* > flag. copy_namespaces() therefore shares the submitter's nsproxy > by reference. timens_ktime_to_host() through "current" sees the > submitter's time_ns when called from the SQPOLL kthread. PoCs for > both paths confirm this. At a quick glance, both look good. I think you had an isolated reproducer, are you sending it as a liburing test? Would be greatly appreciated. -- Pavel Begunkov