diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2014-04-17 04:18:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-24 04:26:38 -0400 |
commit | 9326638cbee2d36b051ed2a69f3e4e107e5f86bd (patch) | |
tree | 995433e24b135a2858765519aec8fe9e889afd68 /arch/x86/kernel/dumpstack.c | |
parent | 9c54b6164eeb292a0eac86c6913bd8daaff35e62 (diff) |
kprobes, x86: Use NOKPROBE_SYMBOL() instead of __kprobes annotation
Use NOKPROBE_SYMBOL macro for protecting functions
from kprobes instead of __kprobes annotation under
arch/x86.
This applies nokprobe_inline annotation for some cases,
because NOKPROBE_SYMBOL() will inhibit inlining by
referring the symbol address.
This just folds a bunch of previous NOKPROBE_SYMBOL()
cleanup patches for x86 to one patch.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/20140417081814.26341.51656.stgit@ltc230.yrl.intra.hitachi.co.jp
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Lebon <jlebon@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/dumpstack.c')
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index d9c12d3022a7..b74ebc7c4402 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -200,7 +200,7 @@ static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED; | |||
200 | static int die_owner = -1; | 200 | static int die_owner = -1; |
201 | static unsigned int die_nest_count; | 201 | static unsigned int die_nest_count; |
202 | 202 | ||
203 | unsigned __kprobes long oops_begin(void) | 203 | unsigned long oops_begin(void) |
204 | { | 204 | { |
205 | int cpu; | 205 | int cpu; |
206 | unsigned long flags; | 206 | unsigned long flags; |
@@ -223,8 +223,9 @@ unsigned __kprobes long oops_begin(void) | |||
223 | return flags; | 223 | return flags; |
224 | } | 224 | } |
225 | EXPORT_SYMBOL_GPL(oops_begin); | 225 | EXPORT_SYMBOL_GPL(oops_begin); |
226 | NOKPROBE_SYMBOL(oops_begin); | ||
226 | 227 | ||
227 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | 228 | void oops_end(unsigned long flags, struct pt_regs *regs, int signr) |
228 | { | 229 | { |
229 | if (regs && kexec_should_crash(current)) | 230 | if (regs && kexec_should_crash(current)) |
230 | crash_kexec(regs); | 231 | crash_kexec(regs); |
@@ -247,8 +248,9 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | |||
247 | panic("Fatal exception"); | 248 | panic("Fatal exception"); |
248 | do_exit(signr); | 249 | do_exit(signr); |
249 | } | 250 | } |
251 | NOKPROBE_SYMBOL(oops_end); | ||
250 | 252 | ||
251 | int __kprobes __die(const char *str, struct pt_regs *regs, long err) | 253 | int __die(const char *str, struct pt_regs *regs, long err) |
252 | { | 254 | { |
253 | #ifdef CONFIG_X86_32 | 255 | #ifdef CONFIG_X86_32 |
254 | unsigned short ss; | 256 | unsigned short ss; |
@@ -291,6 +293,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) | |||
291 | #endif | 293 | #endif |
292 | return 0; | 294 | return 0; |
293 | } | 295 | } |
296 | NOKPROBE_SYMBOL(__die); | ||
294 | 297 | ||
295 | /* | 298 | /* |
296 | * This is gone through when something in the kernel has done something bad | 299 | * This is gone through when something in the kernel has done something bad |