[PATCH] alpha: fix PR_GET_UNALIGN flag mask

From: Magnus Lindholm

Date: Sun Oct 25 2026 - 03:43:14 EST


GET_UNALIGN_CTL clears the flags it needs to read, so PR_GET_UNALIGN
always returns zero. Keep the UAC bits when translating them to prctl
flags.

This was uncovered while running the strace test suite on Alpha.

Fixes: 3185bd261882 ("alpha: separate thread-synchronous flags")
Signed-off-by: Magnus Lindholm <linmag7@xxxxxxxxx>
---
Tested on UP2000+ (SMP). A standalone regression probe verifies flag
round-trips, EFAULT handling and fork isolation. The probe and unchanged
strace prctl-unalign test fail before the fix and pass afterwards.

arch/alpha/include/asm/thread_info.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index d781ac79106d..22c07ce0a77a 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
0; })

#define GET_UNALIGN_CTL(task,value) ({ \
- __u32 status = task_thread_info(task)->status & ~UAC_BITMASK; \
+ __u32 status = task_thread_info(task)->status & UAC_BITMASK; \
__u32 res = 0; \
if (status & TS_UAC_NOPRINT) \
res |= PR_UNALIGN_NOPRINT; \

base-commit: 71cf9644bcb35e686c3e12a703325335a0925946
--
2.43.0