All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Lindholm <linmag7@gmail.com>
To: richard.henderson@linaro.org, mattst88@gmail.com,
	linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: linmag7@gmail.com
Subject: [PATCH] alpha: fix PR_GET_UNALIGN flag mask
Date: Sun, 25 Oct 2026 08:38:50 +0100	[thread overview]
Message-ID: <20261025074237.1050419-1-linmag7@gmail.com> (raw)

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


             reply	other threads:[~2026-10-25  7:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25  7:38 Magnus Lindholm [this message]
2026-10-25 13:52 ` [PATCH] alpha: fix PR_GET_UNALIGN flag mask Matt Turner
2026-10-25 22:01   ` Magnus Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261025074237.1050419-1-linmag7@gmail.com \
    --to=linmag7@gmail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.