Skip to content

Commit

Permalink
parisc: Fix ptrace check on syscall return
Browse files Browse the repository at this point in the history
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 didn't generate any important side-effects, otherwise it
wouldn't have went unnoticed for 12 years (since v2.6.32).

Signed-off-by: Helge Deller <[email protected]>
Fixes: ecd3d4b ("parisc: stop using task->ptrace for {single,block}step flags")
Cc: Kyle McMartin <[email protected]>
Cc: [email protected]
  • Loading branch information
hdeller committed Nov 1, 2021
1 parent 9cc2fa4 commit 8779e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8779e05

Please sign in to comment.