* [PATCH] alpha: fix PR_GET_UNALIGN flag mask
@ 2026-10-25 7:38 Magnus Lindholm
2026-10-25 13:52 ` Matt Turner
0 siblings, 1 reply; 3+ messages in thread
From: Magnus Lindholm @ 2026-10-25 7:38 UTC (permalink / raw)
To: richard.henderson, mattst88, linux-kernel, linux-alpha; +Cc: linmag7
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@gmail.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] alpha: fix PR_GET_UNALIGN flag mask
2026-10-25 7:38 [PATCH] alpha: fix PR_GET_UNALIGN flag mask Magnus Lindholm
@ 2026-10-25 13:52 ` Matt Turner
2026-10-25 22:01 ` Magnus Lindholm
0 siblings, 1 reply; 3+ messages in thread
From: Matt Turner @ 2026-10-25 13:52 UTC (permalink / raw)
To: Magnus Lindholm; +Cc: richard.henderson, linux-kernel, linux-alpha
On Sun, Oct 25, 2026 at 08:38:50AM +0100, Magnus Lindholm wrote:
> 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@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This has been broken since v3.7, so please add
Cc: stable@vger.kernel.org
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] alpha: fix PR_GET_UNALIGN flag mask
2026-10-25 13:52 ` Matt Turner
@ 2026-10-25 22:01 ` Magnus Lindholm
0 siblings, 0 replies; 3+ messages in thread
From: Magnus Lindholm @ 2026-10-25 22:01 UTC (permalink / raw)
To: Matt Turner; +Cc: richard.henderson, linux-kernel, linux-alpha
Hi Matt,
On Sun, Oct 25, 2026 at 2:52 PM Matt Turner <mattst88@gmail.com> wrote:
>
> On Sun, Oct 25, 2026 at 08:38:50AM +0100, Magnus Lindholm wrote:
> > 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@gmail.com>
>
> Reviewed-by: Matt Turner <mattst88@gmail.com>
>
> This has been broken since v3.7, so please add
>
> Cc: stable@vger.kernel.org
Will do, thanks for the review.
Magnus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-25 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 7:38 [PATCH] alpha: fix PR_GET_UNALIGN flag mask Magnus Lindholm
2026-10-25 13:52 ` Matt Turner
2026-10-25 22:01 ` Magnus Lindholm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®