From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Anders Roxell <anders.roxell@linaro.org>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: [for-next][PATCH 03/12] kprobes: Fix to init kprobes in subsys_initcall
Date: Tue, 25 Jun 2019 15:15:13 -0400 [thread overview]
Message-ID: <20190625191545.245259106@goodmis.org> (raw)
In-Reply-To: 20190625191510.599310671@goodmis.org
From: Masami Hiramatsu <mhiramat@kernel.org>
Since arm64 kernel initializes breakpoint trap vector in arch_initcall(),
initializing kprobe (and run smoke test) in postcore_initcall() causes
a kernel panic.
To fix this issue, move the kprobe initialization in subsys_initcall()
(which is called right afer the arch_initcall).
In-kernel kprobe users (ftrace and bpf) are using fs_initcall() which is
called after subsys_initcall(), so this shouldn't cause more problem.
Link: http://lkml.kernel.org/r/155956708268.12228.10363800793132214198.stgit@devnote2
Reported-by: Anders Roxell <anders.roxell@linaro.org>
Fixes: b5f8b32c93b2 ("kprobes: Initialize kprobes at postcore_initcall")
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/kprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 54aaaad00a47..5471efbeb937 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2289,7 +2289,7 @@ static int __init init_kprobes(void)
init_test_probes();
return err;
}
-postcore_initcall(init_kprobes);
+subsys_initcall(init_kprobes);
#ifdef CONFIG_DEBUG_FS
static void report_probe(struct seq_file *pi, struct kprobe *p,
--
2.20.1
next prev parent reply other threads:[~2019-06-25 19:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 19:15 [for-next][PATCH 00/12] tracing: More updates for 5.3 Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 01/12] ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 02/12] tracepoint: Use struct_size() in kmalloc() Steven Rostedt
2019-06-25 19:15 ` Steven Rostedt [this message]
2019-06-25 19:15 ` [for-next][PATCH 04/12] tracing/kprobe: Set print format right after parsed command Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 05/12] tracing/uprobe: Set print format when parsing command Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 06/12] tracing/probe: Add trace_probe init and free functions Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 07/12] tracing/probe: Add trace_event_call register API for trace_probe Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 08/12] tracing/probe: Add trace_event_file access APIs " Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 09/12] tracing/probe: Add trace flag " Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 10/12] tracing/probe: Add probe event name and group name accesses APIs Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 11/12] tracing/probe: Add trace_event_call " Steven Rostedt
2019-06-25 19:15 ` [for-next][PATCH 12/12] tracing/kprobe: Check registered state using kprobe Steven Rostedt
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=20190625191545.245259106@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=anders.roxell@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
/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