From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 82944322DAF for ; Thu, 21 May 2026 15:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779377975; cv=none; b=hX/bHGYucyk2TNhsrIKKaRuxaAtZuV5LT2m5Jmcjo/J3jE7ffOX71g8Xo5dHRdNrjHTTg+eQjcOJCR99AA5jnW7NCJXVkPHxGyDnwqcq8dNDLndexBgMcM0h/Ps0AFwLsVgPLlUrXHwvmXFjJ67kLSmJTFkHS8qsCPBnnBHdbKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779377975; c=relaxed/simple; bh=X3JEpAaucN7cu/3nbuXUtWQEi5QTK/lf5VEUJPpua5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=E3eC2bpWP616XFr84MCmYW0omLf/6T6789edgKWCfcv3M0Ql8vRTU1hXOadTGjJ7aVFne2XD5uaDlQ9TdfrQfpJhoT0uqJp5VagEIWOPhS7inXGCOzlH4/6+OhyimMj5WE1QO71eRpjUTEMZjzntztxiwHrV5/schSh+Bbk8SZE= 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=KhGJhpnE; arc=none smtp.client-ip=209.85.214.181 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="KhGJhpnE" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2b458ca2296so45530585ad.0 for ; Thu, 21 May 2026 08:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779377974; x=1779982774; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S4/ZqWiomKVFw8ItZxfyQVPl4d2ZFYkbFaR7pnxa1eo=; b=KhGJhpnEoxwk7Bgip/uxuAhQaiH0SWoTdgcV31Lo1EcfiQvr8ufOBWx//a7/KpMWp9 NzD7DEEnyqxi/1QejpEG3YAkdtuV46ebDpYYLIQXBxJNgDpFJpEuTR7C1x2h8VVhOiQJ b4zrDebQXwFkStMbuslQe3HfPoHyWKGJc+9mVgjOKy8axup4ULGvN0WYyxz82uhheT85 OeC0l+pr1sdNDsYu3nohHpcra8DJc98rutXC0jz6EBD4BBMIG3lCDw/O/YgC4HPVSGED bqMWB2pDICY3e88mQaFDrr8Xp30CwOIFsGPW/S2eA5VOdBnPF68bd/Fe+d2qhkust9Z7 RDbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779377974; x=1779982774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=S4/ZqWiomKVFw8ItZxfyQVPl4d2ZFYkbFaR7pnxa1eo=; b=OKddSTCymt0qIM3yw1vUTkP7bNmhjaoeN9Hb4FFwTSPf6N/2PFO89KmAqlmxgnxpjF 0WlG/irZb1b2ypnIbcP7MGJbRxK9Ml6a6CvWz9w8bZBv7yv1kmZTMzpjE2pbh5KCDfEk sZb0v4n7SDc+3Q4mnbmz4BFEcY/jTe5oM9eG6NbppAWTsRMWAm3k3K6Q7GheCAGr6UbF fjLh2hkjbERIYF3G7TdIWPS2EzrkMJDbCd61AC43iQTlPJsq9JfoViPI46Vem+pqdfLy alo8EGuJmu7hrp2dyJ999shQXg8HjcZDvBiU5w3HsavkJN+mtEev0HThUNRi2A+8sdea xKaA== X-Forwarded-Encrypted: i=1; AFNElJ+/EIvFC9Zo8ttI3YIrRR+A+6N8A4BSA3GYS0lR+WjD0hGwMKE8b7B2y1GQOgCdJAwGcX8s7ioYjK/ZkhI=@vger.kernel.org X-Gm-Message-State: AOJu0YzRvVDENikxZCGf/yt/bN7DazEFYK5k2Bs065GZeEkdf/wZJepY 8pCK8iwTOjelYQWFp48SIXOdYrq5K/8G9TiqRBwacialhAV1X3M5PRw/k/VkDA== X-Gm-Gg: Acq92OFTKbhOXHBFirgHvqFGIcUnC7KXA7QzfQL79ACdR9UbTB6yKB8coq75yUefsMD z4PvYfttSNiGbVwporS/GKUdAfimfuKdGQ/wGv8mPTkqsBvYvVVZss8OBkCsagXfX18+SEgWkH4 GA3CAfNTbCL6PTH+q80Pt+mHVbuqkkq99Kx9Fm3yWbT7WZ6OYjwIQm4CO8w3Fk8L1CGJp/d7yCM ff+mIBVzNhA5hlPw5l5dYu0RjfAIUcHKqZ7FWyAyd6NiAELqU777f0W/aZ2OJeP5TutRsoNtNdZ FuBTikt0IsjQHTJ/UWhIdi39Ndpkby+0W4nq+LuoS1pwQmPf0+z+Xig/DA0LyPUBiSLZ8KyKGM2 XFNbzDAZjEt/dbegK+AnDH382i9whBgA1h5xJ55fQ4fR5UujRIjlhTM+IU8VpHcEoY2MxRP2XVd 2Kbgv0vvPcrAcZv5LGGYDShVGezwtEt2KGSqAKS58xB9GNldYz X-Received: by 2002:a17:902:e790:b0:2be:1c3c:72bb with SMTP id d9443c01a7336-2bea33731d9mr37530975ad.33.1779377973587; Thu, 21 May 2026 08:39:33 -0700 (PDT) Received: from csl-conti-dell7858.ntu.edu.sg ([155.69.195.57]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c85197c5e1asm672060a12.2.2026.05.21.08.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 08:39:33 -0700 (PDT) From: Maoyi Xie To: Elizabeth Figura , Thomas Gleixner Cc: Anna-Maria Behnsen , Frederic Weisbecker , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: ntsync: absolute MONOTONIC timeout ignores time namespace offset Date: Thu, 21 May 2026 23:39:28 +0800 Message-Id: <20260521153928.3724328-1-maoyixie.tju@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi all, Elizabeth confirmed this bug yesterday. Before I send a fix I would like to check the export plan with the time namespace folks. The fix calls timens_ktime_to_host(clock, timeout) on the non-REALTIME branch in ntsync_schedule(). The helper is an inline in . It references init_time_ns and do_timens_ktime_to_host. Neither is exported. All current users of the inline (timerfd, posix-timers, alarmtimer, posix-stubs, futex, io_uring) are built-in. ntsync is tristate (default m), so it is the first module that needs the helper. Without the exports, modpost reports both symbols unresolved and ntsync.ko does not load. I was planning to send: 1/2 time/namespace: export init_time_ns and do_timens_ktime_to_host 2/2 ntsync: honour caller's time namespace for absolute MONOTONIC timeouts I also considered these but they look weaker: - Flip CONFIG_NTSYNC to bool. Breaks module users. - Add a new exported wrapper that hides init_time_ns. Cleaner ABI but adds a helper for one caller. If the export plan is OK I will send the series. If you prefer something else please let me know and I will follow that. Thanks for taking a look, Maoyi