Re: [patch 12/18] ptrace, treewide: Rename ptrace_report_syscall_entry() to ptrace_report_syscall_permit_entry()

Radu Rendec <[email protected]> Thu, 09 Jul 2026 13:03:28 -0400
Newsgroups org.kernel.vger.linux-alpha,dev.linux.lists.loongarch,org.infradead.lists.linux-riscv,org.infradead.lists.linux-snps-arc,org.infradead.lists.linux-um,org.kernel.vger.linux-arch,org.kernel.vger.linux-csky,org.kernel.vger.linux-doc,org.kernel.vger.linux-hexagon,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k,org.kernel.vger.linux-mips,org.kernel.vger.linux-openrisc,org.kernel.vger.linux-parisc,org.kernel.vger.linux-s390,org.kernel.vger.linux-sh,org.kernel.vger.sparclinux,org.ozlabs.lists.linuxppc-dev
Message-ID <[email protected]>
On Tue, 2026-07-07 at 21:06 +0200, Thomas Gleixner wrote:
> The return value of that function is boolean and tells the caller whether
> to permit the syscall processing or not.
>=20
> Rename the function so the purpose is clear and make the return type bool=
.
>=20
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Cc: Oleg Nesterov <[email protected]>
> Cc: Richard Henderson <[email protected]>
> Cc: Vineet Gupta <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: Catalin Marinas <[email protected]>
> Cc: Will Deacon <[email protected]>
> Cc: Guo Ren <[email protected]>
> Cc: Brian Cain <[email protected]>
> Cc: Geert Uytterhoeven <[email protected]>
> Cc: Michal Simek <[email protected]>
> Cc: Thomas Bogendoerfer <[email protected]>
> Cc: Dinh Nguyen <[email protected]>
> Cc: Helge Deller <[email protected]>
> Cc: Yoshinori Sato <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Andreas Larsson <[email protected]>
> Cc: Chris Zankel <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> ---
> =C2=A0arch/alpha/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=
=A0=C2=A0 2 +-
> =C2=A0arch/arc/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
|=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/arm/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
|=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/arm64/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=
=A0=C2=A0 2 +-
> =C2=A0arch/csky/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=
=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/hexagon/kernel/traps.c=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=
=C2=A0 2 +-
> =C2=A0arch/m68k/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=
=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/microblaze/kernel/ptrace.c |=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/mips/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=
=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/nios2/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=
=A0=C2=A0 2 +-
> =C2=A0arch/openrisc/kernel/ptrace.c=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/parisc/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 1=
0 ++++------
> =C2=A0arch/sh/kernel/ptrace_32.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=
=A0=C2=A0 2 +-
> =C2=A0arch/sparc/kernel/ptrace_32.c=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/sparc/kernel/ptrace_64.c=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/um/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 |=C2=A0=C2=A0=C2=A0 2 +-
> =C2=A0arch/xtensa/kernel/ptrace.c=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=
=C2=A0 2 +-
> =C2=A0include/asm-generic/syscall.h=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 4 ++-=
-
> =C2=A0include/linux/entry-common.h=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 25 +++=
+++++++++-------------
> =C2=A0include/linux/ptrace.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 |=C2=A0=C2=A0 13 ++++++-------
> =C2=A020 files changed, 40 insertions(+), 44 deletions(-)
>=20
> --- a/arch/alpha/kernel/ptrace.c
> +++ b/arch/alpha/kernel/ptrace.c
> @@ -375,7 +375,7 @@ asmlinkage unsigned long syscall_trace_e
> =C2=A0	struct pt_regs *regs =3D current_pt_regs();
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> -		ptrace_report_syscall_entry(regs)) {
> +		!ptrace_report_syscall_permit_entry(regs)) {
> =C2=A0		syscall_set_nr(current, regs, -1);
> =C2=A0		if (regs->r19 =3D=3D 0 && regs->r0 =3D=3D (unsigned long)-1)
> =C2=A0			syscall_set_return_value(current, regs, -ENOSYS, 0);
> --- a/arch/arc/kernel/ptrace.c
> +++ b/arch/arc/kernel/ptrace.c
> @@ -342,7 +342,7 @@ long arch_ptrace(struct task_struct *chi
> =C2=A0asmlinkage int syscall_trace_enter(struct pt_regs *regs)
> =C2=A0{
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE))
> -		if (ptrace_report_syscall_entry(regs))
> +		if (!ptrace_report_syscall_permit_entry(regs))
> =C2=A0			return ULONG_MAX;
> =C2=A0
> =C2=A0#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
> --- a/arch/arm/kernel/ptrace.c
> +++ b/arch/arm/kernel/ptrace.c
> @@ -840,7 +840,7 @@ static void report_syscall(struct pt_reg
> =C2=A0
> =C2=A0	if (dir =3D=3D PTRACE_SYSCALL_EXIT)
> =C2=A0		ptrace_report_syscall_exit(regs, 0);
> -	else if (ptrace_report_syscall_entry(regs))
> +	else if (!ptrace_report_syscall_permit_entry(regs))
> =C2=A0		current_thread_info()->abi_syscall =3D -1;
> =C2=A0
> =C2=A0	regs->ARM_ip =3D ip;
> --- a/arch/arm64/kernel/ptrace.c
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -2379,7 +2379,7 @@ static int report_syscall_entry(struct p
> =C2=A0	int regno, ret;
> =C2=A0
> =C2=A0	saved_reg =3D ptrace_save_reg(regs, PTRACE_SYSCALL_ENTER, &regno);
> -	ret =3D ptrace_report_syscall_entry(regs);
> +	ret =3D !ptrace_report_syscall_permit_entry(regs);
> =C2=A0	if (ret)
> =C2=A0		forget_syscall(regs);
> =C2=A0	regs->regs[regno] =3D saved_reg;
> --- a/arch/csky/kernel/ptrace.c
> +++ b/arch/csky/kernel/ptrace.c
> @@ -320,7 +320,7 @@ long arch_ptrace(struct task_struct *chi
> =C2=A0asmlinkage int syscall_trace_enter(struct pt_regs *regs)
> =C2=A0{
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE))
> -		if (ptrace_report_syscall_entry(regs))
> +		if (!ptrace_report_syscall_permit_entry(regs))
> =C2=A0			return -1;
> =C2=A0
> =C2=A0	if (!seccomp_permit_syscall())
> --- a/arch/hexagon/kernel/traps.c
> +++ b/arch/hexagon/kernel/traps.c
> @@ -345,7 +345,7 @@ void do_trap0(struct pt_regs *regs)
> =C2=A0
> =C2=A0		/* allow strace to catch syscall args=C2=A0 */
> =C2=A0		if (unlikely(test_thread_flag(TIF_SYSCALL_TRACE) &&
> -			ptrace_report_syscall_entry(regs)))
> +			!ptrace_report_syscall_permit_entry(regs)))
> =C2=A0			return;=C2=A0 /*=C2=A0 return -ENOSYS somewhere?=C2=A0 */
> =C2=A0
> =C2=A0		/* Interrupts should be re-enabled for syscall processing */
> --- a/arch/m68k/kernel/ptrace.c
> +++ b/arch/m68k/kernel/ptrace.c
> @@ -279,7 +279,7 @@ asmlinkage int syscall_trace_enter(void)
> =C2=A0	int ret =3D 0;
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE))
> -		ret =3D ptrace_report_syscall_entry(task_pt_regs(current));
> +		ret =3D !ptrace_report_syscall_permit_entry(task_pt_regs(current));
> =C2=A0
> =C2=A0	if (!seccomp_permit_syscall())
> =C2=A0		return -1;
> --- a/arch/microblaze/kernel/ptrace.c
> +++ b/arch/microblaze/kernel/ptrace.c
> @@ -139,7 +139,7 @@ asmlinkage unsigned long do_syscall_trac
> =C2=A0	secure_computing_strict(regs->r12);
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> -	=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_entry(regs))
> +	=C2=A0=C2=A0=C2=A0 !ptrace_report_syscall_permit_entry(regs))
> =C2=A0		/*
> =C2=A0		 * Tracing decided this syscall should not happen.
> =C2=A0		 * We'll return a bogus call number to get an ENOSYS
> --- a/arch/mips/kernel/ptrace.c
> +++ b/arch/mips/kernel/ptrace.c
> @@ -1324,7 +1324,7 @@ asmlinkage long syscall_trace_enter(stru
> =C2=A0	user_exit();
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE)) {
> -		if (ptrace_report_syscall_entry(regs))
> +		if (!ptrace_report_syscall_permit_entry(regs))
> =C2=A0			return -1;
> =C2=A0	}
> =C2=A0
> --- a/arch/nios2/kernel/ptrace.c
> +++ b/arch/nios2/kernel/ptrace.c
> @@ -133,7 +133,7 @@ asmlinkage int do_syscall_trace_enter(vo
> =C2=A0	int ret =3D 0;
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE))
> -		ret =3D ptrace_report_syscall_entry(task_pt_regs(current));
> +		ret =3D !ptrace_report_syscall_permit_entry(task_pt_regs(current));
> =C2=A0
> =C2=A0	return ret;
> =C2=A0}
> --- a/arch/openrisc/kernel/ptrace.c
> +++ b/arch/openrisc/kernel/ptrace.c
> @@ -293,7 +293,7 @@ asmlinkage long do_syscall_trace_enter(s
> =C2=A0	long ret =3D 0;
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> -	=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_entry(regs))
> +	=C2=A0=C2=A0=C2=A0 !ptrace_report_syscall_permit_entry(regs))
> =C2=A0		/*
> =C2=A0		 * Tracing decided this syscall should not happen.
> =C2=A0		 * We'll return a bogus call number to get an ENOSYS
> --- a/arch/parisc/kernel/ptrace.c
> +++ b/arch/parisc/kernel/ptrace.c
> @@ -326,7 +326,7 @@ long compat_arch_ptrace(struct task_stru
> =C2=A0long do_syscall_trace_enter(struct pt_regs *regs)
> =C2=A0{
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE)) {
> -		int rc =3D ptrace_report_syscall_entry(regs);
> +		bool permit =3D ptrace_report_syscall_permit_entry(regs);
> =C2=A0
> =C2=A0		/*
> =C2=A0		 * As tracesys_next does not set %r28 to -ENOSYS
> @@ -334,12 +334,10 @@ long do_syscall_trace_enter(struct pt_re
> =C2=A0		 */
> =C2=A0		regs->gr[28] =3D -ENOSYS;
> =C2=A0
> -		if (rc) {
> +		if (!permit) {
> =C2=A0			/*
> -			 * A nonzero return code from
> -			 * ptrace_report_syscall_entry() tells us
> -			 * to prevent the syscall execution.=C2=A0 Skip
> -			 * the syscall call and the syscall restart handling.
> +			 * Skip the syscall call and the syscall restart
> +			 * handling.
> =C2=A0			 *
> =C2=A0			 * Note that the tracer may also just change
> =C2=A0			 * regs->gr[20] to an invalid syscall number,
> --- a/arch/sh/kernel/ptrace_32.c
> +++ b/arch/sh/kernel/ptrace_32.c
> @@ -455,7 +455,7 @@ long arch_ptrace(struct task_struct *chi
> =C2=A0asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
> =C2=A0{
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> -	=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_entry(regs)) {
> +	=C2=A0=C2=A0=C2=A0 !ptrace_report_syscall_permit_entry(regs)) {
> =C2=A0		regs->regs[0] =3D -ENOSYS;
> =C2=A0		return -1;
> =C2=A0	}
> --- a/arch/sparc/kernel/ptrace_32.c
> +++ b/arch/sparc/kernel/ptrace_32.c
> @@ -441,7 +441,7 @@ asmlinkage int syscall_trace(struct pt_r
> =C2=A0		if (syscall_exit_p)
> =C2=A0			ptrace_report_syscall_exit(regs, 0);
> =C2=A0		else
> -			ret =3D ptrace_report_syscall_entry(regs);
> +			ret =3D !ptrace_report_syscall_permit_entry(regs);
> =C2=A0	}
> =C2=A0
> =C2=A0	return ret;
> --- a/arch/sparc/kernel/ptrace_64.c
> +++ b/arch/sparc/kernel/ptrace_64.c
> @@ -1093,7 +1093,7 @@ asmlinkage int syscall_trace_enter(struc
> =C2=A0		user_exit();
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE))
> -		ret =3D ptrace_report_syscall_entry(regs);
> +		ret =3D !ptrace_report_syscall_permit_entry(regs);
> =C2=A0
> =C2=A0	if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
> =C2=A0		trace_sys_enter(regs, regs->u_regs[UREG_G1]);
> --- a/arch/um/kernel/ptrace.c
> +++ b/arch/um/kernel/ptrace.c
> @@ -135,7 +135,7 @@ int syscall_trace_enter(struct pt_regs *
> =C2=A0	if (!test_thread_flag(TIF_SYSCALL_TRACE))
> =C2=A0		return 0;
> =C2=A0
> -	return ptrace_report_syscall_entry(regs);
> +	return !ptrace_report_syscall_permit_entry(regs);
> =C2=A0}
> =C2=A0
> =C2=A0void syscall_trace_leave(struct pt_regs *regs)
> --- a/arch/xtensa/kernel/ptrace.c
> +++ b/arch/xtensa/kernel/ptrace.c
> @@ -547,7 +547,7 @@ int do_syscall_trace_enter(struct pt_reg
> =C2=A0		regs->areg[2] =3D -ENOSYS;
> =C2=A0
> =C2=A0	if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> -	=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_entry(regs)) {
> +	=C2=A0=C2=A0=C2=A0 !ptrace_report_syscall_permit_entry(regs)) {
> =C2=A0		regs->areg[2] =3D -ENOSYS;
> =C2=A0		regs->syscall =3D NO_SYSCALL;
> =C2=A0		return 0;
> --- a/include/asm-generic/syscall.h
> +++ b/include/asm-generic/syscall.h
> @@ -58,8 +58,8 @@ void syscall_set_nr(struct task_struct *
> =C2=A0 *
> =C2=A0 * It's only valid to call this when @task is stopped for system
> =C2=A0 * call exit tracing (due to %SYSCALL_WORK_SYSCALL_TRACE or
> - * %SYSCALL_WORK_SYSCALL_AUDIT), after ptrace_report_syscall_entry()
> - * returned nonzero to prevent the system call from taking place.
> + * %SYSCALL_WORK_SYSCALL_AUDIT), after ptrace_report_syscall_permit_entr=
y()
> + * returned False to prevent the system call from taking place.
> =C2=A0 *
> =C2=A0 * This rolls back the register state in @regs so it's as if the
> =C2=A0 * system call instruction was a no-op.=C2=A0 The registers contain=
ing
> --- a/include/linux/entry-common.h
> +++ b/include/linux/entry-common.h
> @@ -38,21 +38,22 @@
> =C2=A0				 SYSCALL_WORK_SYSCALL_EXIT_TRAP)
> =C2=A0
> =C2=A0/**
> - * arch_ptrace_report_syscall_entry - Architecture specific ptrace_repor=
t_syscall_entry() wrapper
> + * arch_ptrace_report_syscall_permit_entry - Architecture specific wrapp=
er for
> + *					=C2=A0=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_permit_entry()
> =C2=A0 * @regs: Pointer to the register state at syscall entry
> =C2=A0 *
> - * Invoked from syscall_trace_enter() to wrap ptrace_report_syscall_entr=
y().
> + * Invoked from syscall_trace_enter() to wrap ptrace_report_syscall_perm=
it_entry().
> =C2=A0 *
> - * This allows architecture specific ptrace_report_syscall_entry()
> + * This allows architecture specific ptrace_report_syscall_permit_entry(=
)
> =C2=A0 * implementations. If not defined by the architecture this falls b=
ack to
> - * to ptrace_report_syscall_entry().
> + * to ptrace_report_syscall_permit_entry().
> =C2=A0 */
> -static __always_inline int arch_ptrace_report_syscall_entry(struct pt_re=
gs *regs);
> +static __always_inline bool arch_ptrace_report_syscall_permit_entry(stru=
ct pt_regs *regs);
> =C2=A0
> -#ifndef arch_ptrace_report_syscall_entry
> -static __always_inline int arch_ptrace_report_syscall_entry(struct pt_re=
gs *regs)
> +#ifndef arch_ptrace_report_syscall_permit_entry
> +static __always_inline bool arch_ptrace_report_syscall_permit_entry(stru=
ct pt_regs *regs)
> =C2=A0{
> -	return ptrace_report_syscall_entry(regs);
> +	return ptrace_report_syscall_permit_entry(regs);
> =C2=A0}
> =C2=A0#endif
> =C2=A0
> @@ -73,8 +74,6 @@ static inline void syscall_enter_audit(s
> =C2=A0static __always_inline long syscall_trace_enter(struct pt_regs *reg=
s, unsigned long work,
> =C2=A0						long syscall)
> =C2=A0{
> -	long ret =3D 0;
> -
> =C2=A0	/*
> =C2=A0	 * Handle Syscall User Dispatch.=C2=A0 This must comes first, sinc=
e
> =C2=A0	 * the ABI here can be something that doesn't make sense for
> @@ -95,8 +94,8 @@ static __always_inline long syscall_trac
> =C2=A0
> =C2=A0	/* Handle ptrace */
> =C2=A0	if (work & (SYSCALL_WORK_SYSCALL_TRACE | SYSCALL_WORK_SYSCALL_EMU)=
) {
> -		ret =3D arch_ptrace_report_syscall_entry(regs);
> -		if (ret || (work & SYSCALL_WORK_SYSCALL_EMU))
> +		if (!arch_ptrace_report_syscall_permit_entry(regs) ||
> +		=C2=A0=C2=A0=C2=A0 (work & SYSCALL_WORK_SYSCALL_EMU))
> =C2=A0			return -1L;
> =C2=A0	}
> =C2=A0
> @@ -137,7 +136,7 @@ static __always_inline long syscall_trac
> =C2=A0 * It handles the following work items:
> =C2=A0 *
> =C2=A0 *=C2=A0 1) syscall_work flag dependent invocations of
> - *=C2=A0=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_entry(), __seccomp_perm=
it_syscall(), trace_sys_enter()
> + *=C2=A0=C2=A0=C2=A0=C2=A0 ptrace_report_syscall_permit_entry(), __secco=
mp_permit_syscall(), trace_sys_enter()
> =C2=A0 *=C2=A0 2) Invocation of audit_syscall_entry()
> =C2=A0 */
> =C2=A0static __always_inline long syscall_enter_from_user_mode_work(struc=
t pt_regs *regs, long syscall)
> --- a/include/linux/ptrace.h
> +++ b/include/linux/ptrace.h
> @@ -405,13 +405,13 @@ extern void sigaction_compat_abi(struct
> =C2=A0/*
> =C2=A0 * ptrace report for syscall entry and exit looks identical.
> =C2=A0 */
> -static inline int ptrace_report_syscall(unsigned long message)
> +static inline bool ptrace_report_syscall(unsigned long message)
> =C2=A0{
> =C2=A0	int ptrace =3D current->ptrace;
> =C2=A0	int signr;
> =C2=A0
> =C2=A0	if (!(ptrace & PT_PTRACED))
> -		return 0;
> +		return true;
> =C2=A0
> =C2=A0	signr =3D ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x=
80 : 0),
> =C2=A0			=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 message);
> @@ -424,11 +424,11 @@ static inline int ptrace_report_syscall(
> =C2=A0	if (signr)
> =C2=A0		send_sig(signr, current, 1);
> =C2=A0
> -	return fatal_signal_pending(current);
> +	return !fatal_signal_pending(current);
> =C2=A0}
> =C2=A0
> =C2=A0/**
> - * ptrace_report_syscall_entry - task is about to attempt a system call
> + * ptrace_report_syscall_permit_entry - task is about to attempt a syste=
m call
> =C2=A0 * @regs:		user register state of current task
> =C2=A0 *
> =C2=A0 * This will be called if %SYSCALL_WORK_SYSCALL_TRACE or
> @@ -438,7 +438,7 @@ static inline int ptrace_report_syscall(
> =C2=A0 * call number and arguments to be tried.=C2=A0 It is safe to block=
 here,
> =C2=A0 * preventing the system call from beginning.
> =C2=A0 *
> - * Returns zero normally, or nonzero if the calling arch code should abo=
rt
> + * Returns True normally, or False if the calling architecture code shou=
ld abort
> =C2=A0 * the system call.=C2=A0 That must prevent normal entry so no syst=
em call is
> =C2=A0 * made.=C2=A0 If @task ever returns to user mode after this, its r=
egister state
> =C2=A0 * is unspecified, but should be something harmless like an %ENOSYS=
 error
> @@ -447,8 +447,7 @@ static inline int ptrace_report_syscall(
> =C2=A0 *
> =C2=A0 * Called without locks, just after entering kernel mode.
> =C2=A0 */
> -static inline __must_check int ptrace_report_syscall_entry(
> -	struct pt_regs *regs)
> +static inline __must_check bool ptrace_report_syscall_permit_entry(struc=
t pt_regs *regs)
> =C2=A0{
> =C2=A0	return ptrace_report_syscall(PTRACE_EVENTMSG_SYSCALL_ENTRY);
> =C2=A0}

Reviewed-by: Radu Rendec <[email protected]>