From nobody Sun Feb 8 16:12:40 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 C21B52E03EA; Fri, 16 Jan 2026 07:40:51 +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=1768549253; cv=none; b=JUzntmsXQXzy/Nfkwy4orKsAYNoWCpnNN/aTQ9ft2TcDCPdMnNz+tn1y0akOVVmOegxVnJZRSWIeswIlyUUb2G7zf0YO/o8MjdShX+c/V4dcuYfntIKshXYY82uiKuFf2RUPcb7gXMEIcquHVl4j73sLDaKap3+azzKmX/VUS28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549253; c=relaxed/simple; bh=7teLdiabr9gzZFxBT7yVIs+xm2LR+TxpwbFKw+jdnMQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TjbbBAGWcB3qrS7RAhmSa1TjLW4EvLD1WpttdpF7cy350WMpye/Njg28olQMFz2nwgDjoigu+esDnic1+yGYiI1zr8J7m3XhScdu1ZFf4yZCHPyekzkUca0v/n6eR6WV22aUPfxclXxYxMDHMIZ6HAkCmzqI+DFZ/w+hoo3t5dA= 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=BXgnMOdN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wrdQk5I9; 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="BXgnMOdN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wrdQk5I9" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768549250; 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=wGlcXRYVBwExM0rRQdy6sucMiGtLR0ho2JhjSoimGCA=; b=BXgnMOdN3l9jc59a9PBJ1BoA9MW1BpgySWr09Uw+HCmurprL7Oruyt6EHOD4u0b1KTScbM LSOcien52VWAr4xSUhBFlsIaZ2fBU6hirkG/HP11kdXi6TSu8EIhUFyOffu7Cx6nI9oIAy wWARItgIcT6orlNKffa4kNwol2OEwzGgxH6JEGvlYbzoNz/JQrMHP+PzI+lQ8sYah6pdrH XfQ10Lxn8keQYrnecJhs0842Lfcs2quRLzOvdvlKbxEpf4Kd5Nhx/JW0ACQSG6cee5sMAX /4uXH9FJ8e0Pqfp8qj72u1ULkUd27kSwRui8WU0hQDeRGwI2OcG3lfztun3W6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768549250; 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=wGlcXRYVBwExM0rRQdy6sucMiGtLR0ho2JhjSoimGCA=; b=wrdQk5I9bnKTvYheXpWDYN1R5f8N+BhbQdqYBmzxtIFB+cHkpkP9zmUbkuFCbyQ4LurL4+ e1bAdWzXtetkO1AQ== Date: Fri, 16 Jan 2026 08:40:24 +0100 Subject: [PATCH 1/4] sparc64: vdso: Use 32-bit CHECKFLAGS for compat vDSO Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260116-vdso-compat-checkflags-v1-1-4a83b4fbb0d3@linutronix.de> References: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> In-Reply-To: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> To: "David S. Miller" , Andreas Larsson , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , kernel test robot X-Developer-Signature: v=1; a=ed25519-sha256; t=1768549244; l=1394; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=7teLdiabr9gzZFxBT7yVIs+xm2LR+TxpwbFKw+jdnMQ=; b=TqIQrqyBly5afX0eQk3+j16jTKkGeKkqE8As+HS8Q0nOgHv1xwdMKphg2R2xoi5V0pR8m4hoH 7glHPBHxJZwC3sagFe926hfBk/np1GUUls+nkgHZtnDlm1Jq9Vo6qNm X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= When building the compat vDSO the CHECKFLAGS from the 64-bit kernel are used. These are combined with the 32-bit CFLAGS. This confuses sparse, producing false-positive warnings or potentially missing real issues. Manually override the CHECKFLAGS for the compat vDSO with the correct 32-bit configuration. Reported-by: From: kernel test robot Closes: https://lore.kernel.org/lkml/202511030021.9v1mIgts-lkp@intel.com/ Signed-off-by: Thomas Wei=C3=9Fschuh --- The actual false-positive is only reported when SPARC is converted over to the generic vDSO library. However the issue is already present. To avoid dependencies between different patch queues, I have this patch in this one. --- arch/sparc/vdso/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 13f1d7be00f1..945d917b0058 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -90,6 +90,9 @@ KBUILD_CFLAGS_32 +=3D -DDISABLE_BRANCH_PROFILING KBUILD_CFLAGS_32 +=3D -mv8plus $(obj)/vdso32.so.dbg: KBUILD_CFLAGS =3D $(KBUILD_CFLAGS_32) =20 +CHECKFLAGS_32 :=3D $(CHECKFLAGS) -U__sparc_v9__ -U__arch64__ -m32 +$(obj)/vdso32.so.dbg: CHECKFLAGS =3D $(CHECKFLAGS_32) + $(obj)/vdso32.so.dbg: FORCE \ $(obj)/vdso32/vdso32.lds \ $(obj)/vdso32/vclock_gettime.o \ --=20 2.52.0 From nobody Sun Feb 8 16:12:40 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 7247A2EB87B; Fri, 16 Jan 2026 07:40: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=1768549253; cv=none; b=c2losmR5gePv8ca9oyiB0sVEmHVwOJvv1LJm9nFXboxmTStA77hWlZtCtHNtrPgdCVwLFiZ7/qkWzOoImO/JQslYF/kF5BSjVZ/snMLbvSfWdmTK+bfP1Ox8IsYB3OFaRAUxaUCfBqW5hrt7C/QNsOpd3TUtqeajRH48Rt4KkhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549253; c=relaxed/simple; bh=lqXvxP+gCfaptsVzNWLlgWlWjUdHwQ8wW8T0HKnCg3s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m7DMZT0hn17SfNM96dPtes9I50uvI6rn88g7O0m4IJ/crZBWz34jU/kjUhPGIgm+5rqhnvodHGq+arncivbFZDv0SypkRKRkZnfqffiqARM/QLGI+Wh6EX6rnzuAsL69IQB2IyCDG0QQA49OflCf5NFZQ4hb3UvoHS6z0dvYbiU= 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=NVgWoqCk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9SA5UQ28; 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="NVgWoqCk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9SA5UQ28" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768549251; 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=A3kzEEwBQs6AOSErqsf9I2P8aQVakryJpsMKuhd3a5c=; b=NVgWoqCk5HZazPDGJmNUMLRc9EO6EbSC9nS/7PGhVmMfAxSHJrk3K1rx3lOSoLeICHrKOp xPemFewG91xl0X6Jg+qHq3owIdr7UOA6CLP6tad0bN9uzxitabNDZcPzvyu7nOx4nC0k/k VsrTJqBjm75PO3nwn1Pu855A3vUS8wNoSK214SmKbflWnnWAtTq1s87xv4ulAyTDAET793 b0v52bKFmD5HigGJGzNYT+BNgh5jiYtsY16SPGS3pof0r8Bek/g626H8nkE8jQapQKw1OG h0mO9HpXwGVfMVi+PznXYttjQrS11M7oO4u8HgJJ5eBJoqleL77E0hv6o/KTxg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768549251; 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=A3kzEEwBQs6AOSErqsf9I2P8aQVakryJpsMKuhd3a5c=; b=9SA5UQ28WjshB0EWN+0u855HS3n06VYZlRvxU7ZqhrtxYi7UA1iy61kXFKpTxpL3YvmylQ KGcZDVC50W8f0YAg== Date: Fri, 16 Jan 2026 08:40:25 +0100 Subject: [PATCH 2/4] x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260116-vdso-compat-checkflags-v1-2-4a83b4fbb0d3@linutronix.de> References: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> In-Reply-To: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> To: "David S. Miller" , Andreas Larsson , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Sun Jian X-Developer-Signature: v=1; a=ed25519-sha256; t=1768549244; l=1162; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=lqXvxP+gCfaptsVzNWLlgWlWjUdHwQ8wW8T0HKnCg3s=; b=2vBvZqq+rjB7qvEWCRHzJ7kyBYkI8/FqHuqMN9zTJBwaQ6ZRIB+VoeIrntiXvyH2nZrpn+K6J ZaMl64/uVZ9AumbXz2NR6vZWNpILR4EW9qXZrIkK+WDnZBEa8EBF7HM X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= When building the compat vDSO the CHECKFLAGS from the 64-bit kernel are used. These are combined with the 32-bit CFLAGS. This confuses sparse, producing false-positive warnings or potentially missing real issues. Manually override the CHECKFLAGS for the compat vDSO with the correct 32-bit configuration. Reported-by: Sun Jian Closes: https://lore.kernel.org/lkml/20260114084529.1676356-1-sun.jian.kdev= @gmail.com/ Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/x86/entry/vdso/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index f247f5f5cb44..ab571ad9b9ac 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -142,7 +142,10 @@ ifneq ($(RETPOLINE_VDSO_CFLAGS),) endif endif =20 +CHECKFLAGS_32 :=3D $(CHECKFLAGS) -U__x86_64__ -D__i386__ -m32 + $(obj)/vdso32.so.dbg: KBUILD_CFLAGS =3D $(KBUILD_CFLAGS_32) +$(obj)/vdso32.so.dbg: CHECKFLAGS =3D $(CHECKFLAGS_32) =20 $(obj)/vdso32.so.dbg: $(obj)/vdso32/vdso32.lds $(vobjs32) FORCE $(call if_changed,vdso_and_check) --=20 2.52.0 From nobody Sun Feb 8 16:12:40 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 E5C8E2ED84C; Fri, 16 Jan 2026 07:40: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=1768549254; cv=none; b=jmmrsgIUsZi69aF8BscLUGhCxvMbQfAq22LK7SzcdiLha4uvcMu0hAxhylGHrxb5FEwSjqhdifUeNNtNUiBURJXQ/WfoVtqgVsNeXmKBjnEzoNZ08/k/oEHZ6OoSqfJ64HhuUBwdRjJMa7LzU5iEhSr6eQYBMET6YiY7nhNLWRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549254; c=relaxed/simple; bh=jDKXGIaHSXmKwFavO2zuQUucrccQopH1XvLa3LHnaNY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GL+deBVcEmKAuQEVANY2CFGBo/TuHqdWJLWY1WDNHqVzZPCa8aDR78p8lMOmNGEFJUK0M1TeLy1tginLEri/s3X5woAmFN/QrSjW69z7j8Iq3tuxabMROn42ap3t4a4W51LPfrcKSsoqYAFoqBd7hQLDHrdWOmbpzLHOOkWWWyQ= 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=0ciqSo+X; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sVjuZmgA; 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="0ciqSo+X"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sVjuZmgA" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768549251; 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=629a2D2m6hH8crJSEFdPQCXMW6yyZzypvSaYKarHFYA=; b=0ciqSo+XIEsTWIJz4h0T2A8vUS9TrqoWZ17izTHsY+0TTHAEfmGr/ANh8KIW73aY2GYuCg TJRp17I1uCqbLWEF7YGo9nZ7PDVE3U8rHJBcxgYVcW5y9pDQ+2fPusRk6moiNEpB4/QTok 3JsI5TJvgQH1YEdsKC0LO/9qtpHTHgF9iKiQIHnMIjFY1K+2MRf/7sPKjKTcJ1JLCVyR1Z EtQ6FNONqSpaEj1Whl1wV/gKyvbhDFgGzEHQLLz8SvBtadpveaaneZQ5s4Bp2Dg8/TykjJ oK/ooUZAWNXwO/i+xhmRJkbohBFJB9woyrqHMDp0mA2j1HrbprE9V3M9rS8z8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768549251; 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=629a2D2m6hH8crJSEFdPQCXMW6yyZzypvSaYKarHFYA=; b=sVjuZmgA0GxBOs66OZZEp1Kxg4iZ8JEySwWF5/DSg8W0EJZYFoQ2ZgXH2qqoASAEWtQ5vx olyQoRF7W6DarODA== Date: Fri, 16 Jan 2026 08:40:26 +0100 Subject: [PATCH 3/4] s390/vdso: Trim includes in linker script Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260116-vdso-compat-checkflags-v1-3-4a83b4fbb0d3@linutronix.de> References: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> In-Reply-To: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> To: "David S. Miller" , Andreas Larsson , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1768549244; l=1076; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=jDKXGIaHSXmKwFavO2zuQUucrccQopH1XvLa3LHnaNY=; b=HRoll0lE3aGyyzORr3jDwHsehY+oH94EhXQRGkwkbQJq7eIVZ5bcSOSV+M4f/bJKyOL5KWcl0 hTFq9NFN7SOAGTePGJWTWxUqF4zYKyPfhJPWquEFcPOb2BS7VePGvZ4 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Some of the included files are unnecessary or too broad. This is a preparation for a new validation step to validate the consistency of __BITS_PER_LONG. vdso.lds.S may be preprocessed with a 32-bit compiler, but __BITS_PER_LONG is always 64. Trim the includes to the necessary ones. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Heiko Carstens --- There are other ways to solve this issue, for example using KBUILD_CPPFLAGS +=3D -m64. --- arch/s390/kernel/vdso/vdso.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/s390/kernel/vdso/vdso.lds.S b/arch/s390/kernel/vdso/vdso.= lds.S index 7bec4de0e8e0..c8abd00799be 100644 --- a/arch/s390/kernel/vdso/vdso.lds.S +++ b/arch/s390/kernel/vdso/vdso.lds.S @@ -4,11 +4,10 @@ * library */ =20 -#include -#include #include #include #include +#include =20 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") OUTPUT_ARCH(s390:64-bit) --=20 2.52.0 From nobody Sun Feb 8 16:12:40 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 8881933469D; Fri, 16 Jan 2026 07:40:53 +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=1768549255; cv=none; b=dPQ6NIEbOAEFT8+7GimBj0Izbz3i2Y4FLaXapqMBznpQUXYXewlRB7Vu/VqUxrtGuYwf5EBSnA+7D03cGUXTOdy3767hnaSm3MjCj3BU88SYPbXD2yuNCKKoewWmbXLGDM8f+I03/seVK2jb8sk5sSjWvVbrZiQZnAEFCmBbDXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768549255; c=relaxed/simple; bh=ZMUlth+kblN6NPXVUxOuSxnHAh5gAYx5wUWTtZVX5/E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m5q228vUk+C0lp5/G8+dxbg/gldkl919MB5OFQJiZNFAcx9sc+FKNNFlSaCHxGHb92gNF04QTGnWuLfYRHV4Tbx8YnU0UNmdp3HdEfZnUfhV+pfr+rRw51t+1iJGYKGzedKf4gbvs1jenTP6NUnJWT1o2UUt0R7na5JCUkkA6yw= 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=wN3Jic61; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Wv82rY5o; 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="wN3Jic61"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Wv82rY5o" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768549252; 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=evDbMYS0g9UrvxuAXCAO/jHj3NYMiqhUUYHBfAdf3yA=; b=wN3Jic61NGPYHNyWsMPqfPU72UywCPHzh9QApGZD06eQ1SxXGb+aXvXlpYWsNIb/B/N9ax LkNRVYbomjwimT0Mm6DIGsgo3R7LKGW4UCXyL5VjSvPgcj9wvofyGmLuRj4nfk2Be8QYzB 8rpQbhwdWNuNAoD4aWDlhczl847ac7NdcY55fywbHr8D1DECHWwN41EyqX3+0QYwRdbRyF mP8fvkmcokcZKZecUoCDsw2AiePyh+U2/UCPnzSSTeRsNenI0Elf3GnTic//zbUPYF4/H1 m0DsXK1wxQXhtWQJ9S+Neh6ouIcPbvWpg1uNTHEuS7PCc8Dc2jmWD2YMZNSgWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768549252; 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=evDbMYS0g9UrvxuAXCAO/jHj3NYMiqhUUYHBfAdf3yA=; b=Wv82rY5o7SKFGl2O1nq3RgAyVyi0ygj52Yhp8GGQwgaCEkIOxU533vwn6bXP6+XgyU4sZe DXG48CATI+9nMuAg== Date: Fri, 16 Jan 2026 08:40:27 +0100 Subject: [PATCH 4/4] asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260116-vdso-compat-checkflags-v1-4-4a83b4fbb0d3@linutronix.de> References: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> In-Reply-To: <20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de> To: "David S. Miller" , Andreas Larsson , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1768549244; l=1835; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=ZMUlth+kblN6NPXVUxOuSxnHAh5gAYx5wUWTtZVX5/E=; b=tG4PmK71uCx9cB0GXt050Qh4ar45wzLJrIEQq+bWRKq0qaioB2MenSYHXMJUcSA4vkDcrvRco qCcYPcs2eWnABNpMn3LYMImPjtMul73ZE/LwPs86N+3OuVUx2bdkohX X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= 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 tests are added to the UAPI header to make sure it is also used when building the vDSO as that is not supposed to use regular kernel headers. The kernel-interal 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 in include/asm-generic/bitsperlong.h. Signed-off-by: Thomas Wei=C3=9Fschuh --- include/uapi/asm-generic/bitsperlong.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/uapi/asm-generic/bitsperlong.h b/include/uapi/asm-gene= ric/bitsperlong.h index fadb3f857f28..9d762097ae0c 100644 --- a/include/uapi/asm-generic/bitsperlong.h +++ b/include/uapi/asm-generic/bitsperlong.h @@ -28,4 +28,18 @@ #define __BITS_PER_LONG_LONG 64 #endif =20 +/* Consistency checks */ +#ifdef __KERNEL__ +#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) +#if __BITS_PER_LONG !=3D (__CHAR_BIT__ * __SIZEOF_LONG__) +#error Inconsistent word size. Check uapi/asm/bitsperlong.h +#endif +#endif + +#ifndef __ASSEMBLER__ +_Static_assert(sizeof(long) * 8 =3D=3D __BITS_PER_LONG, + "Inconsistent word size. Check uapi/asm/bitsperlong.h"); +#endif +#endif /* __KERNEL__ */ + #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ --=20 2.52.0