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 DC725422550; Tue, 7 Jul 2026 21:54:40 +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=1783461282; cv=none; b=Lxa8xl5FhWoPJEi4dp7pROffXux55hIWzkLJdpyP0ANlObNlJRcZKWD6pSuoiQdbBxE78Lv8JINbKrjy0nt0jzqGWaOcAgbsXTC9aTHSM3VsK9PYQynmK0V4/fB6tDRZrPU/lnaaJRyCeWwFykLR8H9OCOXUxR9RSnsbs/Ivf7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783461282; c=relaxed/simple; bh=+8mqlFQB7aDIi7+AVoUu1M9lXNVmrLJmYVIfrd804Hg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=k5ysprFc+jTeN4MXmhqYq9bN2m7THLDbv6FU7PNe5a+1XMBVEh/myAZ6zqu4TdeFaY/mNKnFkksrKNxHgslzDZedjLNM2C9qOvXi+GMR7BPNcBTL5yxswoq86NYyr//aW3FmsruXQKg23tn9ozRGOLWEarofDJqGhRcL61waU7A= 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=eMsJowcs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RMPIxY9v; 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="eMsJowcs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RMPIxY9v" Date: Tue, 07 Jul 2026 21:54:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783461279; h=from:from:sender:sender:reply-to: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=TuajlQAIBGdPG4nT44RWn/kDspRN/R1uZ5Cly+ShJWA=; b=eMsJowcsKLsGjg+cA9dNJpPRblQHKs+CPnuc9KpptG93iLPGF5Nh+6JjJt65Lekpy+7qbH Geob8LCtoTURtRLr21cH5QPJGU3x0EuSKyrK7Pkzmm6fc4CYFRb6b/Tsg7BwB1hD+Jk0ds VI7Q66u0VeCveWUA42HfvbLCrH+PsQ3L8HmjlkUQrmpUGYzwFMGxJ8k1WRi6NvXM0tESXX DjKdcX7B/JWwnCZmS/6ywh40APRuZTUsbow1qCM1hAAQIW8tDTAjVHudcq3tI9HL7JnQUC TACRBAqDyrU4WeNZQHU+tYDaR1fbuOcS8RL+rmKijsq6cv5NMnV3xFk7uqDuug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783461279; h=from:from:sender:sender:reply-to: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=TuajlQAIBGdPG4nT44RWn/kDspRN/R1uZ5Cly+ShJWA=; b=RMPIxY9v/Orp1rSvK+oIdwcIUFeAu6Fkw6g54yYxMR4ZByXWDtOMZZG0c8gV8A0A93yX6E mo1h2WjCOZxS/5Bg== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/vdso] vdso/gettimeofday: Verify COMPAT_32BIT_TIME interactions Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , philmd@oss.qualcomm.com, Arnd Bergmann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260702-vdso-compat_32bit_time-v3-9-db9f36d8d432@linutronix.de> References: <20260702-vdso-compat_32bit_time-v3-9-db9f36d8d432@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178346127750.744054.10293702070070173472.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/vdso branch of tip: Commit-ID: 369cecd238ac8317cccd27cf2452a8a6b6da1581 Gitweb: https://git.kernel.org/tip/369cecd238ac8317cccd27cf2452a8a6b6d= a1581 Author: Thomas Wei=C3=9Fschuh AuthorDate: Thu, 02 Jul 2026 10:21:33 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 07 Jul 2026 23:52:54 +02:00 vdso/gettimeofday: Verify COMPAT_32BIT_TIME interactions If CONFIG_COMPAT_32BIT_TIME is disabled then the vDSO should not provide any 32-bit time related functionality. Add some build-time validations to make sure the architecture-specific glue satisfies this requirement. Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Thomas Gleixner Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Arnd Bergmann Link: https://patch.msgid.link/20260702-vdso-compat_32bit_time-v3-9-db9f36d8d= 432@linutronix.de --- lib/vdso/gettimeofday.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c index b8c1fc8..f7a591a 100644 --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/gettimeofday.c @@ -25,6 +25,8 @@ */ #include =20 +#include + /* Bring in default accessors */ #include =20 @@ -325,6 +327,8 @@ __cvdso_clock_gettime32_data(const struct vdso_time_data = *vd, clockid_t clock, struct __kernel_timespec ts; bool ok; =20 + BUILD_BUG_ON(!IS_ENABLED(CONFIG_COMPAT_32BIT_TIME)); + ok =3D __cvdso_clock_gettime_common(vd, clock, &ts); =20 if (unlikely(!ok)) @@ -354,6 +358,8 @@ __cvdso_gettimeofday_data(const struct vdso_time_data *vd, BUILD_BUG(); #endif =20 + BUILD_BUG_ON(sizeof(tv->tv_sec) !=3D 8 && !IS_ENABLED(CONFIG_COMPAT_32BIT_T= IME)); + if (likely(tv !=3D NULL)) { struct __kernel_timespec ts; =20 @@ -392,6 +398,8 @@ __cvdso_time_data(const struct vdso_time_data *vd, __kern= el_old_time_t *time) BUILD_BUG(); #endif =20 + BUILD_BUG_ON(sizeof(*time) !=3D 8 && !IS_ENABLED(CONFIG_COMPAT_32BIT_TIME)); + if (vdso_is_timens_clock(vc)) { vd =3D vdso_timens_data(vd); vc =3D vd->clock_data; @@ -481,6 +489,8 @@ __cvdso_clock_getres_time32_data(const struct vdso_time_d= ata *vd, clockid_t cloc struct __kernel_timespec ts; bool ok; =20 + BUILD_BUG_ON(!IS_ENABLED(CONFIG_COMPAT_32BIT_TIME)); + ok =3D __cvdso_clock_getres_common(vd, clock, &ts); =20 if (unlikely(!ok))