lkml.org 
[lkml]   [2020]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [REGRESSION] x86/entry: Tracer no longer has opportunity to change the syscall number at entry via orig_ax
Date
On Sun, Sep 13 2020 at 17:44, Michael Ellerman wrote:
> Kees Cook <keescook@chromium.org> writes:
> diff --git a/kernel/entry/common.c b/kernel/entry/common.c
> index 18683598edbc..901361e2f8ea 100644
> --- a/kernel/entry/common.c
> +++ b/kernel/entry/common.c
> @@ -60,13 +60,15 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall,
> return ret;
> }
>
> + syscall = syscall_get_nr(current, regs);
> +
> if (unlikely(ti_work & _TIF_SYSCALL_TRACEPOINT))
> trace_sys_enter(regs, syscall);
>
> syscall_enter_audit(regs, syscall);
>
> /* The above might have changed the syscall number */
> - return ret ? : syscall_get_nr(current, regs);
> + return ret ? : syscall;
> }

Yup, this looks right. Can you please send a proper patch?

Thanks,

tglx

\
 
 \ /
  Last update: 2020-09-13 20:28    [W:0.097 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site