From nobody Tue Apr 7 23:41:17 2026 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 AC1DE3F1675; Wed, 11 Mar 2026 09:31:52 +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=1773221513; cv=none; b=nPovN2Qju0uQw1ZiqSLWVO8oiJwLzsEFy8ZPO/tIZqTJ3aSBDrt3nPZuqkw4HSwk3tdw3du6TdFKVHp5rIYXU4dPt2MP4fMVqJ9rbnA10KXGtK01cTlbE8KvvMOjO9Vt0T4Lgf6ITFFqddwUMngolwiCVCNSbZSjIPzDURB+CKM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221513; c=relaxed/simple; bh=/8XKKSVwqR2NyMLr/GdhUnmN4mqs5B3IDG8mdXLiGvc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=FslqXMSvuCwbc/RraLX4uw3rdGLa5qhjjdqzwVfPNcAZ58OyZor7ZAMVoBCr5tqezFpON75P+WLmaTWrc31NSX3QLLOJx07AwPINfyKQD9WquNR7xUN5CNo+WJ6vtkKx1HJm5WwRkodFGzA88cmenbbpA5NhjFTXsx6mEupGcr0= 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=C51hXqMF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jtAq8LQ4; 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="C51hXqMF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jtAq8LQ4" Date: Wed, 11 Mar 2026 09:31:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773221511; 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=7iMcj5aUycv+ckRsVKCbjITfmnkMZtZN8YQSDBd2Zzc=; b=C51hXqMFzF9P8SbciXgLAPP50o1noMkYMP5yQOoO6JnyGA7haZf3hYnflDnEJ5pfBLyfxt +dJs9s9A51MaspsaQujwa1Z71XFsnV9D7NChsxdaldGojWvUN+VQTDevoBUxV1cwkTWO9N +yyatuNC8+KDFy6cGbNa+YONgxVMkC87mL4+GEoXp3fWBSOVARLamDkr4yrHflkyV6frtX cWXpGNkd9Y4mfhfsW+lk/70CcW0wP3Fa9uKnj+Jk/daEjnyOizQnQe90mN69hjAm/Fxa45 RZcXc1wduaU/s0IPeVFRluOYwUTSFwR8YluhSaWkbdMCkxfeRUckzOtaDfIPdw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773221511; 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=7iMcj5aUycv+ckRsVKCbjITfmnkMZtZN8YQSDBd2Zzc=; b=jtAq8LQ44LpS+dJtgz1n9Kl72J1aaT72cEBeNb/5cxYM5C/EPHE/y5AoY+29XUpdKrtMUf 0GpAU5ytqFgBfPCw== 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] asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , Arnd Bergmann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260302-vdso-compat-checkflags-v2-5-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-5-78e55baa58ba@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177322151017.1647592.1935700303330754752.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: 62357a5888ea6ef81f718eee20ad962a1101fb96 Gitweb: https://git.kernel.org/tip/62357a5888ea6ef81f718eee20ad962a1= 101fb96 Author: Thomas Wei=C3=9Fschuh AuthorDate: Mon, 02 Mar 2026 08:58:41 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 11 Mar 2026 10:15:43 +01:00 asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG The value of __BITS_PER_LONG from architecture-specific logic should always match the generic one if that is available. It should also match the actual C type 'long'. Mismatches can happen for example when building the compat vDSO. Either during the compilation, see commit 9a6d3ff10f7f ("arm64: uapi: Provide correct __BITS_PER_LONG for the compat vDSO"), or when running sparse when mismatched CHECKFLAGS are inherited from the kernel build. Add some consistency checks which detect such issues early and clearly. The kernel-internal BITS_PER_LONG is not checked as it is derived from CONFIG_64BIT and therefore breaks for the compat vDSO. See the similar, deactivated check above. Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Thomas Gleixner Acked-by: Arnd Bergmann Link: https://patch.msgid.link/20260302-vdso-compat-checkflags-v2-5-78e55ba= a58ba@linutronix.de --- include/asm-generic/bitsperlong.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitspe= rlong.h index 1023e2a..90e8aee 100644 --- a/include/asm-generic/bitsperlong.h +++ b/include/asm-generic/bitsperlong.h @@ -19,6 +19,15 @@ #error Inconsistent word size. Check asm/bitsperlong.h #endif =20 +#if __CHAR_BIT__ * __SIZEOF_LONG__ !=3D __BITS_PER_LONG +#error Inconsistent word size. Check asm/bitsperlong.h +#endif + +#ifndef __ASSEMBLER__ +_Static_assert(sizeof(long) * 8 =3D=3D __BITS_PER_LONG, + "Inconsistent word size. Check asm/bitsperlong.h"); +#endif + #ifndef BITS_PER_LONG_LONG #define BITS_PER_LONG_LONG 64 #endif