From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751618AbdJTMb4 (ORCPT ); Fri, 20 Oct 2017 08:31:56 -0400 Received: from terminus.zytor.com ([65.50.211.136]:33803 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbdJTMby (ORCPT ); Fri, 20 Oct 2017 08:31:54 -0400 Date: Fri, 20 Oct 2017 05:26:10 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: anil.s.keshavamurthy@intel.com, stephen@networkplumber.org, mingo@kernel.org, peterz@infradead.org, vyasevich@gmail.com, mhiramat@kernel.org, ian.mcdonald@jandi.co.nz, linux-kernel@vger.kernel.org, rostedt@goodmis.org, hpa@zytor.com, paulmck@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com, ast@kernel.org, davem@davemloft.net, torvalds@linux-foundation.org, tglx@linutronix.de, keescook@chromium.org Reply-To: stephen@networkplumber.org, mingo@kernel.org, anil.s.keshavamurthy@intel.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mhiramat@kernel.org, vyasevich@gmail.com, ian.mcdonald@jandi.co.nz, paulmck@linux.vnet.ibm.com, ast@kernel.org, ananth@linux.vnet.ibm.com, rostedt@goodmis.org, hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, keescook@chromium.org, davem@davemloft.net In-Reply-To: <150724527741.5014.15465541485637899227.stgit@devbox> References: <150724527741.5014.15465541485637899227.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] kprobes: Disable the jprobes APIs Git-Commit-ID: 590c845930457d25d27dc1fdd964a1ce18ef2d7d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 590c845930457d25d27dc1fdd964a1ce18ef2d7d Gitweb: https://git.kernel.org/tip/590c845930457d25d27dc1fdd964a1ce18ef2d7d Author: Masami Hiramatsu AuthorDate: Fri, 6 Oct 2017 08:14:37 +0900 Committer: Ingo Molnar CommitDate: Fri, 20 Oct 2017 11:02:29 +0200 kprobes: Disable the jprobes APIs Disable the jprobes APIs and comment out the jprobes API function code. This is in preparation of removing all jprobes related code (including kprobe's break_handler). Nowadays ftrace and other tracing features are mature enough to replace jprobes use-cases. Users can safely use ftrace and perf probe etc. for their use cases. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Ian McDonald Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vlad Yasevich Link: http://lkml.kernel.org/r/150724527741.5014.15465541485637899227.stgit@devbox Signed-off-by: Ingo Molnar --- include/linux/kprobes.h | 40 ++++++++++++++++++---------------------- kernel/kprobes.c | 2 ++ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index bd26847..56b2e69 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -391,10 +391,6 @@ int register_kprobes(struct kprobe **kps, int num); void unregister_kprobes(struct kprobe **kps, int num); int setjmp_pre_handler(struct kprobe *, struct pt_regs *); int longjmp_break_handler(struct kprobe *, struct pt_regs *); -int register_jprobe(struct jprobe *p); -void unregister_jprobe(struct jprobe *p); -int register_jprobes(struct jprobe **jps, int num); -void unregister_jprobes(struct jprobe **jps, int num); void jprobe_return(void); unsigned long arch_deref_entry_point(void *); @@ -443,20 +439,6 @@ static inline void unregister_kprobe(struct kprobe *p) static inline void unregister_kprobes(struct kprobe **kps, int num) { } -static inline int register_jprobe(struct jprobe *p) -{ - return -ENOSYS; -} -static inline int register_jprobes(struct jprobe **jps, int num) -{ - return -ENOSYS; -} -static inline void unregister_jprobe(struct jprobe *p) -{ -} -static inline void unregister_jprobes(struct jprobe **jps, int num) -{ -} static inline void jprobe_return(void) { } @@ -486,6 +468,20 @@ static inline int enable_kprobe(struct kprobe *kp) return -ENOSYS; } #endif /* CONFIG_KPROBES */ +static inline int __deprecated register_jprobe(struct jprobe *p) +{ + return -ENOSYS; +} +static inline int __deprecated register_jprobes(struct jprobe **jps, int num) +{ + return -ENOSYS; +} +static inline void __deprecated unregister_jprobe(struct jprobe *p) +{ +} +static inline void __deprecated unregister_jprobes(struct jprobe **jps, int num) +{ +} static inline int disable_kretprobe(struct kretprobe *rp) { return disable_kprobe(&rp->kp); @@ -494,13 +490,13 @@ static inline int enable_kretprobe(struct kretprobe *rp) { return enable_kprobe(&rp->kp); } -static inline int disable_jprobe(struct jprobe *jp) +static inline int __deprecated disable_jprobe(struct jprobe *jp) { - return disable_kprobe(&jp->kp); + return -ENOSYS; } -static inline int enable_jprobe(struct jprobe *jp) +static inline int __deprecated enable_jprobe(struct jprobe *jp) { - return enable_kprobe(&jp->kp); + return -ENOSYS; } #ifndef CONFIG_KPROBES diff --git a/kernel/kprobes.c b/kernel/kprobes.c index a8fc149..da2ccf1 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1771,6 +1771,7 @@ unsigned long __weak arch_deref_entry_point(void *entry) return (unsigned long)entry; } +#if 0 int register_jprobes(struct jprobe **jps, int num) { int ret = 0, i; @@ -1839,6 +1840,7 @@ void unregister_jprobes(struct jprobe **jps, int num) } } EXPORT_SYMBOL_GPL(unregister_jprobes); +#endif #ifdef CONFIG_KRETPROBES /*