* [PATCH] parisc: Fix ptrace check on syscall return
@ 2021-10-04 22:49 Helge Deller
0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2021-10-04 22:49 UTC (permalink / raw)
To: linux-parisc, John David Anglin
**untested**
The TIF_XXX flags are stored in the flags field in the thread_info
struct (TI_FLAGS), not in the flags field of the task_struct structure
(TASK_FLAGS).
It seems this bug has been in the kernel for 12 years (since v2.6.32).
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: ecd3d4bc06e48 ("parisc: stop using task->ptrace for {single,block}step flags")
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index f75d7d7efd25..c312aef175df 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1834,7 +1834,7 @@ syscall_restore:
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
/* Are we being ptraced? */
- ldw TASK_FLAGS(%r1),%r19
+ LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
ldi _TIF_SYSCALL_TRACE_MASK,%r2
and,COND(=) %r19,%r2,%r0
b,n syscall_restore_rfi
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-04 22:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 22:49 [PATCH] parisc: Fix ptrace check on syscall return Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).