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 67CC7480953; Tue, 7 Jul 2026 21:54:50 +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=1783461295; cv=none; b=ScJgi0CRdIU699XAL6wRl1r88uVBeo4e234dIGgOLvhAZxLwwb5CHrHuehoAYw4jnemow+Uz4xwWLCasJHpFmRN0+gGAxpq71PfQ+BueJVhRE9b8t2QhFh8Ms/SFRjm4le+sIYbD+QwvIYPUpZ7tz+jPLaFmjeJ/snV1W8V12Yk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783461295; c=relaxed/simple; bh=PNNCCGHqRhtXNiBi47gfRflo2HcvYvN7+SadnxBV16Y=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=NKcOhQ9MPdNTYW+W7s7/MF4Bg7iBFCtvYSzezfgWrzq4ueYEiY/LHx1fytC28w/VmunTiSp8yuICwBL0FSQyWVcsNmekT8Vz8FLNtW15Tw7UWkSr2RpvE8+oqZoFbIu4ZO/GXS2y2HVgf2bDBKKh0NEWfigyzGHWTSNt0jMUFfE= 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=iE+PVr1q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=83PWDWdI; 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="iE+PVr1q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="83PWDWdI" Date: Tue, 07 Jul 2026 21:54:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783461288; 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=s7jfDJ+fOXWeH1pS5SHw8I5d3deIRwzztDkzSCd8FM8=; b=iE+PVr1qtUV+SwwXHvEwc0xg7u6ustV5WqiLj35xKJNhiQrbGAFOWluV+rvcfyn5Rb1JDF p7QF7iwk8uDinaL5vQdBf2C0JaDz30KkdH34+Lle/ZPrDKS57bzFpEweUAnF/F8TC5LhWK GPjFa2ikSZxXtaUu4w7nUnk9K8Z0pS4MNT91jdVdR5bmqXQIbazQqcPycTL13gQ5KVO77Y +Ztwptmo1mNOtDl6i10WS6JSCC88Q5n03BIoQuf5JV1RfCF4SvuxE8oBnS4vl1txt73UMb gNq0z9Jf5p0ZANfyCMfVf5xBTggKmNu112zK+zwIyoigGOecxdKPJplXOfJ1vg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783461288; 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=s7jfDJ+fOXWeH1pS5SHw8I5d3deIRwzztDkzSCd8FM8=; b=83PWDWdIPy5e/UOamgeXOkByezwUrZeg91a1s5JOtH8JouP+BANVX0cR6q47xf4VWlCdvJ i5jpvJZgMHgr6YDw== 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: Validate system call existence for time() and gettimeofday() 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-2-db9f36d8d432@linutronix.de> References: <20260702-vdso-compat_32bit_time-v3-2-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: <178346128721.744054.12737676507240764648.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: f8b946772554ea11380fe03fc446376794a81a36 Gitweb: https://git.kernel.org/tip/f8b946772554ea11380fe03fc446376794a= 81a36 Author: Thomas Wei=C3=9Fschuh AuthorDate: Thu, 02 Jul 2026 10:21:26 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 07 Jul 2026 23:52:53 +02:00 vdso/gettimeofday: Validate system call existence for time() and gettimeofday= () Not all architectures have the system calls for time() and gettimeofday(). When the system call is missing, the vDSO function should also not be present. Validate that. 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-2-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 e0f289d..b8c1fc8 100644 --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/gettimeofday.c @@ -12,6 +12,8 @@ #include #include =20 +#include + /* * The generic vDSO implementation requires that gettimeofday.h * provides: @@ -348,6 +350,10 @@ __cvdso_gettimeofday_data(const struct vdso_time_data *v= d, { const struct vdso_clock *vc =3D vd->clock_data; =20 +#ifndef __NR_gettimeofday + BUILD_BUG(); +#endif + if (likely(tv !=3D NULL)) { struct __kernel_timespec ts; =20 @@ -382,6 +388,10 @@ __cvdso_time_data(const struct vdso_time_data *vd, __ker= nel_old_time_t *time) const struct vdso_clock *vc =3D vd->clock_data; __kernel_old_time_t t; =20 +#ifndef __NR_time + BUILD_BUG(); +#endif + if (vdso_is_timens_clock(vc)) { vd =3D vdso_timens_data(vd); vc =3D vd->clock_data;