[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1420616146-42980-1-git-send-email-wangnan0@huawei.com>
Date: Wed, 7 Jan 2015 15:35:46 +0800
From: Wang Nan <wangnan0@...wei.com>
To: <linux@....linux.org.uk>, <mingo@...hat.com>, <x86@...nel.org>,
<masami.hiramatsu.pt@...achi.com>,
<anil.s.keshavamurthy@...el.com>, <davem@...emloft.net>,
<ananth@...ibm.com>, <dave.long@...aro.org>, <tixy@...aro.org>
CC: <lizefan@...wei.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [RFC PATCH 06/11] kprobes: makes kprobes_initialized globally visable.
Following patches will enable kprobe registering very early, before
kprobe system initialized. Arch code can use it to do special treatments
for such kprobes.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
---
include/linux/kprobes.h | 2 ++
kernel/kprobes.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index fa0de88..b0265f9 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -50,6 +50,8 @@
#define KPROBE_REENTER 0x00000004
#define KPROBE_HIT_SSDONE 0x00000008
+extern int kprobes_initialized;
+
#else /* CONFIG_KPROBES */
typedef int kprobe_opcode_t;
struct arch_specific_insn {
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9fbe0c3..4591cae 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -67,7 +67,7 @@
addr = ((kprobe_opcode_t *)(kallsyms_lookup_name(name)))
#endif
-static int kprobes_initialized;
+int kprobes_initialized;
static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
static struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE];
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists