On Fri, 20 Sep 2019, Andy Lutomirski wrote:
> On Thu, Sep 19, 2019 at 8:09 AM Thomas Gleixner <t...@linutronix.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

Reply via email to