alpha: fix PR_GET_UNALIGN flag mask
Magnus Lindholm
maintainerPATCH 1/1 alpha: fix PR_GET_UNALIGN flag mask
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.
---
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(-)
arch/alpha/include/asm/thread_info.h +1 -1
@@ -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
Signature · 1 line
2.43.0
Quoted 8 lines · Magnus Lindholm
GET_UNALIGN_CTLclears the flags it needs to read, soPR_GET_UNALIGNalways 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 <[email protected]>
This has been broken since v3.7, so please add
Magnus Lindholm
maintainerHi Matt,
Quoted 8 lines · Matt Turner
Quoted 6 lines · Magnus Lindholm
GET_UNALIGN_CTLclears the flags it needs to read, soPR_GET_UNALIGNalways returns zero. Keep the UAC bits when translating them to prctl flags.This was uncovered while running the strace test suite on Alpha.
Quoted 8 lines
Quoted 2 lines
Fixes 3185bd261882 ("alpha: separate thread-synchronous flags")Signed-off-by Magnus Lindholm <[email protected]>Reviewed-by Matt Turner <[email protected]>This has been broken since v3.7, so please add
Will do, thanks for the review.
Magnus