Commit
6772926bef3c9f0ec761b39e5702535471fff70b
Exists in
master
and in
39 other branches
8mp-imx_5.4.70_2.3.0, 8qm-imx_5.4.70_2.3.0, emb_imx_lf-5.15.y, emb_lf-6.1.y, imx_3.0.35_4.1.0, imx_3.10.17_1.0.1_ga, imx_3.10.53_1.1.0_ga, imx_3.14.28_1.0.0_ga, imx_4.1.15_1.0.0_ga, pitx_8mp_lf-5.10.y, rt-smarc-imx_4.1.15_1.0.0_ga, rt_linux_5.15.71, smarc-8m-android-11.0.0_2.0.0, smarc-imx6_4.14.98_2.0.0_ga, smarc-imx6_4.9.88_2.0.0_ga, smarc-imx7_4.14.98_2.0.0_ga, smarc-imx7_4.9.11_1.0.0_ga, smarc-imx7_4.9.88_2.0.0_ga, smarc-imx_3.10.53_1.1.0_ga, smarc-imx_3.14.28_1.0.0_ga, smarc-imx_4.1.15_1.0.0_ga, smarc-imx_4.9.11_1.0.0_ga, smarc-imx_4.9.51_imx8m_ga, smarc-imx_4.9.88_2.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_1.2.0_ga, smarc_8m_00d0_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.14.78_1.0.0_ga, smarc_8m_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.19.35_1.1.0, smarc_8mm_imx_4.14.78_1.0.0_ga, smarc_8mm_imx_4.14.98_2.0.0_ga, smarc_8mm_imx_4.19.35_1.1.0, smarc_8mm_imx_5.4.24_2.1.0, smarc_8mp_lf-5.10.y, smarc_8mq_imx_5.4.24_2.1.0, smarc_8mq_lf-5.10.y, smarc_imx_lf-5.15.y
[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>
Showing
7 changed files
with
11 additions
and
6 deletions
Side-by-side Diff
... |
... |
@@ -537,7 +537,7 @@ |
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 |
} |
... |
... |
@@ -713,7 +713,7 @@ |
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; |
... |
... |
@@ -444,7 +444,7 @@ |
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 |
} |
... |
... |
@@ -432,4 +432,10 @@ |
432
|
432 |
} |
433
|
433 |
return 0; |
434
|
434 |
} |
|
435 |
+ |
|
436 |
+/* architecture specific initialization */ |
|
437 |
+int arch_init_kprobes(void) |
|
438 |
+{ |
|
439 |
+ return 0; |
|
440 |
+} |
... |
... |
@@ -682,7 +682,7 @@ |
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 |
} |
... |
... |
@@ -155,7 +155,7 @@ |
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); |
... |
... |
@@ -574,7 +574,7 @@ |
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 |
|