From nobody Tue Feb 10 06:27:42 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 4458F33A9CE for ; Mon, 12 Jan 2026 07:58:37 +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=1768204718; cv=none; b=s6lhJ6SijAijqtq1+z8mvy9swHN2LlEpZwgT5QDa8mhkhBVaR8K9Ixp8YRR1uPjRVYNRMYvVitbBGpod0FXjEYm9cVpoed86vVZAIjCeROSVSCaay9S5d//fxOKz+tHu2LX6cZ/ht6aeZervf4TSSwUVGHPkv0s+Uy07kIaGq04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768204718; c=relaxed/simple; bh=fz1o/QC//id3SLCiEx9I+QB/CLj6vfH/ATM2HwtC2M4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZSVJvnyAd9aHm8/o1XD7UOulgnkf7EN1R7kJZ7K6Qe0UY3z6+dPBKNua3MX8uU3EuWXltxw4vluQ+Ejn17ImmF/0wGVPBjHx6J7gnjXJOzrrC6KViWSUBlQ3XM8EbTwtHTCXIyQ8nIOX8jTUEKN2zksXd/OpCEewLOVP7Xpxs3g= 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=omYMiVgy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jAfZhu7+; 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="omYMiVgy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jAfZhu7+" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768204715; 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=5s1E1yisqHJGGPTpys4I/1xezHpPYE2+zak8zKkm6YU=; b=omYMiVgyCs2/ICjIBKHk+uRwVKqb2olpwT7SpzDhB5GVFq48MzJ/sHFdjM4oNWLwQPBxU1 3PA9Ne8I1jwRRzFiSEzVJKc1Y3TnnU7FehqUKshQKo30JlPtUldAKsCrRR86DmO/d9WYsX 1ChFodv4xO9yMpZ3gyslxtwEtuBJHm7JrxA3oogmrtvYjhn6JY2NS3zhhWpsMxbl8HG2// rshFGY/ctXk7vLOxa1SiNGOW31cMo+JVvMnQgcVTAZSdeaYiksXAd8TaGKo3QBr5T39V+h URj92ms8uHNgAFFrEbBODFt79o70DbqwZElk/n00VaztdlOVJCKc6EKsmg4/4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768204715; 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=5s1E1yisqHJGGPTpys4I/1xezHpPYE2+zak8zKkm6YU=; b=jAfZhu7+MYFHbZQYp4Wr1DEqaexq5dbKqNHBkWycp5xJn1kHg0vAMVoGlzZuplCYqAuNVf srmP/2rF5wWJuFBw== Date: Mon, 12 Jan 2026 08:58:30 +0100 Subject: [PATCH v2 2/5] ARM: uapi: Drop PSR_ENDSTATE 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-2-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=2940; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=fz1o/QC//id3SLCiEx9I+QB/CLj6vfH/ATM2HwtC2M4=; b=SgLGFJD93/ax6KUVAdEqFkrrtteLzYnyVrgmZLmHAO3OlDxH1a9NqMhU6ejqJ2eiYW+IB+Olx MoK7VJQoUOYB/DXjxAg1+xBNyQ+JiDlDEEof/TKvPnQt3686DHOkcx1 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The symbol PSR_ENDSTATE is pointless for userspace. Drop it from the UAPI headers and instead inline it into the only two callers. As as side-effect, remove a leak of an internal kconfig symbol through the UAPI headers. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/d2ad12f2-3d65-4bef-890c-65d78a33d790@app= .fastmail.com/ Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/arm/include/asm/processor.h | 3 ++- arch/arm/include/uapi/asm/ptrace.h | 9 --------- arch/arm/kernel/signal.c | 3 ++- scripts/headers_install.sh | 1 - 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/proces= sor.h index 326864f79d18..bba83228bc22 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h @@ -73,7 +73,8 @@ static inline void arch_thread_struct_whitelist(unsigned = long *offset, regs->ARM_cpsr =3D USR26_MODE; \ if (elf_hwcap & HWCAP_THUMB && pc & 1) \ regs->ARM_cpsr |=3D PSR_T_BIT; \ - regs->ARM_cpsr |=3D PSR_ENDSTATE; \ + if (IS_ENABLED(CONFIG_CPU_ENDIAN_BE8)) \ + regs->ARM_cpsr |=3D PSR_E_BIT; \ regs->ARM_pc =3D pc & ~1; /* pc */ \ regs->ARM_sp =3D sp; /* sp */ \ }) diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm= /ptrace.h index 8896c23ccba7..2ef917957005 100644 --- a/arch/arm/include/uapi/asm/ptrace.h +++ b/arch/arm/include/uapi/asm/ptrace.h @@ -102,15 +102,6 @@ #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ =20 -/* - * Default endianness state - */ -#ifdef CONFIG_CPU_ENDIAN_BE8 -#define PSR_ENDSTATE PSR_E_BIT -#else -#define PSR_ENDSTATE 0 -#endif - /*=20 * These are 'magic' values for PTRACE_PEEKUSR that return info about wher= e a * process is located in memory. diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 79a6730fa0eb..7be9188d83d9 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -337,7 +337,8 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, return 1; } =20 - cpsr |=3D PSR_ENDSTATE; + if (IS_ENABLED(CONFIG_CPU_ENDIAN_BE8)) + cpsr |=3D PSR_E_BIT; =20 /* * Maybe we need to deliver a 32-bit signal to a 26-bit task. 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