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/20231108125843.3806765-4-arnd@kernel.org/ Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>pull/318/merge
parent
3afe733729
commit
abc28463c8
|
|
@ -32,9 +32,6 @@ struct kprobe;
|
||||||
|
|
||||||
void arch_remove_kprobe(struct kprobe *p);
|
void arch_remove_kprobe(struct kprobe *p);
|
||||||
|
|
||||||
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
|
|
||||||
struct prev_kprobe {
|
struct prev_kprobe {
|
||||||
struct kprobe *kp;
|
struct kprobe *kp;
|
||||||
unsigned long status;
|
unsigned long status;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@ struct kprobe_ctlblk {
|
||||||
|
|
||||||
void arch_remove_kprobe(struct kprobe *);
|
void arch_remove_kprobe(struct kprobe *);
|
||||||
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
|
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
|
||||||
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
|
|
||||||
/* optinsn template addresses */
|
/* optinsn template addresses */
|
||||||
extern __visible kprobe_opcode_t optprobe_template_entry[];
|
extern __visible kprobe_opcode_t optprobe_template_entry[];
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ struct kprobe_ctlblk {
|
||||||
|
|
||||||
void arch_remove_kprobe(struct kprobe *);
|
void arch_remove_kprobe(struct kprobe *);
|
||||||
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
|
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
|
||||||
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
void __kretprobe_trampoline(void);
|
void __kretprobe_trampoline(void);
|
||||||
void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
|
void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,6 @@ struct kprobe_ctlblk {
|
||||||
struct prev_kprobe prev_kprobe;
|
struct prev_kprobe prev_kprobe;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
|
|
||||||
#endif /* CONFIG_KPROBES */
|
#endif /* CONFIG_KPROBES */
|
||||||
#endif /* _ASM_KPROBES_H */
|
#endif /* _ASM_KPROBES_H */
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,6 @@ struct arch_optimized_insn {
|
||||||
kprobe_opcode_t *insn;
|
kprobe_opcode_t *insn;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||||
extern int kprobe_handler(struct pt_regs *regs);
|
extern int kprobe_handler(struct pt_regs *regs);
|
||||||
extern int kprobe_post_handler(struct pt_regs *regs);
|
extern int kprobe_post_handler(struct pt_regs *regs);
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,6 @@ struct kprobe_ctlblk {
|
||||||
void arch_remove_kprobe(struct kprobe *p);
|
void arch_remove_kprobe(struct kprobe *p);
|
||||||
|
|
||||||
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||||
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
|
|
||||||
#define flush_insn_slot(p) do { } while (0)
|
#define flush_insn_slot(p) do { } while (0)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,6 @@ struct kprobe_ctlblk {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
extern int kprobe_handle_illslot(unsigned long pc);
|
extern int kprobe_handle_illslot(unsigned long pc);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ struct kprobe_ctlblk {
|
||||||
struct prev_kprobe prev_kprobe;
|
struct prev_kprobe prev_kprobe;
|
||||||
};
|
};
|
||||||
|
|
||||||
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||||
asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
|
asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
|
||||||
struct pt_regs *regs);
|
struct pt_regs *regs);
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,6 @@ struct kprobe_ctlblk {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
|
||||||
unsigned long val, void *data);
|
|
||||||
extern int kprobe_int3_handler(struct pt_regs *regs);
|
extern int kprobe_int3_handler(struct pt_regs *regs);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,10 @@ int kprobe_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
|
||||||
|
|
||||||
int arch_kprobe_get_kallsym(unsigned int *symnum, unsigned long *value,
|
int arch_kprobe_get_kallsym(unsigned int *symnum, unsigned long *value,
|
||||||
char *type, char *sym);
|
char *type, char *sym);
|
||||||
|
|
||||||
|
int kprobe_exceptions_notify(struct notifier_block *self,
|
||||||
|
unsigned long val, void *data);
|
||||||
|
|
||||||
#else /* !CONFIG_KPROBES: */
|
#else /* !CONFIG_KPROBES: */
|
||||||
|
|
||||||
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue