diff mbox series

[-next,V8,04/14] riscv: ptrace: Remove duplicate operation

Message ID 20221103075047.1634923-5-guoren@kernel.org (mailing list archive)
State Superseded
Headers show
Series riscv: Add GENERIC_ENTRY support and related features | expand

Checks

Context Check Description
conchuod/cc_maintainers warning 1 maintainers not CCed: aou@eecs.berkeley.edu
conchuod/patch_count success Link
conchuod/cover_letter success Series has a cover letter
conchuod/tree_selection success Guessed tree name to be for-next
conchuod/fixes_present success Fixes tag not required for -next series
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/module_param success Was 0 now: 0
conchuod/build_warn_rv64 fail Errors and warnings before: 0 this patch: 0
conchuod/dtb_warn_rv64 success Errors and warnings before: 0 this patch: 0
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
conchuod/source_inline success Was 0 now: 0
conchuod/verify_fixes success No Fixes tag

Commit Message

Guo Ren Nov. 3, 2022, 7:50 a.m. UTC
From: Guo Ren <guoren@linux.alibaba.com>

The TIF_SYSCALL_TRACE is controlled by a common code, see
kernel/ptrace.c and include/linux/thread.h.

clear_task_syscall_work(child, SYSCALL_TRACE);

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
---
 arch/riscv/kernel/ptrace.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Björn Töpel Dec. 5, 2022, 9:34 a.m. UTC | #1
guoren@kernel.org writes:

> From: Guo Ren <guoren@linux.alibaba.com>
>
> The TIF_SYSCALL_TRACE is controlled by a common code, see
> kernel/ptrace.c and include/linux/thread.h.

                                    ^^^ thread_info.h
>
> clear_task_syscall_work(child, SYSCALL_TRACE);
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> Reviewed-by: Oleg Nesterov <oleg@redhat.com>
> ---
>  arch/riscv/kernel/ptrace.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
> index 2ae8280ae475..44f4b1ca315d 100644
> --- a/arch/riscv/kernel/ptrace.c
> +++ b/arch/riscv/kernel/ptrace.c
> @@ -212,7 +212,6 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
>  
>  void ptrace_disable(struct task_struct *child)
>  {
> -	clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
>  }
>  
>  long arch_ptrace(struct task_struct *child, long request,

This patch is also not neccesary for the series, but should be a
separate cleanup.
Guo Ren Dec. 6, 2022, 4:41 a.m. UTC | #2
On Mon, Dec 5, 2022 at 5:34 PM Björn Töpel <bjorn@kernel.org> wrote:
>
> guoren@kernel.org writes:
>
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > The TIF_SYSCALL_TRACE is controlled by a common code, see
> > kernel/ptrace.c and include/linux/thread.h.
>
>                                     ^^^ thread_info.h
> >
> > clear_task_syscall_work(child, SYSCALL_TRACE);
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Signed-off-by: Guo Ren <guoren@kernel.org>
> > Reviewed-by: Oleg Nesterov <oleg@redhat.com>
> > ---
> >  arch/riscv/kernel/ptrace.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
> > index 2ae8280ae475..44f4b1ca315d 100644
> > --- a/arch/riscv/kernel/ptrace.c
> > +++ b/arch/riscv/kernel/ptrace.c
> > @@ -212,7 +212,6 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
> >
> >  void ptrace_disable(struct task_struct *child)
> >  {
> > -     clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
> >  }
> >
> >  long arch_ptrace(struct task_struct *child, long request,
>
> This patch is also not neccesary for the series, but should be a
> separate cleanup.
Maybe I would deprecate this patch because the generic entry would
delete the whole ptrace_disable().
diff mbox series

Patch

diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 2ae8280ae475..44f4b1ca315d 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -212,7 +212,6 @@  unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
 
 void ptrace_disable(struct task_struct *child)
 {
-	clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
 }
 
 long arch_ptrace(struct task_struct *child, long request,