Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1218478rwl; Thu, 10 Aug 2023 08:05:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKITFw+tJUal5yfgVYYKa5tWE3a+pd+HrX1r6oX/Wuby7M4R0Y0ch4fD8pIQ+EPpRhsazR X-Received: by 2002:a17:907:96a0:b0:99c:10b5:7650 with SMTP id hd32-20020a17090796a000b0099c10b57650mr2870470ejc.1.1691679908505; Thu, 10 Aug 2023 08:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691679908; cv=none; d=google.com; s=arc-20160816; b=UH79G6YlWsMND1rUvNwZTPeM3NqnpJC7oHgN8VNcs7uyRqYdDqhNDC0RgsuLP2aR/2 /JBc2tRDakRsxYIIYAVIEh1pRCNXrewPcYhyBmayGOP+FDYJuzLslibZJaI9LyjPGQDM w8fjXRL4meosj6cuVstEd3qYLIe6ElzNVJKr/qxGX//3l+vev9hOJVQA96VpaAdRtn7W C6c1kfmnWpQXcpoNC94SlnndV8cK9tS7R7MNOgfZthcGpv+YimjHxBvaaKVF5VOEFj3b g7NeSO5oc98xHJRBwF7KsmHnBlW300vv9wwAFhFhpMNNiU1JM6D6aN4n5BdmEtslmWi7 BEcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jhITdlE6cVw4GRquDK3hbXygQ7cg7YlTrg174jqTgDo=; fh=L0dNwIUPEyASuSMw0/dzMrUGos7yk6xvW2lj0ycZLkU=; b=zneqpUb6OnB7Hq9vC10vR94PYxQ26vjLhoEfRhhu9tXMsYqHCSD2OFITJW7yN5d57f 1seLIV4IYHUTx9a3Sf0qGjvafInXxfXk3krCbt7VAuq5Yp5BdVaYTrXxD0X4rXkSXems rEGf9qNDZju9CBoPa9kV3JUNrjlEfbWstloNDt/NIfMp6AGY/5DzBtkXCI0ejyH9n4Wl bk9DaV8FvdTXqqZRB/+Km2VbNOmDnhD6W3bfg/JPhla/ykxmx4z0edGXxM3A5hdZoOt2 9Q+kQG8OfURKdRJfHQMP5R2pcQ68CVjpxfLu7qwexO5vKzj2TvlYXzfTDFOHgfqYIByb V42A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MhFCHi3J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a170906341400b00992b75d593bsi1805049ejb.318.2023.08.10.08.04.41; Thu, 10 Aug 2023 08:05:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MhFCHi3J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235709AbjHJOXk (ORCPT + 99 others); Thu, 10 Aug 2023 10:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235716AbjHJOX3 (ORCPT ); Thu, 10 Aug 2023 10:23:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B382704; Thu, 10 Aug 2023 07:23:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 92C6965DC3; Thu, 10 Aug 2023 14:23:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87822C433C7; Thu, 10 Aug 2023 14:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691677406; bh=cs9hAoMZsISt2PoCjIqaqsE5Y0qpeoj7NexdJjqc7FI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MhFCHi3JfnnOM/wH/IUOXANZeACqMVIJZ1ytPw9oqirmgzUbc4ifzc3UZCYagrzFa ab1BvcU8okF47/4vwMqvZE5SZcJsgFQR1j3MeDVm2xwJkG9X3SnjwhfSt3QZ8F5Tmz WbTe91EB1rcFkUsKbPcVuSqsvK1JV67KuASRjv0aOxBQc/TX+0g5x8CYtAo/w9ZN0T xAA6+TqvJPn7tmPP1BasNe0rDYp2JDl17cAbUzvfKuyAk7KJBvEI1h9mu8/Kr1hehw 4aa2owUC1brNn4/3U/VkfmM8Bkm2fdDLdQUnKxG3D1cch/NrLlHAsCUdn7G2Ox4pZ6 z8Zf/Z+WsCXJA== From: Arnd Bergmann To: Andrew Morton , linux-kernel@vger.kernel.org, "Naveen N. Rao" , Anil S Keshavamurthy , Masami Hiramatsu Cc: Arnd Bergmann , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Gaosheng Cui , "Steven Rostedt (Google)" , Yang Jihong , Jiri Olsa , Alexei Starovoitov , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [PATCH 14/17] kprobes: unify kprobes_exceptions_nofify() prototypes Date: Thu, 10 Aug 2023 16:19:32 +0200 Message-Id: <20230810141947.1236730-15-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810141947.1236730-1-arnd@kernel.org> References: <20230810141947.1236730-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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/ia64/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 ++++ 11 files changed, 4 insertions(+), 21 deletions(-) diff --git a/arch/arc/include/asm/kprobes.h b/arch/arc/include/asm/kprobes.h index de1566e32cb89..68e8301c0df2c 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 e26a278d301ab..5b8dbf1b0be49 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 05cd82eeca136..be7a3680dadff 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/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h index 9e956768946cc..56004f97df6d2 100644 --- a/arch/ia64/include/asm/kprobes.h +++ b/arch/ia64/include/asm/kprobes.h @@ -107,8 +107,6 @@ struct arch_specific_insn { }; 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 void arch_remove_kprobe(struct kprobe *p); diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h index 68b1e5d458cfb..bc27d99c94363 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 c8e4b4fd4e330..4525a9c68260d 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 83f732ca3af4d..3f87125dd9b0d 100644 --- a/arch/s390/include/asm/kprobes.h +++ b/arch/s390/include/asm/kprobes.h @@ -72,8 +72,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 eeba83e0a7d29..65d4c3316a5bd 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 06c2bc767ef75..aec742cd898f2 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 a2e9317aad495..5939694dfb28d 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 85a64cb95d755..987911cdc90a2 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -450,6 +450,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