diff options
author | Prasanna S Panchamukhi <prasanna@in.ibm.com> | 2005-09-06 18:19:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:59 -0400 |
commit | 3d97ae5b958855ac007b6f56a0f94ab8ade09e9e (patch) | |
tree | 6258b62fdbf4fcc7086e86d920e23609022d0881 /arch/i386/kernel/traps.c | |
parent | d0aaff9796c3310326d10da44fc0faed352a1d29 (diff) |
[PATCH] kprobes: prevent possible race conditions i386 changes
This patch contains the i386 architecture specific changes to prevent the
possible race conditions.
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r-- | arch/i386/kernel/traps.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 029bf94cda7d..09a58cb6daa7 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -363,8 +363,9 @@ static inline void die_if_kernel(const char * str, struct pt_regs * regs, long e | |||
363 | die(str, regs, err); | 363 | die(str, regs, err); |
364 | } | 364 | } |
365 | 365 | ||
366 | static void do_trap(int trapnr, int signr, char *str, int vm86, | 366 | static void __kprobes do_trap(int trapnr, int signr, char *str, int vm86, |
367 | struct pt_regs * regs, long error_code, siginfo_t *info) | 367 | struct pt_regs * regs, long error_code, |
368 | siginfo_t *info) | ||
368 | { | 369 | { |
369 | struct task_struct *tsk = current; | 370 | struct task_struct *tsk = current; |
370 | tsk->thread.error_code = error_code; | 371 | tsk->thread.error_code = error_code; |
@@ -460,7 +461,8 @@ DO_ERROR(12, SIGBUS, "stack segment", stack_segment) | |||
460 | DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) | 461 | DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) |
461 | DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0) | 462 | DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0) |
462 | 463 | ||
463 | fastcall void do_general_protection(struct pt_regs * regs, long error_code) | 464 | fastcall void __kprobes do_general_protection(struct pt_regs * regs, |
465 | long error_code) | ||
464 | { | 466 | { |
465 | int cpu = get_cpu(); | 467 | int cpu = get_cpu(); |
466 | struct tss_struct *tss = &per_cpu(init_tss, cpu); | 468 | struct tss_struct *tss = &per_cpu(init_tss, cpu); |
@@ -676,7 +678,7 @@ void unset_nmi_callback(void) | |||
676 | EXPORT_SYMBOL_GPL(unset_nmi_callback); | 678 | EXPORT_SYMBOL_GPL(unset_nmi_callback); |
677 | 679 | ||
678 | #ifdef CONFIG_KPROBES | 680 | #ifdef CONFIG_KPROBES |
679 | fastcall void do_int3(struct pt_regs *regs, long error_code) | 681 | fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) |
680 | { | 682 | { |
681 | if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) | 683 | if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) |
682 | == NOTIFY_STOP) | 684 | == NOTIFY_STOP) |
@@ -710,7 +712,7 @@ fastcall void do_int3(struct pt_regs *regs, long error_code) | |||
710 | * find every occurrence of the TF bit that could be saved away even | 712 | * find every occurrence of the TF bit that could be saved away even |
711 | * by user code) | 713 | * by user code) |
712 | */ | 714 | */ |
713 | fastcall void do_debug(struct pt_regs * regs, long error_code) | 715 | fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code) |
714 | { | 716 | { |
715 | unsigned int condition; | 717 | unsigned int condition; |
716 | struct task_struct *tsk = current; | 718 | struct task_struct *tsk = current; |