From nobody Tue Feb 10 03:39:08 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 422393612EB for ; Wed, 14 Jan 2026 07:28:26 +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=1768375710; cv=none; b=ap6UMwaQBnh4TnYf8ld4sQiA2UYyokNAcR8SHhG7cIo8RtLJfXSLknfW5SaivUmbQzoTQhyJ7GHLop9zytZ5QXCZQejw2gtjtpkFk4hWxDTLPeUmw93VYTq1bm9/hdgf3mM2J0cCKFVAtHmQiUsV8dEu8Ym7hcF7ptsL/LzjvMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768375710; c=relaxed/simple; bh=1ntrFEOo6yMiRT1zeHWBcYc625HQZOv1NUT0dl13IAY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Vy2XPPwz+0rP3yrmLKjyrGFkb8iJY9Q9sblZKdtvSvaBXB86328CO7obRPdhJAAFgdSZqmpz0OK0M8US93LdehCZT2py6wVxGaXMcw3GiyDIgdsjdjYnkbD+YJFqeMOH1k6PNhF8ylYuDM9x0tDEcr64ct3L4hN9ey2OtZ3iuiM= 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=gaXlW5zA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+CvknTft; 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="gaXlW5zA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+CvknTft" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768375703; 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=gaXlW5zA/MYXd6NbKuezEsmax7N92NNr4JWvZvwHId5OISIAYn8uD46FhMFrA9rhwh2PRT EU0b26GySHVzPsAzOYDbM/keTxzpVFwGiiun2TuBUg0SjiaXLmaSw4FrRiQOQQ9XMbJWPP H2U0UVpJJaO8U29C2enDwnR/UMAAVPLvLhgDXm4BCz/Wm8CvPydD5Uz1rPKaScpvPLSzZQ rgzesRbic6oQ6uN+Kg/qW5KULzgEACr+K8gTep6zyB8EfKJ4cD/jfpsV22tvs/Ghi949iy qP1+gYIKJIv8w9mfjwbEjWjCxH+yuA+6vENEqyRliyuWEZqmJlNFMlp8zP0fxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768375703; 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=+CvknTftYYD7GsBliqMP9VsegNPf4yvMf3lA0DILNaZeqSNhWWacnQesZmGXC/a3+kji+5 9N/szH70sgpJCXCQ== Date: Wed, 14 Jan 2026 08:28:16 +0100 Subject: [PATCH v3 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: <20260114-headers_install-config-leak-v3-4-c14cde735a79@linutronix.de> References: <20260114-headers_install-config-leak-v3-0-c14cde735a79@linutronix.de> In-Reply-To: <20260114-headers_install-config-leak-v3-0-c14cde735a79@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=1768375700; l=1708; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=1ntrFEOo6yMiRT1zeHWBcYc625HQZOv1NUT0dl13IAY=; b=unZ0CyXvkfkoMgqz27osbmzz+sWFiYYt2jt4IQ0m90dr/ZexgmllmyMRDCycdCQ5buZiUfe11 jvv3AV3A6BDC47vBKjbr1LRDnU26RzSjl1j0vpNZO74hj4Hi4fc7GQm 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