From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09356C41535 for ; Wed, 8 Nov 2023 23:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229566AbjKHXU3 (ORCPT ); Wed, 8 Nov 2023 18:20:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjKHXU2 (ORCPT ); Wed, 8 Nov 2023 18:20:28 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16D425AC; Wed, 8 Nov 2023 15:20:26 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FB6AC433C8; Wed, 8 Nov 2023 23:20:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699485626; bh=PYJW4QGKn9tJvNiaagWV7uxmfj3dj1vHSKjkB8gGQNU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BzFtaBogfySwWTla2NJeVqR4PuaYoyopTLM2Vi9KPqLDdx3zZhWzGVJP/DnI0doAr DCysq9OUVMln4AwlnrEJVkGy7f+Qm12tVyciJjWeul+4uzovgGCKk2sMAtDMAjSHQk VewIlU9Taz4GP2QauTMdLCa7SvSTilwhfOh7tff1Ga+FrRKGb/HdT6qnkIpQd6cOAM O/27XvUeKFXk5bmEslLGwZ3jtw7QVPeQvIoDsIh/p8JjCWRipxoFk8lN/qC5a7ewR/ H/tawx3cjSx2H40w4euTMdD4AcO2ZafY4Qwdj7yo9jdfRTzsx4bJpJ6lI9DE3yX0ny IuIsDgsRCUzJQ== Date: Thu, 9 Nov 2023 08:20:09 +0900 From: Masami Hiramatsu (Google) To: Arnd Bergmann Cc: Andrew Morton , linux-kernel@vger.kernel.org, Masahiro Yamada , linux-kbuild@vger.kernel.org, Arnd Bergmann , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Guo Ren , Peter Zijlstra , Ard Biesheuvel , Huacai Chen , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand , Palmer Dabbelt , Heiko Carstens , John Paul Adrian Glaubitz , "David S. Miller" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Helge Deller , Sudip Mukherjee , Greg Kroah-Hartman , Timur Tabi , Kent Overstreet , David Woodhouse , "Naveen N. Rao" , Anil S Keshavamurthy , Kees Cook , Vincenzo Frascino , Juri Lelli , Vincent Guittot , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Al Viro , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, netdev@vger.kernel.org, linux-parisc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-bcachefs@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes Message-Id: <20231109082009.a34621399a98181ee6cde60b@kernel.org> In-Reply-To: <20231108125843.3806765-4-arnd@kernel.org> References: <20231108125843.3806765-1-arnd@kernel.org> <20231108125843.3806765-4-arnd@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Wed, 8 Nov 2023 13:58:24 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > 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. Thanks, let me pick this to linux-trace tree. > > Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Arnd Bergmann > --- > arch/arc/include/asm/kprobes.h | 3 --- > arch/arm/include/asm/kprobes.h | 2 -- > arch/arm64/include/asm/kprobes.h | 2 -- > arch/mips/include/asm/kprobes.h | 2 -- > arch/powerpc/include/asm/kprobes.h | 2 -- > arch/s390/include/asm/kprobes.h | 2 -- > arch/sh/include/asm/kprobes.h | 2 -- > arch/sparc/include/asm/kprobes.h | 2 -- > arch/x86/include/asm/kprobes.h | 2 -- > include/linux/kprobes.h | 4 ++++ > 10 files changed, 4 insertions(+), 19 deletions(-) > > diff --git a/arch/arc/include/asm/kprobes.h b/arch/arc/include/asm/kprobes.h > index de1566e32cb8..68e8301c0df2 100644 > --- a/arch/arc/include/asm/kprobes.h > +++ b/arch/arc/include/asm/kprobes.h > @@ -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; > diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h > index e26a278d301a..5b8dbf1b0be4 100644 > --- a/arch/arm/include/asm/kprobes.h > +++ b/arch/arm/include/asm/kprobes.h > @@ -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[]; > diff --git a/arch/arm64/include/asm/kprobes.h b/arch/arm64/include/asm/kprobes.h > index 05cd82eeca13..be7a3680dadf 100644 > --- a/arch/arm64/include/asm/kprobes.h > +++ b/arch/arm64/include/asm/kprobes.h > @@ -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); > > diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h > index 68b1e5d458cf..bc27d99c9436 100644 > --- a/arch/mips/include/asm/kprobes.h > +++ b/arch/mips/include/asm/kprobes.h > @@ -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 */ > diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h > index c8e4b4fd4e33..4525a9c68260 100644 > --- a/arch/powerpc/include/asm/kprobes.h > +++ b/arch/powerpc/include/asm/kprobes.h > @@ -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); > diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h > index 21b9e5290c04..01f1682a73b7 100644 > --- a/arch/s390/include/asm/kprobes.h > +++ b/arch/s390/include/asm/kprobes.h > @@ -73,8 +73,6 @@ struct kprobe_ctlblk { > void arch_remove_kprobe(struct kprobe *p); > > 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) > > diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h > index eeba83e0a7d2..65d4c3316a5b 100644 > --- a/arch/sh/include/asm/kprobes.h > +++ b/arch/sh/include/asm/kprobes.h > @@ -46,8 +46,6 @@ struct kprobe_ctlblk { > }; > > 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); > #else > > diff --git a/arch/sparc/include/asm/kprobes.h b/arch/sparc/include/asm/kprobes.h > index 06c2bc767ef7..aec742cd898f 100644 > --- a/arch/sparc/include/asm/kprobes.h > +++ b/arch/sparc/include/asm/kprobes.h > @@ -47,8 +47,6 @@ struct kprobe_ctlblk { > 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); > asmlinkage void __kprobes kprobe_trap(unsigned long trap_level, > struct pt_regs *regs); > diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h > index a2e9317aad49..5939694dfb28 100644 > --- a/arch/x86/include/asm/kprobes.h > +++ b/arch/x86/include/asm/kprobes.h > @@ -113,8 +113,6 @@ struct kprobe_ctlblk { > }; > > 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); > > #else > diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h > index 365eb092e9c4..ab1da3142b06 100644 > --- a/include/linux/kprobes.h > +++ b/include/linux/kprobes.h > @@ -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, > char *type, char *sym); > + > +int kprobe_exceptions_notify(struct notifier_block *self, > + unsigned long val, void *data); > + > #else /* !CONFIG_KPROBES: */ > > static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) > -- > 2.39.2 > -- Masami Hiramatsu (Google)