diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-04-26 16:45:37 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-05-11 14:33:44 -0500 |
commit | 4a3d2717d140401df7501a95e454180831a0c5af (patch) | |
tree | 7baae80c9ca9792e5dac16a17e1339b6e0a55991 /arch/xtensa/kernel/ptrace.c | |
parent | c200e4bb44e80b343c09841e7caaaca0aac5e5fa (diff) | |
download | lwn-4a3d2717d140401df7501a95e454180831a0c5af.tar.gz lwn-4a3d2717d140401df7501a95e454180831a0c5af.zip |
ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
xtensa is the last user of the PT_SINGLESTEP flag. Changing tsk->ptrace in
user_enable_single_step and user_disable_single_step without locking could
potentiallly cause problems.
So use a thread info flag instead of a flag in tsk->ptrace. Use TIF_SINGLESTEP
that xtensa already had defined but unused.
Remove the definitions of PT_SINGLESTEP and PT_BLOCKSTEP as they have no more users.
Cc: stable@vger.kernel.org
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lkml.kernel.org/r/20220505182645.497868-4-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/xtensa/kernel/ptrace.c')
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 323c678a691f..b952e67cc0cc 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -225,12 +225,12 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) void user_enable_single_step(struct task_struct *child) { - child->ptrace |= PT_SINGLESTEP; + set_tsk_thread_flag(child, TIF_SINGLESTEP); } void user_disable_single_step(struct task_struct *child) { - child->ptrace &= ~PT_SINGLESTEP; + clear_tsk_thread_flag(child, TIF_SINGLESTEP); } /* |