From nobody Tue Feb 10 01:35:27 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 B82C635FF70 for ; Wed, 14 Jan 2026 07:28:24 +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=1768375707; cv=none; b=Dqf7hgseTcvGCe+0y1PxAahiLE2zM2jkw/2eI0F5xlze6ZO0v7WmRBvE6BWRPxr7DteMaVCabrRSQuDrYdakinzxXQbir293ICaW16t8r12A7KJcxZt04B8r4d2bIW7zHj0tAI5yPZrfFdsk9LgPemvjfiXDdP0iK6MP58yM7MY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768375707; 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=oVceDqEcPFc2UibudJbfxnMh+8GUB75ShS6cnKxTm4mg1hjI1bvb4rjKIPvCS/2NtTrAe7egkHggY+LJOmseT5r1VVFRnKhEQjzK1HOsDIHiuTf3FjifEfxwXHijCgc7fMAiI+H1hNB8tMJn6c4mgKz186/GyJzIdTWfARRCQ08= 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=4BbFAtdV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bW0A42Sf; 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="4BbFAtdV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bW0A42Sf" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768375702; 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=4BbFAtdVbeRT7QbtXdm7bwd1qzzQzz3pXAwe++yn8h4N2z4yqZt7qIQUhAXU3dEJ7k2RqK rspzaRRTZEym0P4RUrwgcVmf9CncxjaxxHLHcuELoqDOdB3mhqMJpELLzpGOj/9VuMV0Ug a1sedRk8JNqjLqtaCzo4f2Ef6XTLvPOlsuP9Mec/+tabPFfbtMdDJJMADHB6Ew8JbYCkAN D3B3jbi/QIxjxDYzXOSLBtg7Fm4zVlwRQMkx2m5tAkJsyH8H9XaBWSUl1oTfiO4R2W4jFo pta9lRZETVcj69i9hI4nCuwwZA0pO8sKd6Kiu+vO0skOgOKUONscMrobzrtIFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768375702; 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=bW0A42SfLtA7Amv19PyrViAn0Ddkpow0ImosXbhiOzuhGrK32qVLu8dHt4vjabxoNOyQpn w/fXAZilw5myHUAA== Date: Wed, 14 Jan 2026 08:28:14 +0100 Subject: [PATCH v3 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: <20260114-headers_install-config-leak-v3-2-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=2940; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=fz1o/QC//id3SLCiEx9I+QB/CLj6vfH/ATM2HwtC2M4=; b=J8tj378LP5E6jN1LFUC1whqX29eQyRdeMxXOv8p2BckKLdfyfbJlXwKzRNYpu2PNBehdXAHwT PVdkbcvuBfFDzjLqp9UWLeUVPJttaCMJqqXnO2o4ztQre80S5Ba3IMF 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