lkml.org 
[lkml]   [2017]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH -tip 1/5] kprobes: Use ENOTSUPP instead of ENOSYS
On Fri, 20 Oct 2017 10:57:22 +0200
Ingo Molnar <mingo@kernel.org> wrote:

>
> * Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> > Use ENOTSUPP instead of ENOSYS because ENOSYS is reserved
> > only for invalid syscall number.
>
> Is this actually true? We use -ENOSYS in a ton of code in kernel/ already, not
> just for non-existing syscall number.

I got a warning from checkpatches.pl, also in include/uapi/asm-generic/errno.h,

/*
* This error code is special: arch syscall entry code will return
* -ENOSYS if users try to call a syscall that doesn't exist. To keep
* failures of syscalls that really do exist distinguishable from
* failures due to attempts to use a nonexistent syscall, syscall
* implementations should refrain from returning -ENOSYS.
*/
#define ENOSYS 38 /* Invalid system call number */

So, I decided not to use ENOSYS for this error.

Thank you,


>
> Ingo


--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2017-10-22 17:43    [W:0.078 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site