Commit abc28463 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Masami Hiramatsu (Google)
Browse files

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: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent 3afe7337
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -32,9 +32,6 @@ struct kprobe;

void arch_remove_kprobe(struct kprobe *p);

int kprobe_exceptions_notify(struct notifier_block *self,
			     unsigned long val, void *data);

struct prev_kprobe {
	struct kprobe *kp;
	unsigned long status;
+0 −2
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@ struct kprobe_ctlblk {

void arch_remove_kprobe(struct kprobe *);
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 */
extern __visible kprobe_opcode_t optprobe_template_entry[];
+0 −2
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ struct kprobe_ctlblk {

void arch_remove_kprobe(struct kprobe *);
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 __kprobes *trampoline_probe_handler(struct pt_regs *regs);

+0 −2
Original line number Diff line number Diff line
@@ -71,8 +71,6 @@ struct kprobe_ctlblk {
	struct prev_kprobe prev_kprobe;
};

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

#endif /* CONFIG_KPROBES */
#endif /* _ASM_KPROBES_H */
+0 −2
Original line number Diff line number Diff line
@@ -84,8 +84,6 @@ struct arch_optimized_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_handler(struct pt_regs *regs);
extern int kprobe_post_handler(struct pt_regs *regs);
Loading