From mboxrd@z Thu Jan 1 00:00:00 1970 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 B64343E1696; Tue, 30 Jun 2026 07:38:41 +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=1782805123; cv=none; b=Itx/UER3SoNytfEqqjXqSzo+EVodErUanPcaxa/E8aNRKQu193APeQM143qNX8CNTt36yVoLjhIFtJyP0RL31lCOGchiJXrfi33eXwv8yGltdzOoE2G1OY22J7vhBTLxSPZP4NAXbqG1Ji64KkRYD1DLHhcXwD9ZXJbTSmy9VH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782805123; c=relaxed/simple; bh=T7+Paogn085sgV9ELgz2TiMuWvOL8lCxlSvp1JXazDE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u1YyAamNrlP1AZI/YTsVwKdmolmHWaJa5j3WOuWUzg5tQwW1jTMkak0Z+muG7bzdTj5dhzlQm1zJh3ltfDRgxeJXZOxislDDTgXoyXrND2ZGV8onBu5UJc5dtFeVdC0Pji8r3YPfx3FUGaWSCw/xPwEK3tF49UBzjhhfWChzFBE= 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=azx0VF9B; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9987Z3GT; 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="azx0VF9B"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9987Z3GT" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782805120; 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=iUQ6jFSMVNPMzb38d677yAeg1LprsENzvRHiBxMRE/A=; b=azx0VF9BBEtAr6ThA3DX8ZuDyV7033nYYJNIAmDBN8Lp3/iyYMAoRv79U/JPQ46Dk1olVO WciQTdIzt0q+ph5qD4attfn0fiqCz5uLvmivbJVUKu0pE95/F4YtFHhpamzIg/msfr+Llp qFEwW7fEPEfv1C4xZDTTPLEivZi7dGUrZXnmiqW2tBLGGWm3sBhWKFsk7mB3XvsB1OpKOx aVTuT14dju5xMOQqEA1gJiM1BO2QhEb7DEsHT30dsHNr0xOt+9WsHkyi3jDg27QQVVtHis C8EwyuswDoQxqLYV62IgEHIObYywWlv4n6BXxgtI4USncweQo6NAcLostoKIqw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782805120; 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=iUQ6jFSMVNPMzb38d677yAeg1LprsENzvRHiBxMRE/A=; b=9987Z3GTA/PZJ9Vl1M6iHdMwE8mQRNdoTRRjeakAY3fSlZgniuuu21uWmsb6Tp/5SN60S/ Ik1kFTcFqNdv5GCw== Date: Tue, 30 Jun 2026 09:38:34 +0200 Subject: [PATCH v2 5/9] ARM: VDSO: Respect COMPAT_32BIT_TIME Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260630-vdso-compat_32bit_time-v2-5-520d194640dd@linutronix.de> References: <20260630-vdso-compat_32bit_time-v2-0-520d194640dd@linutronix.de> In-Reply-To: <20260630-vdso-compat_32bit_time-v2-0-520d194640dd@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 , John Stultz , Stephen Boyd , "David S. Miller" , Andreas Larsson Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, Arnd Bergmann , linux-api@vger.kernel.org, sparclinux@vger.kernel.org X-Developer-Signature: v=1; a=ed25519-sha256; t=1782805116; l=2321; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=T7+Paogn085sgV9ELgz2TiMuWvOL8lCxlSvp1JXazDE=; b=PTy781XLM2JNi0R38FXtorGsAFXddDqIMmPeoQy7XdGWCfhypPS/ubgzDzcAGa/pbyA/i7DT7 YjBmN0yfLKvBx0D/ixlkCFqITJ+WN73NzmdTvcbFjUarFsLbYGcUeOl 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 | 2 ++ arch/arm/vdso/vgettimeofday.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm/vdso/vdso.lds.S b/arch/arm/vdso/vdso.lds.S index 74d8d8bc8a40..e61038c0195a 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_clock_gettime64; __vdso_clock_getres_time64; local: *; diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index f7a2f5dc2fdc..3eebeddbfd18 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -10,16 +10,17 @@ #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); } int __vdso_gettimeofday(struct __kernel_old_timeval *tv, @@ -27,11 +28,12 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, { return __cvdso_gettimeofday(tv, tz); } +#endif /* CONFIG_COMPAT_32BIT_TIME */ -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.55.0