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>
Thu, 9 Jun 2022 08:22:29 +0000 (10:22 +0200)
commit7400a7e0a7ae1f1cd22250f0bfa1453f59a1d117
tree3cd474c8ae45dce10f6e571c266f52b98fba02d5
parente1c91672c5c835c849e329a29b2a74f8540cd102
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