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 B02F0FD5302 for ; Fri, 27 Feb 2026 06:58:30 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fMfKc1gxYz3cGK; Fri, 27 Feb 2026 17:57:56 +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=1772175476; cv=none; b=ESQQrxNp6kMoxaia2R6sSmUNdmdrqerx8XhArLcVE8GcZp+kMxbOQ4EXgVIPMP+G6qw2GdqUPss2+IyT4ZGnEfCIqc2Ht1de9gMN2MUsCt2JAg2BGG2IBDxe0UBGyh2io9BTcFdLg7tTBo2UWolyUAE9XOcjmQ14KWuCYsdkVi/p2Ulwa6Bmcej9t03VVUPUzVm1GkP4smBkACTerGjxh3Kis/GUikUu84XD03gKkhOI6wU1A1Rf8u/L8B1CeNLIq6AYvDNzrfsQpKCKPhj0mcZ9FNVMIxDf+t95dMmxxTCgLJ3/LLasV8s1rQvJ8zcpV3T2U4iQGB8upFqix8B3xg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772175476; c=relaxed/relaxed; bh=KXdJGc4nT9NOOKX+UZdPuq+ndE9REXVmbUjc0fDDCMI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XHgOUN1UVCPvdLckYpac1dwHVKhPzwTMwJyHjbPtqSR/K65QCC6ApmuaLJ+hHAdQYJus5cw4glIFSTYaUz/SSToL1OmiB1+RbKZnXWhmKCNEM8+tEYoq65p3e/+fwX1tSVyfnfStkxosWf50a/GwxFtedVQkR1RD8rnoEcbzdK/0MqK+e95GDZnIN/sa1fGizbmIL0ErN1qboFxjQ7Aq2aYwbLKdwSLyEPSifg/9G/sEoUKkAgCUQQXUZG0YBj7K60Fipsa0updwg4ev9oJKWCjEAzcmFhNIFR6zDuPg02MROsRSTEr5AGYuZvV4dwquSrT6SBVQW6YEAVQIY/DIIA== 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=aXlbJ/p9; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=P+yurFpS; 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=aXlbJ/p9; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=P+yurFpS; 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 4fMfKb0XRKz3cDh for ; Fri, 27 Feb 2026 17:57:54 +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=1772175467; 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: in-reply-to:in-reply-to:references:references; bh=KXdJGc4nT9NOOKX+UZdPuq+ndE9REXVmbUjc0fDDCMI=; b=aXlbJ/p94I8vyOXRf4fwSomLr3yWPo8GZFeu6OrlP5IMBVGJUEf5fEwOED8eIkjOuiE8om akxR7tbHwLZziv+IZkREeUJuRcdQW2b8W1X/SAnX3csxcytBmcMa/TIoEE5XP/ZWcevTro dIQJJIOkIJsTCPnXWN2qOaAT5JqpVRc2EWx0gjIZuS5B/lzVQBq98vXVjgyDfIti0DzW1h cXtNOU0D0wGVbSYj1QqtYfquKGUHKLpmYLpCr/1AYfDD4AZjwJw3uxMDuS57szAquUZXaA WDNCcSzabajTyWFOje9cg2J/EwuMKnkp3IEW4jKk1e/YsMKuHGfFwbku6IMQ3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772175467; 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: in-reply-to:in-reply-to:references:references; bh=KXdJGc4nT9NOOKX+UZdPuq+ndE9REXVmbUjc0fDDCMI=; b=P+yurFpSuVj8ak8+qsSSmyIxRmwYTP5FGrYkiAWDOqmH31s02Njiz+IUO1sS/ia5UFGb8S Okc3qETrJbJuUZDA== Date: Fri, 27 Feb 2026 07:57:41 +0100 Subject: [PATCH 2/7] ARM: VDSO: Respect COMPAT_32BIT_TIME 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 Message-Id: <20260227-vdso-compat_32bit_time-v1-2-3f0286a7bac3@linutronix.de> References: <20260227-vdso-compat_32bit_time-v1-0-3f0286a7bac3@linutronix.de> In-Reply-To: <20260227-vdso-compat_32bit_time-v1-0-3f0286a7bac3@linutronix.de> 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=2370; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=JKP7Wzpv+BQAhD2mx0Ezvftbepun/bCnQO02h8+Mf/U=; b=6sVnm5WpE3/hhnKxB+rbIhSWVt0/eDVaHudV3chXN806w8ViXp2xoJGa/NWrh2YQ0UA4id8fC Q00LvueQZP0CIimPd0uVUn9R8HEtw/qNzxzOvXX1wgJmvPiDiJaWtD8 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. Signed-off-by: Thomas Weißschuh --- arch/arm/vdso/vdso.lds.S | 4 +++- arch/arm/vdso/vgettimeofday.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/arm/vdso/vdso.lds.S b/arch/arm/vdso/vdso.lds.S index 74d8d8bc8a40..766aa632e16c 100644 --- a/arch/arm/vdso/vdso.lds.S +++ b/arch/arm/vdso/vdso.lds.S @@ -70,9 +70,11 @@ VERSION { LINUX_2.6 { global: +#ifdef CONFIG_COMPAT_32BIT_TIME __vdso_clock_gettime; - __vdso_gettimeofday; __vdso_clock_getres; +#endif /* CONFIG_COMPAT_32BIT_TIME */ + __vdso_gettimeofday; __vdso_clock_gettime64; __vdso_clock_getres_time64; local: *; diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index f7a2f5dc2fdc..31702f2f0547 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -10,17 +10,19 @@ #include #include +#ifdef CONFIG_COMPAT_32BIT_TIME int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) { return __cvdso_clock_gettime32(clock, ts); } -int __vdso_clock_gettime64(clockid_t clock, - struct __kernel_timespec *ts) +int __vdso_clock_getres(clockid_t clock_id, + struct old_timespec32 *res) { - return __cvdso_clock_gettime(clock, ts); + return __cvdso_clock_getres_time32(clock_id, res); } +#endif /* CONFIG_COMPAT_32BIT_TIME */ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) @@ -28,10 +30,10 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, return __cvdso_gettimeofday(tv, tz); } -int __vdso_clock_getres(clockid_t clock_id, - struct old_timespec32 *res) +int __vdso_clock_gettime64(clockid_t clock, + struct __kernel_timespec *ts) { - return __cvdso_clock_getres_time32(clock_id, res); + return __cvdso_clock_gettime(clock, ts); } int __vdso_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res) -- 2.53.0