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 9525A42A7A9; Thu, 2 Jul 2026 08:21: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=1782980503; cv=none; b=aph2vfD0UqvMk2ahNaP7h5OxsMkrZcTzeX/gnEAKIvi0RqetjE7L13OIzO+wDpZm11hD0BxZ7roJck5UAwj/1Yg+A/Qcx9FBfS3UC8a1QXSz2etaBgHq7dpPn83W5YbOd2gGaTZypqeU+zwHhRe8jpU6Klzi1Cjw4zqlebP4G8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782980503; c=relaxed/simple; bh=db+HUQOgoPhMZomGV9E3SOxOlzH0qf2UqfHYn/OzdpY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J6z9hqDup9kCKq51YEyfoJyYPQBKcrv3mh9+A1AKKWAd44rvDYnqX0Zi1pmWOJXYIcOYZubp+NOIx+MoCsFCj2GjfdU9aimxWNrjeqd1ZsQEameqaK8ji3Un6c/x6SMUiGCc3Crf/rAl+8nb2Bx3RZI8jl7ctOqOd3GMWJ33Axk= 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=XVc1AG4v; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=C2lbJx/l; 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="XVc1AG4v"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="C2lbJx/l" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782980501; 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=DYXRa5l/CdD2C2xpitWtlaAFbTnk8w36CIwHuGabkYg=; b=XVc1AG4vsrK0a7pnM0dkUyJxPGcDwnMXfIP4DbrVYlHn6kiVr1r162htY+reuvexes8urw N/2VHDtf7YxNvAUy1ScxDHZunjondJaxA22XZiph+OZxWheOwn/4cKcWYffJHnqSYbwrCX pz4RDXLDP8Y0+tVodVMunXHaUWA+9LuM8zF8qieah1vt3egwRfjEtVS9inb5Cnjnud0pg4 4uVrDGPhMk+uesnzQaCOnoni3VwcbTUuIHhc4iyUicNJFjzy7DQAsoYdhqLgo+2MLSmit2 kpLeQMduwCTRA0kgYlsa21CwEHLZ+RhInVFxinq8gykNGhOIRh9x4Zk/HSj86g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782980501; 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=DYXRa5l/CdD2C2xpitWtlaAFbTnk8w36CIwHuGabkYg=; b=C2lbJx/lDZIbv8xS2JUlHrr/Y0I7SrYde892VNhJtwBeXer8ftSR9ALwWmLL/uMpl2XBXc iPRj4S0f234rCuDw== Date: Thu, 02 Jul 2026 10:21:31 +0200 Subject: [PATCH v3 7/9] MIPS: 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: <20260702-vdso-compat_32bit_time-v3-7-db9f36d8d432@linutronix.de> References: <20260702-vdso-compat_32bit_time-v3-0-db9f36d8d432@linutronix.de> In-Reply-To: <20260702-vdso-compat_32bit_time-v3-0-db9f36d8d432@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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1782980489; l=1652; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=db+HUQOgoPhMZomGV9E3SOxOlzH0qf2UqfHYn/OzdpY=; b=LaLkTIW5BQe8nXjVz9t/ub5bfz3xAP/47ZQj5zxKD6mwfTVfpm4LyKgHZg4jRmIjques1fK+g MWN6JfPtX18DwYmzCmzpAkao6Iyb1LT3juNvIOoagAPUvhrF3B2B9Ba 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. Signed-off-by: Thomas Weißschuh Reviewed-by: Arnd Bergmann --- arch/mips/vdso/vdso.lds.S | 2 ++ arch/mips/vdso/vgettimeofday.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S index 278ab6444e98..b11ee493c67f 100644 --- a/arch/mips/vdso/vdso.lds.S +++ b/arch/mips/vdso/vdso.lds.S @@ -97,9 +97,11 @@ VERSION LINUX_2.6 { #ifdef CONFIG_GENERIC_GETTIMEOFDAY global: +#if _MIPS_SIM == _MIPS_SIM_ABI64 || defined(CONFIG_COMPAT_32BIT_TIME) __vdso_clock_gettime; __vdso_gettimeofday; __vdso_clock_getres; +#endif #if _MIPS_SIM != _MIPS_SIM_ABI64 __vdso_clock_gettime64; __vdso_clock_getres_time64; diff --git a/arch/mips/vdso/vgettimeofday.c b/arch/mips/vdso/vgettimeofday.c index 00f9fcfc327e..a1fb06b8973e 100644 --- a/arch/mips/vdso/vgettimeofday.c +++ b/arch/mips/vdso/vgettimeofday.c @@ -12,6 +12,8 @@ #include #if _MIPS_SIM != _MIPS_SIM_ABI64 + +#ifdef CONFIG_COMPAT_32BIT_TIME int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) { @@ -29,6 +31,7 @@ int __vdso_clock_getres(clockid_t clock_id, { return __cvdso_clock_getres_time32(clock_id, res); } +#endif /* CONFIG_COMPAT_32BIT_TIME */ int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts) -- 2.55.0