From nobody Thu Apr 9 12:09:31 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 518D6315D51 for ; Fri, 27 Feb 2026 07:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772176723; cv=none; b=JvS14ihTBjByT4KeNSmmKjS+kjwX02Z0M0QGWeaKYUpPuSME7/ObfijbCOzdtPEo4XqV4Dr6iVOUFlRIq87/MMwzaJmq4jPvQDbdLN8nxzuifP9KTRaer0mk+NQ++SWC2Q5zk6WO5qS2gs0Dq7KIH9KBbrDPjJosFFlKdjzasrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772176723; c=relaxed/simple; bh=+e4N+QT+6pOZq+crkx8RDGv+pNNWvZFcUaDFexSGcnk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=RWBPtBeq/mf5EHMLhBuBtZE4HsSnspIHFj9Tp+URF+HWXoTaplWS4KrPaDWE5rxOVOxJh/AizlSxJ2OElAd3aUIzE99LR4IXO6b14C3g4Zs+C9AOscTI9TpajFJhm9HN67uzB960fXHTh1aCE7sAOj5HvDqdxJdvIkBRYcqUszI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nYUnIJEx; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=X+AapJ+D; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nYUnIJEx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="X+AapJ+D" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772176720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EG/PThw8ccTWPdjcMybycqbtKDRmw9WwmEavyGLC8n4=; b=nYUnIJExFkl3Vbl/+/nwntZwxsaWH9tzUl3at4crcyUTSLLKF+MDXzNyk56dbWlkKLh+hq A90E+1nY3IWih7urxLT10x9UyusoNM/XnMqB8zXabxiVtbqA/CaLJCw/HwMJmRtNI24/Qf iBqGpJel19Lc6pWSsL57CYZs14OfmHxS/fgbfYy0o4ScOBhsN7tLPp7A4ePyemdRkLtlXy CJv/VC5cpG56UGvhobdlalXBLXg70wQVr1KhQ76G1holiY1Pk7YYv3V8fLEAgT6tgIeji7 DGCXwNYz0BP4eT2j+s0HhaPw27pPteAcV+eldfP8kMVZ8XZ4dOIVsgtz2G+jCw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772176720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EG/PThw8ccTWPdjcMybycqbtKDRmw9WwmEavyGLC8n4=; b=X+AapJ+DJazgUB7Ivr0/Ke5+am857ZleyCVi7Rrzm8Sb2U2alt5Cs6IesHPLp5Jzoggdzt 0wA9ucJQOIBG94DA== Date: Fri, 27 Feb 2026 08:18:32 +0100 Subject: [PATCH] y2038: uapi: use 64-bit __kernel_old_timespec::tv_nsec on x32 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260227-timespec-x32-v1-1-00b227168034@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x3MQQqAIBBA0avErBN0zKCuEi3CxppFJhohiHdPW r7F/wUSRaYEc1cg0suJb9+g+g7sufmDBO/NgBJHiTiIhy9KgazIGoV0k1XGaKVRQktCJMf53y1 rrR9FPHQUXgAAAA== X-Change-ID: 20260224-timespec-x32-0f9c15531320 To: Arnd Bergmann , Deepa Dinamani Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772176719; l=1718; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=+e4N+QT+6pOZq+crkx8RDGv+pNNWvZFcUaDFexSGcnk=; b=juTSqkYO90ySdYLW30H7d5ChNNdazts9BpeWcr3foR0KVd+VJv7QywJ3kosXJ/xR/cmSXSoCG xP150gQorCDC3i4Jg4mYTWeFlSvxhI1+Y5PaLacCWo8DuxaipKd1zmr X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= 'struct __kernel_old_timespec' represents the 'native' time ABI of the kernel. On 32-bit systems it uses 32-bit fields and on 64-bit systems it uses 64-bit fields. However the x86 x32 ABI uses the 64-bit time ABI natively. This is correctly handled for the 'tv_sec' fields, through the typedefs of '__kernel_old_time_t' -> '__kernel_long_t' -> 'long long'. The same treatment was missed for 'tv_nsec'. In practice this might not make much of a difference as the value of 'tv_nsec' will always fit into 32 bits and the missing bits fall into the padding of the structure. When introspecting the structure however, a difference can be observed. Switch to 64-bit tv_nsec on x32. No other architectures or ABIs are affected. Fixes: 94c467ddb273 ("y2038: add __kernel_old_timespec and __kernel_old_tim= e_t") Signed-off-by: Thomas Wei=C3=9Fschuh --- Arnd, can you take this? I'm not entirely sure if this warrants a stable backport. --- include/uapi/linux/time_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/time_types.h b/include/uapi/linux/time_type= s.h index bcc0002115d3..03a0d8aaadca 100644 --- a/include/uapi/linux/time_types.h +++ b/include/uapi/linux/time_types.h @@ -30,7 +30,7 @@ struct __kernel_old_timeval { =20 struct __kernel_old_timespec { __kernel_old_time_t tv_sec; /* seconds */ - long tv_nsec; /* nanoseconds */ + __kernel_long_t tv_nsec; /* nanoseconds */ }; =20 struct __kernel_old_itimerval { --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20260224-timespec-x32-0f9c15531320 Best regards, --=20 Thomas Wei=C3=9Fschuh