diff options
author | Rusty Lynch <rusty.lynch@intel.com> | 2005-07-05 21:54:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-05 22:19:00 -0400 |
commit | 6772926bef3c9f0ec761b39e5702535471fff70b (patch) | |
tree | b55f1b7af51e10c54781e24b5472236323d24ee5 | |
parent | 4b1294f928d9396e45f62b1c306ac8bf9fae036b (diff) |
[PATCH] kprobes: fix namespace problem and sparc64 build
The following renames arch_init, a kprobes function for performing any
architecture specific initialization, to arch_init_kprobes in order to
cleanup the namespace.
Also, this patch adds arch_init_kprobes to sparc64 to fix the sparc64 kprobes
build from the last return probe patch.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/kprobes.c | 5 | ||||
-rw-r--r-- | arch/x86_64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | include/linux/kprobes.h | 2 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 |
7 files changed, 11 insertions, 6 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index fc8b17521761..a6d8c45961d3 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -537,7 +537,7 @@ static struct kprobe trampoline_p = { | |||
537 | .pre_handler = trampoline_probe_handler | 537 | .pre_handler = trampoline_probe_handler |
538 | }; | 538 | }; |
539 | 539 | ||
540 | int __init arch_init(void) | 540 | int __init arch_init_kprobes(void) |
541 | { | 541 | { |
542 | return register_kprobe(&trampoline_p); | 542 | return register_kprobe(&trampoline_p); |
543 | } | 543 | } |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 3aa3167edbec..884f5cd27d8a 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -713,7 +713,7 @@ static struct kprobe trampoline_p = { | |||
713 | .pre_handler = trampoline_probe_handler | 713 | .pre_handler = trampoline_probe_handler |
714 | }; | 714 | }; |
715 | 715 | ||
716 | int __init arch_init(void) | 716 | int __init arch_init_kprobes(void) |
717 | { | 717 | { |
718 | trampoline_p.addr = | 718 | trampoline_p.addr = |
719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; | 719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; |
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c index 1d2ff6d6b0b3..a3d519518fb8 100644 --- a/arch/ppc64/kernel/kprobes.c +++ b/arch/ppc64/kernel/kprobes.c | |||
@@ -444,7 +444,7 @@ static struct kprobe trampoline_p = { | |||
444 | .pre_handler = trampoline_probe_handler | 444 | .pre_handler = trampoline_probe_handler |
445 | }; | 445 | }; |
446 | 446 | ||
447 | int __init arch_init(void) | 447 | int __init arch_init_kprobes(void) |
448 | { | 448 | { |
449 | return register_kprobe(&trampoline_p); | 449 | return register_kprobe(&trampoline_p); |
450 | } | 450 | } |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index bdac631cf011..bbf11f85dab1 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -433,3 +433,8 @@ int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
433 | return 0; | 433 | return 0; |
434 | } | 434 | } |
435 | 435 | ||
436 | /* architecture specific initialization */ | ||
437 | int arch_init_kprobes(void) | ||
438 | { | ||
439 | return 0; | ||
440 | } | ||
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index acd2a778ebe6..5c6dc7051482 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
@@ -682,7 +682,7 @@ static struct kprobe trampoline_p = { | |||
682 | .pre_handler = trampoline_probe_handler | 682 | .pre_handler = trampoline_probe_handler |
683 | }; | 683 | }; |
684 | 684 | ||
685 | int __init arch_init(void) | 685 | int __init arch_init_kprobes(void) |
686 | { | 686 | { |
687 | return register_kprobe(&trampoline_p); | 687 | return register_kprobe(&trampoline_p); |
688 | } | 688 | } |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index b7a194c4362a..e050fc2d4c26 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -155,7 +155,7 @@ extern void arch_copy_kprobe(struct kprobe *p); | |||
155 | extern void arch_arm_kprobe(struct kprobe *p); | 155 | extern void arch_arm_kprobe(struct kprobe *p); |
156 | extern void arch_disarm_kprobe(struct kprobe *p); | 156 | extern void arch_disarm_kprobe(struct kprobe *p); |
157 | extern void arch_remove_kprobe(struct kprobe *p); | 157 | extern void arch_remove_kprobe(struct kprobe *p); |
158 | extern int arch_init(void); | 158 | extern int arch_init_kprobes(void); |
159 | extern void show_registers(struct pt_regs *regs); | 159 | extern void show_registers(struct pt_regs *regs); |
160 | extern kprobe_opcode_t *get_insn_slot(void); | 160 | extern kprobe_opcode_t *get_insn_slot(void); |
161 | extern void free_insn_slot(kprobe_opcode_t *slot); | 161 | extern void free_insn_slot(kprobe_opcode_t *slot); |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 90c0e82b650c..b0237122b24e 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -574,7 +574,7 @@ static int __init init_kprobes(void) | |||
574 | INIT_HLIST_HEAD(&kretprobe_inst_table[i]); | 574 | INIT_HLIST_HEAD(&kretprobe_inst_table[i]); |
575 | } | 575 | } |
576 | 576 | ||
577 | err = arch_init(); | 577 | err = arch_init_kprobes(); |
578 | if (!err) | 578 | if (!err) |
579 | err = register_die_notifier(&kprobe_exceptions_nb); | 579 | err = register_die_notifier(&kprobe_exceptions_nb); |
580 | 580 | ||