From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 E9AC52E8B64 for ; Thu, 19 Mar 2026 06:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773900627; cv=none; b=MuWxUlcssn1WFR2hvqi7xeQ1MgH31gnxP1vYFAvW0iu7ArPilcei4gwBRyNFmEHjvSraFihhaGxB0cA3x5oHL/IVrRQK9SqmMdMYBvuzn44jhHj+vD18nBgk23ef2nzRepyNSNY8ErP8+/07v/Q24kQP7HkoNrmDR3grtAFahaE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773900627; c=relaxed/simple; bh=FwFrEW+RURHBw7WKKqQHKGXgJDCrCvhXUxNto9nnTDQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=NcvZU6XIpFA4l2vdWBrxbWCwbsI7RFDXAmC61qPd/4RsmM785JBHK1GzJCq0GNfzLgGx2/6Qdy5eFWn4Ny2rKLamdeBYLJu6KIEdCcXwKfDioYNIC72z4YeRZvwmi5qoxFdTKvzKJJ2wk7RAWbrGINMvuE7I7aY0H/MFI525A0A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b=XZ4Bvaug; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="XZ4Bvaug" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8299f1ca894so417272b3a.2 for ; Wed, 18 Mar 2026 23:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1773900625; x=1774505425; darn=vger.kernel.org; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=R+IpXC/tr6nHSIcVnPf5v6ih0VFm1BQSd/i2Tt2i3iE=; b=XZ4BvaugzLGGXtuHYmdfNPnpPUxoiXw0/ksvAjsd2my0IVaVvy/orTvyoNadJDxFOA xEdcDknZZ7t5cRIDz6YpQblHsXvOS2n5fpVJvpi2Df6uLiizFUfqOpnc2RwkGtj+ZBnP 7ajZmhUBGVVfkXH0xSpNElkNCFzYle3asNl5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773900625; x=1774505425; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R+IpXC/tr6nHSIcVnPf5v6ih0VFm1BQSd/i2Tt2i3iE=; b=ip8xiBJUHaqzzsZQxo3mFfgF5/nmsyFqJ22LK7EdYp8BNAF0B4DBvw4DkymPMS2Y+k lTE5DFo2nGLIr6qPAatQxo9NrIsBnZzcOw87ZZ56irOiEL/wgvq4ccNrjkodMb+68QBw u3qphHwW/FiaVJE+LSgcOd9KSiEbtT/Q+pIhqJ74sswvjgW5OHWjrrVKMaVjRakXjn8w 4l52aPcVVJI9gZgSM9p0xPBQsxTwpTSWP7cfMICFgG3smzJPslWAugjg9HThJejE3Aew r+PW3vFUTn/W/N0dCegbBEjUMcT+0B/D3IwOPwg7vsKzxzRVrmqYJMKdY43AFpGgqtYZ /w/A== X-Gm-Message-State: AOJu0YzoMzDSPK5GKr2UdEAgAZe4amNTOCPMjzZSp2fNVx0tqFLhlD3t a7TK/R3yKAuM41lMAPHGnzQsyydTWa6i+3eP7M9Om1RmZ/8VC4AtS3JMC6R6XSZhGb8= X-Gm-Gg: ATEYQzyAbKNEFMdUV+/Cu4U70+7Pyz6SkFBScsp8PEDH4iAiEqZ6IAausW7nPLp4wEl r+IW7s+ZRbYT0wDlXh6CB0mF/c8WW9ctlooGnVf5HGCyFKAtoANo3EhpogOAOwrJZ5zgLDWkQlK SJ20Es2icy4aJS0gkc7tgD7R1DSFnoP687/sBBvVIHzyoUFoRdPfIoUibdgn8qxq0t9gSDE3tb/ FkEpGFECTJwQAexVmvrEBcFF4if+p9u5j9QqU/dn2jISwpOg86BGvTYAuG69JDtoY7imWRl52Fz BBp8DrgI5V6KG3Ov1mnXl3GPPsm9Adh34M3NPXG7JPoCSVIiBfeqnqR6xu+XZCe1cgeCB4auupo QKI3w2eOaK+TspMXssXfXo0os3rlv+d5Ql+Zd62Ar6qNxzhdsxzB1Z+/Z0FFeC4/YRIGMmWzX/I hdzfVnBoxHlzujuDmibK5M X-Received: by 2002:a05:6a00:3e20:b0:824:9451:c1e2 with SMTP id d2e1a72fcca58-82a6ae70bfcmr5551828b3a.59.1773900625263; Wed, 18 Mar 2026 23:10:25 -0700 (PDT) Received: from localhost ([116.86.198.140]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a6bbb2802sm4723004b3a.31.2026.03.18.23.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 23:10:24 -0700 (PDT) Date: Thu, 19 Mar 2026 14:10:22 +0800 From: Chris Down To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexander Viro , Christian Brauner , Jan Kara , Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , kernel-team@meta.com Subject: [PATCH] timerfd: Support CLOCK_TAI Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.3 (50e3b1f3) (2026-01-25) Despite hrtimer and POSIX timers both accepting CLOCK_TAI, timerfd_create() rejects it. This usually corners userspace into one of two bad options: 1. Convert TAI deadlines through CLOCK_REALTIME, which reintroduces the leap second exposure the application was trying to avoid in the first place. 2. Abandon timerfd entirely and use POSIX timers or busy wait approaches that do not compose well with epoll based event loops. Avoid these bad outcomes by allowing timerfd to support CLOCK_TAI. The underlying hrtimer and k_clock infrastructure already supports this. With this, epoll based applications can arm TAI based file descriptor timers natively. Signed-off-by: Chris Down --- fs/timerfd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/timerfd.c b/fs/timerfd.c index 73104f36bcae..278ad4ab65c8 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -404,6 +404,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags) (clockid != CLOCK_MONOTONIC && clockid != CLOCK_REALTIME && clockid != CLOCK_REALTIME_ALARM && + clockid != CLOCK_TAI && clockid != CLOCK_BOOTTIME && clockid != CLOCK_BOOTTIME_ALARM)) return -EINVAL; base-commit: a989fde763f4f24209e4702f50a45be572340e68 -- 2.53.0