[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910201347460.2090@nanos.tec.linutronix.de>
Date: Sun, 20 Oct 2019 13:49:10 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>
cc: LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Marc Zyngier <maz@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
kvm list <kvm@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [RFC patch 01/15] entry: Provide generic syscall entry
functionality
On Fri, 20 Sep 2019, Andy Lutomirski wrote:
> On Thu, Sep 19, 2019 at 8:09 AM Thomas Gleixner <tglx@...utronix.de> wrote:
> > +#ifndef _TIF_AUDIT
> > +# define _TIF_AUDIT (0)
> > +#endif
>
> I'm wondering if these should be __TIF (double-underscore) or
> MAYBE_TIF_ or something to avoid errors where people do flags |=
> TIF_WHATEVER and get surprised.
That's what exists today already. See arch/*/include/asm/threadinfo.h
> > +/**
> > + * syscall_enter_from_usermode - Check and handle work before invoking
> > + * a syscall
> > + * @regs: Pointer to currents pt_regs
> > + * @syscall: The syscall number
> > + *
> > + * Invoked from architecture specific syscall entry code with interrupts
> > + * enabled.
> > + *
> > + * Returns: The original or a modified syscall number
> > + */
>
> Maybe document that it can return -1 to skip the syscall and that, if
> this happens, it may use syscall_set_error() or
> syscall_set_return_value() first. If neither of those is called and
> -1 is returned, then the syscall will fail with ENOSYS.
Sure.
Thanks,
tglx
Powered by blists - more mailing lists