Messages in this thread | | | Date | Sat, 21 Oct 2017 00:51:55 +0900 | From | Masami Hiramatsu <> | Subject | Re: [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>
| |