From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF9A1FD5302 for ; Fri, 27 Feb 2026 06:58:03 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fMfKY0jSJz3c5c; Fri, 27 Feb 2026 17:57:53 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2a0a:51c0:0:12e:550::1" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772175473; cv=none; b=R8wrfbamYqanD+15ZNt/5fL2DcO1hVIniqzboqRAPxfVdShyKUFOdsZHjLG6YIjWJNddTIIAsNx82i2sn2tFDW5JXmXMYvfMH46xuz2jrtOSJn9PwRz7ykncHt3eyuH5hdI2rbY9+vRGHbHAXD9R3srLvxseqrzyI7W2HjmY7VRNaL/UeEhCYASEIBxm7Yd8BK2aUc7ZZxNDanTxh/fwtVSKPme2+jH2nTjKEexAwDaGC3D/3DEWDCz0WfiEeAjEbWO6hT/1hTIo88l0BdvCufyUtWwtT2Du/78Oi802er4JFav4mbMdXEXaoFT/10L1kvoFcCfIl1fhvCIpyKjcGA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772175473; c=relaxed/relaxed; bh=HtbZMuKPuZ/Q8N4tWs6O3IZMokrlUXoSJAG1PhFcJgY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=jAZRc8YRqaZq0+onDUIF6ksRnVoINiJ00tnOAirk61k/YlGu/Ctc+1SgzTHIid7hG/5evDXmzOGb66kLtoa7sSwnopKfG7Zv6b7kpMrTfDSxpS98Rofi8R8qBJ+R/7tfSoDMpa2AVAFHuEFIzH4FVQF2kGNGu7Cs/Mq9z59iaY5OfAxyk1r/74KQ/sY24wdEUJS0UHMp+LJJfouKWBeL2YMSzdIXFPu0AMp7DVD04L4Mi8xhbG8optr2tVV5ck4z6oYTS+jsgs6rlhiqLX9ug4Zzadvjny/Vz5S2LCovjEgFI23Ho24i8wsWz+G+j11fxNaAw2nfETfVRZ/NaFob4Q== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=H4o7ORTn; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=gOAq0G/C; dkim-atps=neutral; spf=pass (client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=t-8ch@linutronix.de; receiver=lists.ozlabs.org) smtp.mailfrom=linutronix.de Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=H4o7ORTn; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=gOAq0G/C; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=t-8ch@linutronix.de; receiver=lists.ozlabs.org) Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fMfKX0501z3btf for ; Fri, 27 Feb 2026 17:57:51 +1100 (AEDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772175466; 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=HtbZMuKPuZ/Q8N4tWs6O3IZMokrlUXoSJAG1PhFcJgY=; b=H4o7ORTn4JvG+PVTnYpO0/oTgdZCJbwVt4425etjg8+5ole07xXCVfxDm7D5LGyIHgoBJx 8NwMkH71P64oXxvqvHLZB+IND37Jq3yby+W4GswDpz7bHdPKCez33/1zzxosn/+0pinBkm X7Yo9UMR4Vv0MfeCsSwufKeBILZtlkEgMVdYUbInPIWcpTl7UPQfgtO+RpsiiUy7r+2O4y ++fQbI9BcasRK1a65vijBTiUpgA5nuY2eYltLq2LS2SOlWhynNISJ+i8/Wm4kqSqPLV9jT vpwtDuAp08YVymX36aLS9EWtu6mZVL9Q8F70pw/L9Ch47fljYATqIzqrE6JI3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772175466; 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=HtbZMuKPuZ/Q8N4tWs6O3IZMokrlUXoSJAG1PhFcJgY=; b=gOAq0G/CQ3E3pUMxzw8fM3TjOLd6FY02Gw7eezax8KZlsADL9RmM590a28hE1bUpjrjYNl zytu7ftaESwuGKAA== Subject: [PATCH 0/7] vDSO: Respect COMPAT_32BIT_TIME Date: Fri, 27 Feb 2026 07:57:39 +0100 Message-Id: <20260227-vdso-compat_32bit_time-v1-0-3f0286a7bac3@linutronix.de> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x3MTQqAIBBA4avIrBP8AbOuEhFWU83CDBUJorsnL b/Few8kjIQJevZAxEKJwlkhGwbL4c4dOa3VoIQyQkrNy5oCX4K/XJ60milPmTxytMK2RmPXGgc 1viJudP/jYXzfD3yh3uRoAAAA X-Change-ID: 20260113-vdso-compat_32bit_time-e808763e976a To: 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 (CS GROUP)" , Thomas Bogendoerfer , Vincenzo Frascino Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772175466; l=2310; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=j+10mN0yr2XgOejP9mFbnsE8FfQujsP1mq/LotWdhto=; b=4qjwQGnBsBfZe0LjYUORov+hgkDQzer/ymRhbE91DQX1XPZRWzaKFR4++0Fr1RMsBbxUveStm UAm3S7SwNMvA4AnLvQRE43aBQhvrPLsa/92l8LBwRdO3MAbzufbbm2f X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= If CONFIG_COMPAT_32BIT_TIME is disabled then the vDSO should not provide any 32-bit time related functionality. This is the intended effect of the kconfig option and also the fallback system calls would also not be implemented. Currently the kconfig option does not affect the gettimeofday() syscall, so also keep that in the vDSO. I also tried to introduce some helpers to avoid much of the ifdeffery, but due to the high variance in the architecture-specific glue code these would need to handle they ended up being worse than the current proposal. As a side-effect this will make the self-tests more reliable, as there is now always a matching syscall available for each vDSO function. clock_gettime_time64() was only introduced in v6.19, so libc implementations are likely not using it yet. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (7): x86/vdso: Respect COMPAT_32BIT_TIME ARM: VDSO: Respect COMPAT_32BIT_TIME arm64: vdso32: Respect COMPAT_32BIT_TIME powerpc/vdso: Respect COMPAT_32BIT_TIME MIPS: VDSO: Drop kconfig MIPS_CLOCK_VSYSCALL MIPS: VDSO: Respect COMPAT_32BIT_TIME vdso/gettimeofday: Verify COMPAT_32BIT_TIME interactions arch/arm/vdso/vdso.lds.S | 4 +++- arch/arm/vdso/vgettimeofday.c | 14 ++++++------ arch/arm64/kernel/vdso32/vdso.lds.S | 4 +++- arch/arm64/kernel/vdso32/vgettimeofday.c | 14 ++++++------ arch/mips/Kconfig | 3 --- arch/mips/vdso/vdso.lds.S | 6 +++--- arch/mips/vdso/vgettimeofday.c | 33 +++++++---------------------- arch/powerpc/kernel/vdso/gettimeofday.S | 6 ++++++ arch/powerpc/kernel/vdso/vdso32.lds.S | 10 +++++---- arch/powerpc/kernel/vdso/vgettimeofday.c | 16 ++++++++------ arch/x86/entry/vdso/common/vclock_gettime.c | 20 ++++++++++------- arch/x86/entry/vdso/vdso32/vdso32.lds.S | 4 +++- lib/vdso/gettimeofday.c | 8 +++++++ 13 files changed, 78 insertions(+), 64 deletions(-) --- base-commit: 328b128e8fe2ae981900c1f38b3b9c75c586455e change-id: 20260113-vdso-compat_32bit_time-e808763e976a Best regards, -- Thomas Weißschuh