ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 26 Apr 2022 21:45:37 +0000 (16:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:53:43 +0000 (16:53 +0200)
commit28c2aa502dce044e46db4638aba9028e0713f64a
tree2297b0c6bb34136a0e25a661d70ca25c68404e0d
parentff4f627eb1694a27443913879797deac8fb8ff6e
ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP

commit 4a3d2717d140401df7501a95e454180831a0c5af upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/kernel/ptrace.c
arch/xtensa/kernel/signal.c
include/linux/ptrace.h