From nobody Mon Feb 9 03:20:00 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 1882C227B94 for ; Tue, 30 Dec 2025 07:11:00 +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=1767078661; cv=none; b=sa2PTxWibLDtGa60HO7Mp+5V2ZBHY7OmvQRaq1FQlXh2/8uS3GKaOPHXcy6kjc6akMntFIBhr+Y/SDHMZeQMZrt9FuTMhkL+mhqHUik7HIeXbte3lqiqd5WWkkqQMXNp9fzvitqb5va6/OFXrZrqvWLiexTVx+aWocKkf+ZkL9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078661; c=relaxed/simple; bh=h1MsBNdSKkOd89IIdtn656mx/NIGmUDhFE20RygCuoU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tPRZXrkoYij0jSl1+plG73UJq1YVL5vOHlq8j5f7MkdslOkAfqAVAkEFRz5HuINGP0Vmd3wjClYBnHuD0w9uXxhGQrrlVheKgbCx+ngnMka9SJa19z8LaLtOMqe+h1K8KiuCoVc2TO3GoaY/hhKcwSl9JxeFOBJ1sWamcU3dbs8= 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=KSl10LEq; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JFVEiJ44; 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="KSl10LEq"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JFVEiJ44" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078658; 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=in4GJONd74GWeqIRrh+mhY9mjCdUEPtCPJkNmmK3dx0=; b=KSl10LEqr/doF+o6gyht4lon1lkLhhl3VQsI+FN0oKGdKZF81JQ5TBLhx8JjAXdfPtV/iC qIQe9SLAbZ7u78i6vU13HOwGTDtESkeTZE01qFQM/HbaFGg/QsJzJERHuFUimNX4nkMhkH yWppjl9wXwW6jxEHQyRdsV9sS2QxGboN3U8wFHP6++KaAmqYR00boru3w76lvro2+hoLCb ZLzouH0vqWsz2fC5HFVMzJ4+/EPnaRabQCoY/jDNl1AINSAxIXq7OusWq1H94ZNeCz8XB9 vszHjs5fTseOyn4Rys6OQmcNtDkmzumuvKscR3XDy1PIKs+CnOovd4QAms5RsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078658; 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=in4GJONd74GWeqIRrh+mhY9mjCdUEPtCPJkNmmK3dx0=; b=JFVEiJ44d+GfnQqgHc3+1EeDwJ029+GMLn+V4OaWKdUlKfzQnoPJNnxhE3f66VRRbCjYMn osfYUe6Js6nm+MAg== Date: Tue, 30 Dec 2025 08:10:56 +0100 Subject: [PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace 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: <20251230-headers_install-config-leak-v1-1-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> In-Reply-To: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> To: Vineet Gupta , Russell King , Dinh Nguyen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078657; l=1530; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=h1MsBNdSKkOd89IIdtn656mx/NIGmUDhFE20RygCuoU=; b=t2Rp3UhE6erZ0JNQ1XxNhg5jEn4P9iBsZ/09JRJ2bo2X/yGCssXYNY4IStsp+xa0U7RwYhsBQ ySdxSZoNqX0DTmDu2Y1foVt+pYmJn89SmQTeVL3L0ryhJvptgl6oKap X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= UAPI headers are not supposed to leak references to kconfig symbols. These won't be set when building userspace. Hide the kconfig reference behind 'if defined(__KERNEL__)', so it will be stripped by headers_install.sh. The result for userspace will be the same, but the exception in headers_install.sh can also be removed. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/arc/include/uapi/asm/swab.h | 2 +- scripts/headers_install.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arc/include/uapi/asm/swab.h b/arch/arc/include/uapi/asm/s= wab.h index 8d1f1ef44ba7..b2cede1b74b9 100644 --- a/arch/arc/include/uapi/asm/swab.h +++ b/arch/arc/include/uapi/asm/swab.h @@ -20,7 +20,7 @@ #include =20 /* Native single cycle endian swap insn */ -#ifdef CONFIG_ARC_HAS_SWAPE +#if defined(__KERNEL__) && defined(CONFIG_ARC_HAS_SWAPE) =20 #define __arch_swab32(x) \ ({ \ diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 0e4e939efc94..727f7f82c2c7 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -70,7 +70,6 @@ configs=3D$(sed -e ' # # The format is : in each line. config_leak_ignores=3D" -arch/arc/include/uapi/asm/swab.h:CONFIG_ARC_HAS_SWAPE arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8 arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT --=20 2.52.0 From nobody Mon Feb 9 03:20:00 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 8CCCF2DF14C for ; Tue, 30 Dec 2025 07:11:00 +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=1767078662; cv=none; b=uevguvTbrx9t+eIa9f/kG+nyX1UOAivOiy3xiKcipg2ThqbWlbj9u5dsdD58zDJkbeRTuPTsh4uvGs7YyvnfMFC/O2fHtrci+J/r5JkqjpIpQpwiL0zRZNLB/j6uccx2R2y5otd3ZNLmhlHJIIUYEHJV5bSiFhP2heNOzQop6io= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078662; c=relaxed/simple; bh=dlMzPHrReQ/pbAK9lXDYAAj3fJdbnf/meKB9Kt356Y8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VEYocys1t/YdWSsuwwogyznQzg884hKwA/uDrasXehQjTVrdyTacjQoy7yQR1ppkh5xOjlawwI4Ntt/69dXX+aEogLZw936MIyhUro7WzUu20kQi2wOG9nO0SX2EF2JpicrChEFJw9k0peLwJIx6LY+zTPtpq1/juOOImbRHBGc= 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=EPru/JBd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CH3rtd9E; 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="EPru/JBd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CH3rtd9E" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078658; 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=j8y8y0Vihpsa7kuidmjsGKlmg3PpJ4ZCRAtbsIsvEA4=; b=EPru/JBdop90f20HwDMYpSDZfSu7RVm5ZonqWojoxnwP0ttp730pwGhgu+dcN2QcLVGnbo R1xPksWm/cDo8tOxhAzfTemulMqdtxAUiBnTeh/sgtOjFdbOnGdoafIFG8G1XWGOTUbnuV PvsiL59O3N5vAanT5C8+mFKWWiBSckzkZvPaZL4jwQvR4/dTsb8cJxHGMo33N8gIz3IGQB Y+6pGztPk3G/1Y/ek3HXKk9EPrHNR8vqsM/0Jps2yy42l3fYxQEUennmR5Bk4kB9BMhvYb Oby8T8BN8jGtTZKGcQcCvkdL5fkzFOfcaLa+Thgc8OZunk54ld/vJWUyx5R48w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078658; 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=j8y8y0Vihpsa7kuidmjsGKlmg3PpJ4ZCRAtbsIsvEA4=; b=CH3rtd9E772ePoMaKS1UNf/jOc7XYb1l2Rk95sRGGqKZAlJR3w34KPDweNubhBMDgyL4ld 4z38lK3DT3eCFEBg== Date: Tue, 30 Dec 2025 08:10:57 +0100 Subject: [PATCH 2/5] ARM: uapi: Stop leaking CONFIG_CPU_ENDIAN_BE8 reference to userspace 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: <20251230-headers_install-config-leak-v1-2-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> In-Reply-To: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> To: Vineet Gupta , Russell King , Dinh Nguyen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078657; l=1602; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=dlMzPHrReQ/pbAK9lXDYAAj3fJdbnf/meKB9Kt356Y8=; b=VfzyRNZ1kLHgDwyWyW6WGerkr2OPyUdHI92dxkNl9b8iSqPsOW9iadOCl6gKfQ3SCWmNwnWce BIxUeFaUYPOBS6RhRUr7D1L8LgIRkGJoyigr3HSPh05xywhCVZgb5ac X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= UAPI headers are not supposed to leak references to kconfig symbols. These won't be set when building userspace. Hide the kconfig reference behind 'if defined(__KERNEL__)', so it will be stripped by headers_install.sh, the same way other kconfig references in this file are handled. The result for userspace will be the same, but the exception in headers_install.sh can also be removed. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/arm/include/uapi/asm/ptrace.h | 2 +- scripts/headers_install.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm= /ptrace.h index 8896c23ccba7..fe656da1701b 100644 --- a/arch/arm/include/uapi/asm/ptrace.h +++ b/arch/arm/include/uapi/asm/ptrace.h @@ -105,7 +105,7 @@ /* * Default endianness state */ -#ifdef CONFIG_CPU_ENDIAN_BE8 +#if defined(__KERNEL__) && defined(CONFIG_CPU_ENDIAN_BE8) #define PSR_ENDSTATE PSR_E_BIT #else #define PSR_ENDSTATE 0 diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 727f7f82c2c7..4f03521f4026 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -70,7 +70,6 @@ configs=3D$(sed -e ' # # The format is : in each line. config_leak_ignores=3D" -arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8 arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION --=20 2.52.0 From nobody Mon Feb 9 03:20:00 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 63D6A2F656E for ; Tue, 30 Dec 2025 07:11:01 +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=1767078662; cv=none; b=sugD50ToK1uuIVpcnwWQvD5Z7406/9/axkLH4I9DHpfYGWD3iZ6a14BVJiEsHH3LeyNlufqwzLqrgzVBsv6QGN+yxUEyJS4cwo8xqvAHLOvwsDtJ4SzpW1eDN3yGi3RcnewHAHbG81QveDgjN0JVJ6yHjXEDAp8m1SWkuDGRW7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078662; c=relaxed/simple; bh=n9zn4K/Hu7Fta3297AtI35P1y+fLlUk+UIK90uLO2Gk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Sr3c0NoDesuE0zRlVwv6y9yqY2L0/MV/0kdmMfOPCSJ81SbQg3IdMqUHPUwZDpOPJ1R65Th7w4x7qHJWTytWog4DJitdzc8UThhmgfChJUzB8RTrkRLEASqk2rFSvTfpalu/EE9TCrJgQmWZdZhbdH0dUBy/WNrD29IHqIGc8ZE= 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=hsuVNeIs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GIVvWqOa; 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="hsuVNeIs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GIVvWqOa" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078659; 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=T4/bNZrUYTbxYxNrc58e0uJZN6c9cRUxViZqrgTyrx0=; b=hsuVNeIsqG+mp9hett6W8DjHHiEpQ6s2Ho/Td0fRW71oUG+rYuSSfZq91hgaFgiRczjp1Y voLAxW0UmoN/kotLkDRkcu9gJigMuTvHLkiscMLnSYSp8TXVs80qz8YQ2E4BiDFtRnHzOD Ek7BWrFUUU7O++M33LyONfs/PfD2djwH2pzAZBpP/Ln+CWczbbw67udib1WdYy3bJw8mry kDKLpaRqKTiO7e2g78DigGcWrlsKexkeaWI5+o7LSLQdp+WCwhZcoMVDiezUaQfYjlIKBY ZC/5yoDj6LS5TYIByw4ZARygb+8eIVEcnQY8RrHoKtukzxIoOJ8Bc3N8STTrtQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078659; 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=T4/bNZrUYTbxYxNrc58e0uJZN6c9cRUxViZqrgTyrx0=; b=GIVvWqOacv2Vx/tzMallrDWHecJqxqWGHuyDaSQdA8bQDAnAoIA7/AA86aAHaGJtIRhjfv b4WxnNlqFsCRA4CA== Date: Tue, 30 Dec 2025 08:10:58 +0100 Subject: [PATCH 3/5] nios2: uapi: Stop leaking CONFIG_NIOS2_CI_SWAB_{NO,SUPPORT} references to userspace 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: <20251230-headers_install-config-leak-v1-3-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> In-Reply-To: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> To: Vineet Gupta , Russell King , Dinh Nguyen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078657; l=1689; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=n9zn4K/Hu7Fta3297AtI35P1y+fLlUk+UIK90uLO2Gk=; b=z57bRP/lyKdng7CDc9KNssbRyXisTA525qNWfLIqSqxCBd+OiPFi0tHkwlZuZAWi578OPYPSe nCI2sAmmFr0CkBFmwSGAUWfzScu3QlmGj83lokWClpqSYYYBRUD58aX X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= UAPI headers are not supposed to leak references to kconfig symbols. These won't be set when building userspace. Hide the kconfig reference behind 'ifdef __KERNEL__', so it will be stripped by headers_install.sh. The result for userspace will be the same, but the exceptions in headers_install.sh can also be removed. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/nios2/include/uapi/asm/swab.h | 2 ++ scripts/headers_install.sh | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/nios2/include/uapi/asm/swab.h b/arch/nios2/include/uapi/a= sm/swab.h index 9750547a5f82..bbfa9bd10b2f 100644 --- a/arch/nios2/include/uapi/asm/swab.h +++ b/arch/nios2/include/uapi/asm/swab.h @@ -14,6 +14,7 @@ #include #include =20 +#ifdef __KERNEL__ #ifdef CONFIG_NIOS2_CI_SWAB_SUPPORT #ifdef __GNUC__ =20 @@ -34,5 +35,6 @@ static inline __attribute__((const)) __u32 __arch_swab32(= __u32 x) =20 #endif /* __GNUC__ */ #endif /* CONFIG_NIOS2_CI_SWAB_SUPPORT */ +#endif /* __KERNEL__ */ =20 #endif /* _ASM_NIOS2_SWAB_H */ diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 4f03521f4026..613f400a67d1 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -70,8 +70,6 @@ configs=3D$(sed -e ' # # The format is : in each line. config_leak_ignores=3D" -arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO -arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION arch/x86/include/uapi/asm/auxvec.h:CONFIG_X86_64 " --=20 2.52.0 From nobody Mon Feb 9 03:20:00 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 7EED52F25F2 for ; Tue, 30 Dec 2025 07:11:01 +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=1767078663; cv=none; b=YvVTfBfxnEPziOuQVu8h4psLfj3DfrZyG22+x8wvjMhTvCweZ4rmmZ5E4vDXkLL+0RWX6vtKag5xXz4ISNcazkPr2I4/4MIQ4FbGFzJFGrnws8UJIyy8r2IvKdgqJRc/TnuufrAwDNrvo2S798lgC0O7pJD+WewalRHaM8x8dCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078663; c=relaxed/simple; bh=ZOE7KyuSlKH6XcxA1h4Q37Qp45CteslFj5lH67emOQk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OHFRLk+sJduuxqdJmA/I/hcA/aAjvXd4AHAEows8Dbu8OyVj6ZIhENVnil5uLqvk38Tso/yf1NzcGNdpfaSIHmt6gQp1fvKtC3kxPlNlFEh7TmmSTK7vlF5WHZEJA02DhhDqZzev5561l0LoozASfYJxD4hdNW0hVS1R6hlWn2o= 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=JntQ3si8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KI95VUE1; 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="JntQ3si8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KI95VUE1" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078660; 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=216KVOlY02968JQn1X6t3Xl8U0YV+kMSpa6yCEhcMZ0=; b=JntQ3si8MLrP2MpCR1+OEWNd81aJ/qhkCp94JA/Ya1ve8COVEizpQpdOtwHChAXB5kltbU Ws3gZWwf2Myp17MCTCJAHH3HDfVMt6wJROw/X6gVEREUdbBtAjz3EjsUmDRgwyDoRngH/7 vUqd9H/F0U5YB93waS8ZU4vmhBot5MgRv/CEdepkjG0X9nbxTJaJZfd5lG5NteBa4EBVrh 0ErZG2q2WrrcXdkV/rnLgNolfMOXBXWG5PUaxPVlwjiPhdV6g5EITNsDacv+oDqg9I8d18 NZTvPR/bfjFHib8xNSLt7nWeoq0Xu2lY5LG8o+5la0rr3hBMzuZ/PwsHwPzXBg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078660; 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=216KVOlY02968JQn1X6t3Xl8U0YV+kMSpa6yCEhcMZ0=; b=KI95VUE1ItLOgk32L8YjnYbIKghtAzkSpebLn2uXfUH3jy+0BPCOpegdnYYznoFj/i1Wej UZ04m9ZkrtUUVXBg== Date: Tue, 30 Dec 2025 08:10:59 +0100 Subject: [PATCH 4/5] x86/uapi: Stop leaking kconfig references to userspace 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: <20251230-headers_install-config-leak-v1-4-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> In-Reply-To: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> To: Vineet Gupta , Russell King , Dinh Nguyen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078657; l=1557; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=ZOE7KyuSlKH6XcxA1h4Q37Qp45CteslFj5lH67emOQk=; b=OYir6/1EucH7c1HcVMuphZ1xXvzTijkLimlJ4SpgcqZmSSE0gYkERzRWWRVaMrfoovAGdZrxd fDqcdtuv+EaCh+sTYpUahJeWGST4wS+3dsAx5bAB5+bNC+BNgNfLceK X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= UAPI headers are not supposed to leak references to kconfig symbols. These won't be set when building userspace. Hide the kconfig reference behind 'if defined(__KERNEL__)', so it will be stripped by headers_install.sh. The result for userspace will be the same, but the exceptions in headers_install.sh can also be removed. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/x86/include/uapi/asm/auxvec.h | 2 +- scripts/headers_install.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/include/uapi/asm/auxvec.h b/arch/x86/include/uapi/asm= /auxvec.h index 6beb55bbefa4..bdde9e18f94e 100644 --- a/arch/x86/include/uapi/asm/auxvec.h +++ b/arch/x86/include/uapi/asm/auxvec.h @@ -11,7 +11,7 @@ #define AT_SYSINFO_EHDR 33 =20 /* entries in ARCH_DLINFO: */ -#if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64) +#if defined(__KERNEL__) && (defined(CONFIG_IA32_EMULATION) || !defined(CON= FIG_X86_64)) # define AT_VECTOR_SIZE_ARCH 3 #else /* else it's non-compat x86-64 */ # define AT_VECTOR_SIZE_ARCH 2 diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 613f400a67d1..1301ba68d772 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -70,8 +70,6 @@ configs=3D$(sed -e ' # # The format is : in each line. config_leak_ignores=3D" -arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION -arch/x86/include/uapi/asm/auxvec.h:CONFIG_X86_64 " =20 for c in $configs --=20 2.52.0 From nobody Mon Feb 9 03:20:00 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 0F2172FC890 for ; Tue, 30 Dec 2025 07:11:02 +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=1767078664; cv=none; b=VabsyPl6z2beVrXHNFz1vJzvsB5v+LpRaGYrJeybEmulsYezGwMdwW+rxC2FX33pfh28envPoljEAIevSmqLR8FCzFQY2Gb+Tkw2YyQnGDcFYVCo4aUaxeQtmIbSsh+ayTH5/1in8gX4aYNupLc0zKTx1xrUbQCTkvfrJneU/Cc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078664; c=relaxed/simple; bh=3m2ChPrsGt9AyZmjEghF2edS4ROwGKo0RjvgqUHiJ78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MGJKHypfCvz1QAU09GfEmWjf3nPgoU3ztC56d5ZSt0U2cdZbg+B0Q8nLfpRe6tLoJo9MzGTmx/a/osFb8KYNK3GYNF7FsX08LiQl1xRhlsUIb5P+7s6L41LOof21/eSQxt7UTpf9addBOxo0ykLz+cETRVdP1S96d3fQJamkTG4= 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=eI+ulv6E; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XeZFnivb; 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="eI+ulv6E"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XeZFnivb" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078660; 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=+Nm08QPvja+X8sRm8npcNZeirzQwsu4YExZqsNCkcus=; b=eI+ulv6EecfcGflQRPoc2vHM0nkxzmkswCtLR6gSJZ8zOXD2xkfuvc3n7lxrSd4hx3jFvc ZK+JIDZ424h+vq+3ltldhv3xs72qPnqPx4W9MGOppxGxSUmSAbgzYDTCLLDdIMjLAxIdbT BZb+CjQckrOb+Zcq6BcE/HxNItK7sUqm5e/jUA4nAhkomhhzwXeTVJAnEKPr07xmE4yViU zJKzDjnH3jPu8dFqXKjMYujavKXjWULsB2m+Kd328Ev2QHr7p6UrYcMWVPIlRX836CSfdH 33yqn2PySFlYIafa0kTuDs7kdgs1QLk5iRb7HG/u4elhXG0AhcmLS+0Sxa2NiA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078660; 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=+Nm08QPvja+X8sRm8npcNZeirzQwsu4YExZqsNCkcus=; b=XeZFnivbaGws1YFVRSE6I5UJKD//1/a5LT4SNhlbj6BbogesPE1OR89CZQp3DYTp6uAX3G gd32wsqBDU+w5SAw== Date: Tue, 30 Dec 2025 08:11:00 +0100 Subject: [PATCH 5/5] scripts: headers_install.sh: Remove config leak ignore machinery 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: <20251230-headers_install-config-leak-v1-5-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> In-Reply-To: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> To: Vineet Gupta , Russell King , Dinh Nguyen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078657; l=1231; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=3m2ChPrsGt9AyZmjEghF2edS4ROwGKo0RjvgqUHiJ78=; b=w5y4GhWvN+Pxg5pF5YeO1iV331ad5+hzF2z+stSOqnSr6vKFsxQnMT/epvhMh2rMx3tw7qzat yi8NDsGyvfkD4Iulhz4DYvgNpnBCmNhOoGHlNnD0SXIFi+c6kH7Q9dZ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= There are no entries left to ignore and none should be added again. Remove the now unused logic. Signed-off-by: Thomas Wei=C3=9Fschuh --- scripts/headers_install.sh | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh index 1301ba68d772..9c15e748761c 100755 --- a/scripts/headers_install.sh +++ b/scripts/headers_install.sh @@ -64,30 +64,10 @@ configs=3D$(sed -e ' d ' $OUTFILE) =20 -# The entries in the following list do not result in an error. -# Please do not add a new entry. This list is only for existing ones. -# The list will be reduced gradually, and deleted eventually. (hopefully) -# -# The format is : in each line. -config_leak_ignores=3D" -" - for c in $configs do - leak_error=3D1 - - for ignore in $config_leak_ignores - do - if echo "$INFILE:$c" | grep -q "$ignore$"; then - leak_error=3D - break - fi - done - - if [ "$leak_error" =3D 1 ]; then - echo "error: $INFILE: leak $c to user-space" >&2 - exit 1 - fi + echo "error: $INFILE: leak $c to user-space" >&2 + exit 1 done =20 rm -f $TMPFILE --=20 2.52.0