Re: [RFC patch 01/15] entry: Provide generic syscall entry functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux