From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A86E348B386; Wed, 1 Jul 2026 13:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782911562; cv=none; b=WdRxqj1OHEchXBL4P02NQvZy06FBFeS/jWMCEIfs1St7kC1p7DZP/vfRZXnWj8wRLVR54lihWBxm8/SGouLa834uUYDl6cKyknYUQ2fu7u/bEPltc10SLT/6lthldla5GGMZZ/2yMTQExZpI6yw5AQhtDyeI/tG1WneogviJGZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782911562; c=relaxed/simple; bh=XqEEA6N5CwGJ6IA3lZOQ+4Ik7bEoUp9hnbB4/W/Zwik=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=hE3mu/58wv9A5j32qXcFjKGnHN2+Bp7D0CfNdN/WxBfybCTRITsv/8aRwtNZ7e4MhsvIkC2+TlPXoKEMtl9+H15AA91o4ITUIgV2khBoSb88bZag9MMvNNST3Y8n8ghrWcpe1BSF4/zaAvOg5TcudZjLNKtPEjlrBILYgBgW0hA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=sQSfLOue; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=O8HXW5UO; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="sQSfLOue"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O8HXW5UO" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4658D7A009D; Wed, 1 Jul 2026 09:12:39 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-04.internal (MEProxy); Wed, 01 Jul 2026 09:12:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1782911559; x=1782997959; bh=XqEEA6N5CwGJ6IA3lZOQ+4Ik7bEoUp9hnbB4/W/Zwik=; b= sQSfLOueyGINlkU+m6V2rhx9l6c7DSh4peFKT2GDZON3Z0C4LcbV4ctXku49JLkN g+HFYP+lati0duVqQNupgWCUMLIDFQb3u5OhrYunrii8zZnVegxb4bXG1TicAdTZ 1J6fEVDY8WkbUy5NVTaQZHbsMQqul3Z67raQ5Nzixux9IEaGnMSqdnlolXzBfyzT 1kpbhhyClY1m74WD8UisTPPxiNBiHUK1gsKQyOz/Cllu1TQyh5Cgyl797knGzYpL s7dHJXo95drQLrIeVLutdn2sJJ7bSvCI+vVMLkubPKL1jYBySDDrpEnCUKSb1FpA H1/6b8NJRdzlwIK1yB4dwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1782911559; x= 1782997959; bh=XqEEA6N5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bi9R9DHc8ER2iJp174rEfUAKSD/WUZBfVxKq+AH24iHCTA X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 537641820082; Wed, 1 Jul 2026 09:12:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AE-5y0c3-Pto Date: Wed, 01 Jul 2026 15:11:56 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: "Andy Lutomirski" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , x86@kernel.org, "H. Peter Anvin" , "Russell King" , "Catalin Marinas" , "Will Deacon" , "Madhavan Srinivasan" , "Michael Ellerman" , "Nicholas Piggin" , "Christophe Leroy" , "Thomas Bogendoerfer" , "Vincenzo Frascino" , "John Stultz" , "Stephen Boyd" , "David S . Miller" , "Andreas Larsson" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-api@vger.kernel.org, sparclinux@vger.kernel.org Message-Id: In-Reply-To: <20260701102912-ea8f3291-7bba-407b-9a7d-7c367a4c9398@linutronix.de> References: <20260630-vdso-compat_32bit_time-v2-0-520d194640dd@linutronix.de> <20260630-vdso-compat_32bit_time-v2-1-520d194640dd@linutronix.de> <0cda7366-2eb9-4ecb-b76a-b3b68ee10043@app.fastmail.com> <20260701102912-ea8f3291-7bba-407b-9a7d-7c367a4c9398@linutronix.de> Subject: Re: [PATCH v2 1/9] time: Respect COMPAT_32BIT_TIME for old time type functions Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 1, 2026, at 10:40, Thomas Wei=C3=9Fschuh wrote: > On Tue, Jun 30, 2026 at 03:00:37PM +0200, Arnd Bergmann wrote: >> On Tue, Jun 30, 2026, at 09:38, Thomas Wei=C3=9Fschuh wrote: >> > The "old" time types use 32-bit seconds which are not y2038-safe. >> > Respect COMPAT_32BIT_TIME for functions using those types. >> > time(), stime() and gettimeofday() are disabled completely. >>=20 >> Looks good, yes > > Sashiko found an issue [0], which I think is valid. I'll change that f= or v3. Ok >> > settimeofday() is kept as it is required to do the initial timewarp= ing >> > after boot. However the 'tv' argument will be rejected. >>=20 >> Not sure about this part, did we already discuss this last time? > > This is my interpretation of [1]. Indeed, we did. >> I can see how keeping the timewarping functionality is the easy way >> out, but completely disabling the settimeofday syscall the same >> way we do on new architectures seems so much more consistent. > > Shouldn't we then do this completely? Irrespective of COMPAT_32BIT_TIM= E? > And then remove all of the timewarping and kernel timezone bits. I don't think we can simply kill the timewarping code since that likely has users on architectures including on x86-64. COMPAT_32BIT_TIME=3Dn is somewhat special because this is an intentional (and optional) ABI break already and requires updated userspace that avoids the time32 syscalls. Having the timewarp still in settimeofday() or dropping it entirely is not that different for userspace. I was slightly worried about whether returning -EINVAL or -ENOSYS is the better option here, but I think your choice is the correct one after seeing that this is what glibc does other invalid cases, and that in all of codesearch.debian.net, I could not find a single caller that would care about the difference. > It would be nice however if this series, and my other ones blocked beh= ind it, > are not blocked on that larger rework. Sure. I think you can go ahead with this version. I would prefer to not have any settimeofday() for the COMPAT_32BIT_TIME=3Dn case, but if nobody else has a strong opinion on the matter, let's do it your way. Reviewed-by: Arnd Bergmann