[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875z8dp777.fsf@mpe.ellerman.id.au>
Date: Thu, 17 Sep 2020 10:39:40 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Robert O'Callahan <rocallahan@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
"maintainer\:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" <x86@...nel.org>,
linux-arch@...r.kernel.org, Will Deacon <will@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Mark Rutland <mark.rutland@....com>,
Keno Fischer <keno@...iacomputing.com>,
Paolo Bonzini <pbonzini@...hat.com>,
kvm list <kvm@...r.kernel.org>,
Gabriel Krisman Bertazi <krisman@...labora.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Kyle Huey <me@...ehuey.com>
Subject: Re: [REGRESSION] x86/entry: Tracer no longer has opportunity to change the syscall number at entry via orig_ax
Kees Cook <keescook@...omium.org> writes:
> On Sun, Sep 13, 2020 at 08:27:23PM +0200, Thomas Gleixner wrote:
>> On Sun, Sep 13 2020 at 17:44, Michael Ellerman wrote:
>> > Kees Cook <keescook@...omium.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?
>
> I already did on Friday:
> https://lore.kernel.org/lkml/20200912005826.586171-1-keescook@chromium.org/
Thanks.
cheers
Powered by blists - more mailing lists