From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752364AbdJEXOe (ORCPT ); Thu, 5 Oct 2017 19:14:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752335AbdJEXOc (ORCPT ); Thu, 5 Oct 2017 19:14:32 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2501A21913 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org From: Masami Hiramatsu To: Ingo Molnar Cc: Linus Torvalds , Peter Zijlstra , Alexei Starovoitov , Ananth N Mavinakayanahalli , "Paul E . McKenney" , Steven Rostedt , Thomas Gleixner , LKML , "H . Peter Anvin" , Anil S Keshavamurthy , "David S . Miller" , Kees Cook , Ian McDonald , Vlad Yasevich , Stephen Hemminger Subject: [RFC PATCH -tip 1/5] kprobes: Use ENOTSUPP instead of ENOSYS Date: Fri, 6 Oct 2017 08:13:56 +0900 Message-Id: <150724523678.5014.7179010055808035742.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <150724519527.5014.10207042218696587159.stgit@devbox> References: <150724519527.5014.10207042218696587159.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use ENOTSUPP instead of ENOSYS because ENOSYS is reserved only for invalid syscall number. Signed-off-by: Masami Hiramatsu --- include/linux/kprobes.h | 16 ++++++++-------- kernel/kprobes.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index bd2684700b74..39d558ec71c6 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -431,11 +431,11 @@ static inline struct kprobe *kprobe_running(void) } static inline int register_kprobe(struct kprobe *p) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_kprobes(struct kprobe **kps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_kprobe(struct kprobe *p) { @@ -445,11 +445,11 @@ static inline void unregister_kprobes(struct kprobe **kps, int num) } static inline int register_jprobe(struct jprobe *p) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_jprobes(struct jprobe **jps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_jprobe(struct jprobe *p) { @@ -462,11 +462,11 @@ static inline void jprobe_return(void) } static inline int register_kretprobe(struct kretprobe *rp) { - return -ENOSYS; + return -ENOTSUPP; } static inline int register_kretprobes(struct kretprobe **rps, int num) { - return -ENOSYS; + return -ENOTSUPP; } static inline void unregister_kretprobe(struct kretprobe *rp) { @@ -479,11 +479,11 @@ static inline void kprobe_flush_task(struct task_struct *tk) } static inline int disable_kprobe(struct kprobe *kp) { - return -ENOSYS; + return -ENOTSUPP; } static inline int enable_kprobe(struct kprobe *kp) { - return -ENOSYS; + return -ENOTSUPP; } #endif /* CONFIG_KPROBES */ static inline int disable_kretprobe(struct kretprobe *rp) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 2d28377a0e32..5e977d3b712a 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2021,13 +2021,13 @@ EXPORT_SYMBOL_GPL(unregister_kretprobes); #else /* CONFIG_KRETPROBES */ int register_kretprobe(struct kretprobe *rp) { - return -ENOSYS; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(register_kretprobe); int register_kretprobes(struct kretprobe **rps, int num) { - return -ENOSYS; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(register_kretprobes);