From nobody Thu Apr 16 06:57:10 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 46CAC201004; Mon, 2 Mar 2026 07:58: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=1772438334; cv=none; b=WJdnvk2Jqy9ANuYI0jgp5Gi9+edP0xTJAgc1aXiSen/RNrFPMskCSb742cgOithDSOsHLFp0hVHM5MeW4CxdARoNFF2SB7hZahFwMTyRexEtFNy5CRBCQ5EagmUXhbMo723aM5yiCNwiHI9+H+6mhVPX3O5Gb2QRq7x69eNnohk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438334; c=relaxed/simple; bh=5ZtWeLoIG1DUjNycBMtCEpprUXPJS/yxYX1kXl4i0fQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mPO4o05hL95hL+oyFcfvmkwhD/jjwDg+e8u4U3Q82Ex5zFOFLN8rpjCOrV9JJ476WViszteLMnUr/8V3Jckg/OwKhF+LpYi2AlxFymrQH6prd/G9E56JAgS6jx7z35r43wUBXGDGgr391UcpYfFoPL2jn66rb2x6eeM4NqQkNEU= 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=bxHB4cE7; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=efvxVqum; 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="bxHB4cE7"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="efvxVqum" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772438330; 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=jDCrcHt8O4dhTht762Lzzs+IBKZYqdQLeGb4eSwA3mw=; b=bxHB4cE7MnNYGC3LGFJQZbAqR1AX7Fj2u4K/iJg3DmTgTPv6SMfC+jLrKfrfo48cNHCdcS kHgm1LXOX3Ulk7YNyobEBm6LA3UE+JS/ajFt59GmEeArXLSu9TZbpwBY0V4leeH+yaR59D tZJTJ+Qk1vW2vXSbeMLxeaOej/OSpsZaSsUEoHAb0/9/wyJobZOuZeR+HK69qB0I/SQ2i0 gU5Z769UJXIQa4xv9omtW2LTJtS2OQAUvJ10ZjYFfCCIgEfO9N3H2fTgFPSsZZnDq9OG47 Jf/T4JWoaDBRD5aq5CZMdxKd01JAbK9NjJhb68w+D2/ObDrUR52dcQH+0oGmbw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772438330; 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=jDCrcHt8O4dhTht762Lzzs+IBKZYqdQLeGb4eSwA3mw=; b=efvxVqumAur2T8LG28u5Yn0U0H8bRQKwT+Jh2uOlOmK4nUzUOsltLyESAuNhzX0970V5P6 r2bYGqMgv6Z8JFCw== Date: Mon, 02 Mar 2026 08:58:37 +0100 Subject: [PATCH v2 1/5] 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: <20260302-vdso-compat-checkflags-v2-1-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@linutronix.de> In-Reply-To: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@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 , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, David Laight , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Sun Jian , kernel test robot , Dan Carpenter X-Developer-Signature: v=1; a=ed25519-sha256; t=1772438327; l=1516; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=5ZtWeLoIG1DUjNycBMtCEpprUXPJS/yxYX1kXl4i0fQ=; b=+NVtnS6EyY2Yoq5xKj8da3D2ktgjWUTfvnaXTMMqFJhyaa85rPvEJd4KytnY3lc96J0g8mRrj KMacJ1WhtFWAPq9kCvYgoREx0uRXMt7AQbPWjwUKsysaifcS2+RVPku 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/ Closes: https://lore.kernel.org/lkml/20260117215542.342638347@kernel.org/ Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202602111941.PIhubgrb-lkp@intel.com/ Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Arnd Bergmann --- arch/x86/entry/vdso/vdso32/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/entry/vdso/vdso32/Makefile b/arch/x86/entry/vdso/vdso= 32/Makefile index add6afb484ba..ded4fc6a48cd 100644 --- a/arch/x86/entry/vdso/vdso32/Makefile +++ b/arch/x86/entry/vdso/vdso32/Makefile @@ -15,6 +15,10 @@ flags-y :=3D -DBUILD_VDSO32 -m32 -mregparm=3D0 flags-$(CONFIG_X86_64) +=3D -include $(src)/fake_32bit_build.h flags-remove-y :=3D -m64 =20 +# Checker flags +CHECKFLAGS :=3D $(subst -m64,-m32,$(CHECKFLAGS)) +CHECKFLAGS :=3D $(subst -D__x86_64__,-D__i386__,$(CHECKFLAGS)) + # The location of this include matters! include $(src)/../common/Makefile.include =20 --=20 2.53.0 From nobody Thu Apr 16 06:57:10 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 76151335562; Mon, 2 Mar 2026 07:58: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=1772438333; cv=none; b=oxD14TsSMUZN/d8mmTYWIKUfBgrwYK9APxOO/w2hJOgRxX6YlkDyytUeL/Gmbs0XLwbqls+hew4VkKp0rBAS5HT5nz2o6WpGV3H1eXXuHQfbIrvDF2ECrSuuyiUg5cJRCMDjYn/+B6tItjVQSTVlzmulU0PMkvhRSuSpTjDEbOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438333; c=relaxed/simple; bh=+ZNTvsS03cf/7hGvDJacLfCnOSDvf3VWGwKmuX5AIIY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oDeorQqSnzrfKJip8kzkSovdb79JpMlIXM40tc1Gb/4QZPp/fW0RplSpKoKtAubVHf7XcEXGLxW+WYQuG1C2ujOfUOMm80qQ0v/75oJVMP3QesXAC9ovNjKH+xWtoY/tCa9FxnMQQXaAFO3HudChtbH1LzbiiH7rDUE7uOsdckA= 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=uyjMEpDU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fr/HGqXy; 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="uyjMEpDU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fr/HGqXy" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772438331; 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=hYzDmJLESQDE0WGZOLxDeZB0k8diDoIRXYV8eHmiP4I=; b=uyjMEpDU+Ms1HTL60KWTsXDcQuLD7b4yjxeGhF8tgVTjQ2kkhq75vsgmGnXpq+8cnTXa4D NlV740cDY97hzfhxaqf+46PapcgZHM3gq8CE8RIib4dlrrZ3dXD6rVbf3QDfoCPW+Wl9CV fIAojNCIpmwsadApQeVOp0XlGmzA+oCh36feTuw2rjfy8hvAU0NO5gPPZA5ZQz4FnwJ/6p krCJW8vtMkGUvKjS2hJDtWYE5zCYVvUYmirfs+VbjdnrpMiGWrnjkAGBsJkUvnf8rIMIAf /4rnpF5/Ap+e6KKVqMrxmtke0Oq/DcTrDVeTWQGALaRy8CLcZnadb4lYmSPpPw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772438331; 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=hYzDmJLESQDE0WGZOLxDeZB0k8diDoIRXYV8eHmiP4I=; b=fr/HGqXyWU3Kci3r+yPCt6+p6Pqf+02Ssd1Pb1zEsVJbbH9+n0SKw2uwMCxMhExtDcG5VA 3gqEiOxkN1sj6jDg== Date: Mon, 02 Mar 2026 08:58:38 +0100 Subject: [PATCH v2 2/5] 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: <20260302-vdso-compat-checkflags-v2-2-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@linutronix.de> In-Reply-To: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@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 , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, David Laight , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , kernel test robot X-Developer-Signature: v=1; a=ed25519-sha256; t=1772438327; l=1447; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=+ZNTvsS03cf/7hGvDJacLfCnOSDvf3VWGwKmuX5AIIY=; b=kspaAO2Nd+J47AMHG0hbuL+BuqH4VXDaOrQx3Oh8u8q9Ts994YT8aym1Wgdi+yqmVAf1E3CFM xPP9byI6x8wC16gAJRbrSBAnEgOpEOXAIgsN+ha/IFSD+jCl89niAri 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: kernel test robot Closes: https://lore.kernel.org/lkml/202511030021.9v1mIgts-lkp@intel.com/ Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Arnd Bergmann --- 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..7d6e3097ebfc 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 $(filter-out -m64 -D__sparc_v9__ -D__arch64__, $(CHECKF= LAGS)) -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.53.0 From nobody Thu Apr 16 06:57:10 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 0FA8E337BB8; Mon, 2 Mar 2026 07:58: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=1772438334; cv=none; b=WwGwB4Fh8pTStjqDmZ6Un0V0EDk4YuNx5mUcqqCaXkInlsKAdFQ4hWPUDSouZ/njTlWaSkFRrk04NEn8aD4uaPSim1280NNqoJNp/A3J/INdMJYqN57ZV4KaCoosC3Ebzc4NJGVCPOw6elA+f10y4AfA33HkuPG2eAD02pvQ6/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438334; c=relaxed/simple; bh=BTq+tG721IWvmNZKRhmYuiBTJvXYohTSP94/jYKFkyc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WMcwXZc4UgRYAjNTeKihX42Opw4H3uPUZWA5boA7dWiJqdDYTsST+7NVni6P/JFgUht6f4Rrm7ae+tyvWipOV2JHfOSZpytEG06vFC5RXcfZ9/AB31ujiTL03cG1e5Ai4c9sO8oo8vNysiwGh16KL2lzXv7Ez92T8WD/iPux8Mo= 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=ciydefi2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=/oOqZJOd; 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="ciydefi2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="/oOqZJOd" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772438331; 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=UF10sktaE3a/u60QuU3fU7HqMA3bwXEWu54Wnq4Vn5g=; b=ciydefi2+IGpGjxuJ8S0Pi+V3OE2L2KTESiiSpFlWMdULYcmkYxxE1PJyxSZo34YX9HCvC otxxjHp2oFTPL9j9x3qD59f3ZnvENSKPwzlcjDF9gwOAoWjmGg+Kl2GOzjsuuqOkUN8EFR MpaBg4Wm8BR5LSNmS/vo72/wV/m8ujzC+zXJsxM/E5eHSDwg5a+SCYVX5LcbFGs9WLZx1o IqabJtHg5sn7IO0PwbjNhXU3mLreIj2ehewv2aXyfQnB+vS6/6g72GHvLiu7IUXCA2Dns3 jj6Qctvz2ySNMQjcEbRkObXtPQ32W4ozS6FFjJEQYmO4+ZGx86/y86p5sT36/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772438331; 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=UF10sktaE3a/u60QuU3fU7HqMA3bwXEWu54Wnq4Vn5g=; b=/oOqZJOd60lffdI+2m/cDGB+gvLeO1GfCoV5HvJr4+3CHFqEyKt8w0Em37WkJfh2QW+Rxk lrrT3Gblc0IA2uBg== Date: Mon, 02 Mar 2026 08:58:39 +0100 Subject: [PATCH v2 3/5] s390: Add -m64 to KBUILD_CPPFLAGS 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: <20260302-vdso-compat-checkflags-v2-3-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@linutronix.de> In-Reply-To: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@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 , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, David Laight , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772438327; l=1115; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=BTq+tG721IWvmNZKRhmYuiBTJvXYohTSP94/jYKFkyc=; b=sX+mpo7qFfoRgBke0bz6zAxXtqo1MhErKWEmsMFk1R+7DQ6DdvNT3JOeYuQjWk75pK4XrWWHX /ugF1GYyl71DtJ1gQ0FcfcZ9SjFd/F4MkzoR7GPOsO1elfICLhEYH+T X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Some non-code files, like linkescripts, are preprocessed with the C preprocessor and make use of regular kernel headers. As -m64 is not passed to those preprocessor invocations this leads to an inconsistency between __BITS_PER_LONG and the C type 'long'. An upcoming consistency check will be tripped by this. Make sure -m64 is also defined for those preprocessing steps. As KBUILD_CPPFLAGS is inherited by both KBUILD_AFLAGS and KBUILD_CFLAGS, drop -m64 from these variables. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/s390/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index d78ad6885ca2..02bc948a4a56 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -12,8 +12,7 @@ LD_BFD :=3D elf64-s390 KBUILD_LDFLAGS :=3D -m elf64_s390 KBUILD_AFLAGS_MODULE +=3D -fPIC KBUILD_CFLAGS_MODULE +=3D -fPIC -KBUILD_AFLAGS +=3D -m64 -KBUILD_CFLAGS +=3D -m64 +KBUILD_CPPFLAGS +=3D -m64 KBUILD_CFLAGS +=3D -fPIC LDFLAGS_vmlinux :=3D $(call ld-option,-no-pie) extra_tools :=3D relocs --=20 2.53.0 From nobody Thu Apr 16 06:57:10 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 9B17B3859FD; Mon, 2 Mar 2026 07:58: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=1772438334; cv=none; b=Wf84wQgXZKhyclmU0qfqFIiiJk2a8GgIfUVYBAsn2eGWCHK25PCZcW6ofiyTPNUpbfTHEXFS1w9JTWjxyE9iiJseAhVrI/PanyFKqKPghLxAEV8NsMCibIJcCEJJjTPI7MZNmFdIqOC3ws15zWBotQIhT/GSwC6x7o3mQBHX7do= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438334; c=relaxed/simple; bh=CVSp9N7ojydH+g55wpL0oEQy1NPWvz/8vcri2dbmViY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sxL1o7jwMui/ePuy1568JCB8nHMN3GWxbovj0KIsGoGeSNQFOrwv/q5VTflLWgU6cPIV9RXnibwqSE9cjO+p9HYWq6SmICqdH2teOYG67+25QJ4lVSOy1OHs5tYAkQVo5w2krPYP/2kPMCy6AqxIK2f8GdP8lx+BukvF+iiLWPk= 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=HLcwMe71; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=P+DKLgDO; 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="HLcwMe71"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="P+DKLgDO" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772438332; 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=8mcgepFI0mjBE0CWOdrG5t6m+R1W63RB4CuAREY+63Q=; b=HLcwMe71m9ympi7l8ojF719Wk0h5dn83FMfTV2eQj+BsIGnoLt//wF957nA94RMrcQ+cmP qEC5Fp6Iyck1YtuGVOrktMAZlKQHS9yEcLQmo/0wcN7rgByvJbjRgbQRJ4C26cNL0Kf0gN eGssvjqFfCb3b0h3edf16P2CoW1NLM2vfN5yicNUdGT5MB0EDEDaXA6ZMY0MagK3NbS6BC 9QdfYfxeKl1IcOkuSxQNEGL2+uvVZJWE7va6DfdZnxVpiYTRSienFC/jT5xg8PPopE+j7j Xig5KOwPNRDG9jfz2/lrP/9iUFo5fA9iSHIPhf6qj6eAMfPdiLjACBWXGcsq0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772438332; 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=8mcgepFI0mjBE0CWOdrG5t6m+R1W63RB4CuAREY+63Q=; b=P+DKLgDOi3dnOL/kQA6aCgkM34iRMwcaE2eHH/CHlKfBv8Ls2GwbOPP9cSN6G7kAkOHhWN 4m0jvGhZo/3wd4BA== Date: Mon, 02 Mar 2026 08:58:40 +0100 Subject: [PATCH v2 4/5] powerpc/audit: directly include unistd_32.h from compat_audit.c 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: <20260302-vdso-compat-checkflags-v2-4-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@linutronix.de> In-Reply-To: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@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 , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, David Laight , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772438327; l=1025; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=CVSp9N7ojydH+g55wpL0oEQy1NPWvz/8vcri2dbmViY=; b=5UJigRuF1ls39QQ7kYsZuAT52JM94nxcB/HBtSSri5qEB/zHIEP+ctD0UzjErLMR8hzmiHDY+ asSEu4ht1X7COVSQi1dPSE+PM1nFTj8O0AyRPzX/iKSvzdf9gNJv3ej X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= This source file undefines '__powerpc64__' to get the 32-bit system call numbers from asm/unistd.h. However this symbol is also evaluated by other headers, among them is asm/bitsperlong.h. The undefinition leads to an inconsistency between __BITS_PER_LONG and the C type 'long'. An upcoming consistency check will be tripped by this. Directly include asm/unistd_32.h to get access to the 32-bit system call numbers instead. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/powerpc/kernel/compat_audit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compa= t_audit.c index 57b38c592b9f..b4d81a57b2d9 100644 --- a/arch/powerpc/kernel/compat_audit.c +++ b/arch/powerpc/kernel/compat_audit.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -#undef __powerpc64__ #include -#include +#include =20 #include "audit_32.h" =20 --=20 2.53.0 From nobody Thu Apr 16 06:57:10 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 D8F9C3876C3; Mon, 2 Mar 2026 07:58:54 +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=1772438336; cv=none; b=kt21sGpqWToVxzOcb5dIFhvcPMdf+H7a2FcxJQg8AQFUCy7YgoFbKduJKyiLdbgMOz8JKIzVfHX15kaLC4RDEH1HjgpcjK3AUlASenCrVHykh2kk2XB2xLYOGhX+cyj4lwPuZHXzS3uthSW/lf5NmZ0WO4NFbF6aiij2uJ08NU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438336; c=relaxed/simple; bh=rruAPBqVSw+HPUqu0oOkWelmtswIYn2lhLTqTiJ53vE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KvkzCEuiBBCn1I2oezmVll0n6zo75D7bLPn0n27mFWBeYtrvsg4GA3rSHAsMhEzamirj2/cOddqUOgmx0S21waIyF9O9J1EPhxFzZbnZg4ZxwGjcYpbuuPIJWEseSv72oVRTPbAJlWNmQZKOwzEqB2+9mWDcSa2Um479NW162+E= 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=p8FqyHOm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NP4qPJlE; 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="p8FqyHOm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NP4qPJlE" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772438332; 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=7mI2rabXaAbR/YnFrW0tM4r08T3dQVWOtIR4ie4zo3o=; b=p8FqyHOmkJHYpPNhYhThF45B8NXfjuqeW+KMfD5NSW9slZ2D4dzWmXRdwTy+zwB7hmgeyp AIqtPPv02rHjZuORVE4prl2ouDsyZAuf4VbIczoF4L+WQpPOY99MUuDzBW3iplsio1sdvO KvSGB1GT/HEwoEaIn6hMflsAk/TIkaawbL+tPgUWWqcacZXLj8oxRhsXPP4AXkz5u+/0ZF kMKJXzxj0tEvWDN3SpNXOT6UReGvlzcQ+oZP0E0j697ochamdnqIIXB1AihPSC5MqDLQ+P dSmv9tBH7s5JpOHa1wzR/iE4sexOuiyjF63ZkaIyau09sJbUxOkUQzgUXyd9Dg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772438332; 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=7mI2rabXaAbR/YnFrW0tM4r08T3dQVWOtIR4ie4zo3o=; b=NP4qPJlEsfbZcsJh2MCzm7yhxzQLQGDYH6J0mbdc3AB7YcExGhGSt0Qf6n+bYKzrMJe4MN 8Kj4DO9dM580BrCg== Date: Mon, 02 Mar 2026 08:58:41 +0100 Subject: [PATCH v2 5/5] 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: <20260302-vdso-compat-checkflags-v2-5-78e55baa58ba@linutronix.de> References: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@linutronix.de> In-Reply-To: <20260302-vdso-compat-checkflags-v2-0-78e55baa58ba@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 , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, David Laight , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772438327; l=1561; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=rruAPBqVSw+HPUqu0oOkWelmtswIYn2lhLTqTiJ53vE=; b=jsEuD2JRemugj3Kh+6TKAD0gkuvtmrqxpibTTZZ8prtNXAz7vSKNElj3VZrERLX5EQ/DGzIub eOVRbIPOYXuD+pT3ErAQIm4w1IhPu9WROaT/REZDfb6RlybADa6wjC7 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 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 Acked-by: Arnd Bergmann --- 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 1023e2a4bd37..90e8aeebfd2f 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 --=20 2.53.0