Skip to content

Commit abc2846

Browse files
arndbmhiramat
authored andcommitted
kprobes: unify kprobes_exceptions_nofify() prototypes
Most architectures that support kprobes declare this function in their own asm/kprobes.h header and provide an override, but some are missing the prototype, which causes a warning for the __weak stub implementation: kernel/kprobes.c:1865:12: error: no previous prototype for 'kprobe_exceptions_notify' [-Werror=missing-prototypes] 1865 | int __weak kprobe_exceptions_notify(struct notifier_block *self, Move the prototype into linux/kprobes.h so it is visible to all the definitions. Link: https://lore.kernel.org/all/[email protected]/ Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent 3afe733 commit abc2846

File tree

10 files changed

+4
-19
lines changed

10 files changed

+4
-19
lines changed

arch/arc/include/asm/kprobes.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ struct kprobe;
3232

3333
void arch_remove_kprobe(struct kprobe *p);
3434

35-
int kprobe_exceptions_notify(struct notifier_block *self,
36-
unsigned long val, void *data);
37-
3835
struct prev_kprobe {
3936
struct kprobe *kp;
4037
unsigned long status;

arch/arm/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ struct kprobe_ctlblk {
4040

4141
void arch_remove_kprobe(struct kprobe *);
4242
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
43-
int kprobe_exceptions_notify(struct notifier_block *self,
44-
unsigned long val, void *data);
4543

4644
/* optinsn template addresses */
4745
extern __visible kprobe_opcode_t optprobe_template_entry[];

arch/arm64/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ struct kprobe_ctlblk {
3737

3838
void arch_remove_kprobe(struct kprobe *);
3939
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
40-
int kprobe_exceptions_notify(struct notifier_block *self,
41-
unsigned long val, void *data);
4240
void __kretprobe_trampoline(void);
4341
void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
4442

arch/mips/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ struct kprobe_ctlblk {
7171
struct prev_kprobe prev_kprobe;
7272
};
7373

74-
extern int kprobe_exceptions_notify(struct notifier_block *self,
75-
unsigned long val, void *data);
7674

7775
#endif /* CONFIG_KPROBES */
7876
#endif /* _ASM_KPROBES_H */

arch/powerpc/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ struct arch_optimized_insn {
8484
kprobe_opcode_t *insn;
8585
};
8686

87-
extern int kprobe_exceptions_notify(struct notifier_block *self,
88-
unsigned long val, void *data);
8987
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
9088
extern int kprobe_handler(struct pt_regs *regs);
9189
extern int kprobe_post_handler(struct pt_regs *regs);

arch/s390/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ struct kprobe_ctlblk {
7373
void arch_remove_kprobe(struct kprobe *p);
7474

7575
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
76-
int kprobe_exceptions_notify(struct notifier_block *self,
77-
unsigned long val, void *data);
7876

7977
#define flush_insn_slot(p) do { } while (0)
8078

arch/sh/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ struct kprobe_ctlblk {
4646
};
4747

4848
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49-
extern int kprobe_exceptions_notify(struct notifier_block *self,
50-
unsigned long val, void *data);
5149
extern int kprobe_handle_illslot(unsigned long pc);
5250
#else
5351

arch/sparc/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ struct kprobe_ctlblk {
4747
struct prev_kprobe prev_kprobe;
4848
};
4949

50-
int kprobe_exceptions_notify(struct notifier_block *self,
51-
unsigned long val, void *data);
5250
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
5351
asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
5452
struct pt_regs *regs);

arch/x86/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ struct kprobe_ctlblk {
113113
};
114114

115115
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
116-
extern int kprobe_exceptions_notify(struct notifier_block *self,
117-
unsigned long val, void *data);
118116
extern int kprobe_int3_handler(struct pt_regs *regs);
119117

120118
#else

include/linux/kprobes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@ int kprobe_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
445445

446446
int arch_kprobe_get_kallsym(unsigned int *symnum, unsigned long *value,
447447
char *type, char *sym);
448+
449+
int kprobe_exceptions_notify(struct notifier_block *self,
450+
unsigned long val, void *data);
451+
448452
#else /* !CONFIG_KPROBES: */
449453

450454
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)

0 commit comments

Comments
 (0)