From: tip-bot for Masami Hiramatsu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/core] kprobes: Disable the jprobes APIs
Date: Fri, 20 Oct 2017 05:26:10 -0700 [thread overview]
Message-ID: <tip-590c845930457d25d27dc1fdd964a1ce18ef2d7d@git.kernel.org> (raw)
In-Reply-To: <150724527741.5014.15465541485637899227.stgit@devbox>
Commit-ID: 590c845930457d25d27dc1fdd964a1ce18ef2d7d
Gitweb: https://git.kernel.org/tip/590c845930457d25d27dc1fdd964a1ce18ef2d7d
Author: Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Fri, 6 Oct 2017 08:14:37 +0900
Committer: Ingo Molnar <mingo@kernel.org>
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 <mhiramat@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Ian McDonald <ian.mcdonald@jandi.co.nz>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Link: http://lkml.kernel.org/r/150724527741.5014.15465541485637899227.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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
/*
next prev parent reply other threads:[~2017-10-20 12:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 23:13 [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs Masami Hiramatsu
2017-10-05 23:13 ` [RFC PATCH -tip 1/5] kprobes: Use ENOTSUPP instead of ENOSYS Masami Hiramatsu
2017-10-20 8:57 ` Ingo Molnar
2017-10-20 15:51 ` Masami Hiramatsu
2017-10-05 23:14 ` [RFC PATCH -tip 2/5] kprobes: Abolish jprobe APIs Masami Hiramatsu
2017-10-20 12:26 ` tip-bot for Masami Hiramatsu [this message]
2017-10-05 23:15 ` [RFC PATCH -tip 3/5] kprobes: Disable jprobe test code Masami Hiramatsu
2017-10-20 12:26 ` [tip:perf/core] kprobes: Disable the jprobes " tip-bot for Masami Hiramatsu
2017-10-05 23:15 ` [RFC PATCH -tip 4/5] kprobes: Remove jprobe sample code Masami Hiramatsu
2017-10-20 12:27 ` [tip:perf/core] kprobes: Remove the jprobes " tip-bot for Masami Hiramatsu
2017-10-05 23:16 ` [RFC PATCH -tip 5/5] kprobes: docs: Remove jprobe related document Masami Hiramatsu
2017-10-20 12:27 ` [tip:perf/core] kprobes/docs: Remove jprobes related documents tip-bot for Masami Hiramatsu
2017-10-05 23:35 ` [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs Kees Cook
2017-10-05 23:58 ` Steven Rostedt
2017-10-06 0:06 ` Kees Cook
2017-10-06 4:49 ` Masami Hiramatsu
2017-10-06 12:58 ` Steven Rostedt
2017-10-06 15:34 ` Steven Rostedt
2017-10-07 5:24 ` Stafford Horne
2017-10-09 16:48 ` Steven Rostedt
2017-10-07 8:55 ` Ingo Molnar
2017-10-09 16:45 ` Steven Rostedt
2017-10-07 9:35 ` Masami Hiramatsu
2017-10-09 16:59 ` Steven Rostedt
2017-10-09 15:33 ` Jonathan Corbet
2017-10-09 16:20 ` Steven Rostedt
2017-10-09 16:33 ` Jonathan Corbet
2017-10-09 16:41 ` Steven Rostedt
2017-10-09 18:10 ` Steven Rostedt
2017-10-10 14:02 ` Steven Rostedt
2017-10-06 0:32 ` Masami Hiramatsu
2017-10-06 1:11 ` Steven Rostedt
2017-10-06 4:47 ` Masami Hiramatsu
2017-10-20 12:22 ` Ingo Molnar
2017-10-20 13:32 ` Kees Cook
2017-10-20 15:17 ` Ingo Molnar
2017-10-20 16:28 ` Kees Cook
2017-10-21 8:06 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-590c845930457d25d27dc1fdd964a1ce18ef2d7d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ananth@linux.vnet.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=ast@kernel.org \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=ian.mcdonald@jandi.co.nz \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=stephen@networkplumber.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox