From nobody Tue Feb 10 04:17:19 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