From nobody Tue Feb 10 04:08:11 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 5846C33A9F7 for ; Mon, 12 Jan 2026 07:58:38 +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=1768204732; cv=none; b=It+uzYkqQTUzu4ygkmh/tWfKRz5JfbVcIUy6epHvm14nHVsFVRVbU2p7j04rae5CRkX9B/nHktEo8WEF6jlXa1BwMMhIXbqIpUP7vM8Np/rqGtPdSW+66Nw9dBu8espDR0s+4s7egXYzulsCA2neFnlJ5kORx2BFC+9TQBMSCks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768204732; c=relaxed/simple; bh=1ntrFEOo6yMiRT1zeHWBcYc625HQZOv1NUT0dl13IAY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bDzd39Nf8PjKMxefeLB6RQkVwp75ZXM2tkRg8MhqEHozUB8cvFnCyqwpwwUGYNnU4NKjujBhLA96ugCw6miEjD/KJIWui5q6RIGQyzdhlHjQs7h2C5wuLDneDPUbGV2tjCO4TxFKombfuqsv61jOQnh5FQAzN3EJZxfhA0SxClU= 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=VYAB18Ex; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=i2k0uB0u; 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="VYAB18Ex"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="i2k0uB0u" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768204716; 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=Aig1PLerlTshO4U9aCkB6AyEJOyKwJW4ZrYV/oqt+Zo=; b=VYAB18Exhf/aADuuaE9DD/hU/x0uJLEMjUJslnMRp0fqnfzAJZBxsfwlkYR+dIX9y9z2kW EmReRBL83bqkEN6HR3F0m/l3StUFl59Sq9/keBFXbCvC8VMEQX2bfxbFyK03HapA88LE2r mkqCYTG3faLkc1QWFdP/MpyDSxqk6BrwO8EWN5LdJ4VFnLbggsLyLELVxTOSBxajXmlWLn l6iyx0Q+vqfNRuplpsqeR1ZXLXNf1l8lOyWXMlT3LZSupVlXXx2n/UPmeRxZchp6EB56pk 08wJ2kuOA5+fDu676bieLe/GP+5VcFssnD2QJSkwA0A92HxTf1C0GxhUQaX6EQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768204716; 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=Aig1PLerlTshO4U9aCkB6AyEJOyKwJW4ZrYV/oqt+Zo=; b=i2k0uB0uFaluyzydjAKPuMXujYsywjPPFzfDzTvwEe8nRBvKSdxxxxxatUJYO72tEbkq9Y PBV5yQUdWIEzHCDA== Date: Mon, 12 Jan 2026 08:58:32 +0100 Subject: [PATCH v2 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: <20260112-headers_install-config-leak-v2-4-4d8084444603@linutronix.de> References: <20260112-headers_install-config-leak-v2-0-4d8084444603@linutronix.de> In-Reply-To: <20260112-headers_install-config-leak-v2-0-4d8084444603@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=1768204713; l=1708; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=1ntrFEOo6yMiRT1zeHWBcYc625HQZOv1NUT0dl13IAY=; b=4grI2sMTGP7DFiQwLDvxNL2mBz1BsBGNLpD2/jJVu4OMV0rC1rF40fA9mIJCt+4wqJPZHWeLf 0FFlKc6ssrmB/feRGqNaDQ5JhOHt+RR776B81Q0Mzb7t3S93NGQyEnh 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 --- There is no point in exposing AT_VECTOR_SIZE_ARCH in the UAPI in any case and I have another series in the works to get rid of it completely. --- 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