Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Rusty Lynch and committed by
Linus Torvalds
6772926b 4b1294f9

+11 -6
+1 -1
arch/i386/kernel/kprobes.c
··· 537 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 542 return register_kprobe(&trampoline_p); 543 543 }
+1 -1
arch/ia64/kernel/kprobes.c
··· 713 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 718 trampoline_p.addr = 719 719 (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip;
+1 -1
arch/ppc64/kernel/kprobes.c
··· 444 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 449 return register_kprobe(&trampoline_p); 450 450 }
+5
arch/sparc64/kernel/kprobes.c
··· 433 433 return 0; 434 434 } 435 435 436 + /* architecture specific initialization */ 437 + int arch_init_kprobes(void) 438 + { 439 + return 0; 440 + }
+1 -1
arch/x86_64/kernel/kprobes.c
··· 682 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 687 return register_kprobe(&trampoline_p); 688 688 }
+1 -1
include/linux/kprobes.h
··· 155 155 extern void arch_arm_kprobe(struct kprobe *p); 156 156 extern void arch_disarm_kprobe(struct kprobe *p); 157 157 extern void arch_remove_kprobe(struct kprobe *p); 158 - extern int arch_init(void); 158 + extern int arch_init_kprobes(void); 159 159 extern void show_registers(struct pt_regs *regs); 160 160 extern kprobe_opcode_t *get_insn_slot(void); 161 161 extern void free_insn_slot(kprobe_opcode_t *slot);
+1 -1
kernel/kprobes.c
··· 574 574 INIT_HLIST_HEAD(&kretprobe_inst_table[i]); 575 575 } 576 576 577 - err = arch_init(); 577 + err = arch_init_kprobes(); 578 578 if (!err) 579 579 err = register_die_notifier(&kprobe_exceptions_nb); 580 580