From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Oleg Nesterov <oleg@redhat.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>,
Linus Walleij <linus.walleij@linaro.org>,
Ard Biesheuvel <ardb@kernel.org>,
Kees Cook <keescook@chromium.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 05/16] ARM: kprobes: avoid missing-declaration warnings
Date: Wed, 17 May 2023 10:29:10 +0900 [thread overview]
Message-ID: <20230517102910.753251be84c5156476d7c105@kernel.org> (raw)
In-Reply-To: <20230516154605.517690-6-arnd@kernel.org>
On Tue, 16 May 2023 17:45:54 +0200
Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> checker_stack_use_t32strd() and kprobe_handler() can be made static since
> they are not used from other files, while coverage_start_registers()
> and __kprobes_test_case() are used from assembler code, and just need
> a declaration to avoid a warning with the global definition.
>
> arch/arm/probes/kprobes/checkers-common.c:43:18: error: no previous prototype for 'checker_stack_use_t32strd'
> arch/arm/probes/kprobes/core.c:236:16: error: no previous prototype for 'kprobe_handler'
> arch/arm/probes/kprobes/test-core.c:723:10: error: no previous prototype for 'coverage_start_registers'
> arch/arm/probes/kprobes/test-core.c:918:14: error: no previous prototype for '__kprobes_test_case_start'
> arch/arm/probes/kprobes/test-core.c:952:14: error: no previous prototype for '__kprobes_test_case_end_16'
> arch/arm/probes/kprobes/test-core.c:967:14: error: no previous prototype for '__kprobes_test_case_end_32'
>
> Fixes: 6624cf651f1a ("ARM: kprobes: collects stack consumption for store instructions")
> Fixes: 454f3e132d05 ("ARM/kprobes: Remove jprobe arm implementation")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thank you for fixing warnings!
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> arch/arm/probes/kprobes/checkers-common.c | 2 +-
> arch/arm/probes/kprobes/core.c | 2 +-
> arch/arm/probes/kprobes/opt-arm.c | 2 --
> arch/arm/probes/kprobes/test-core.c | 2 +-
> arch/arm/probes/kprobes/test-core.h | 4 ++++
> 5 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/probes/kprobes/checkers-common.c b/arch/arm/probes/kprobes/checkers-common.c
> index 4d720990cf2a..eba7ac4725c0 100644
> --- a/arch/arm/probes/kprobes/checkers-common.c
> +++ b/arch/arm/probes/kprobes/checkers-common.c
> @@ -40,7 +40,7 @@ enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn,
> * Different from other insn uses imm8, the real addressing offset of
> * STRD in T32 encoding should be imm8 * 4. See ARMARM description.
> */
> -enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
> +static enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
> struct arch_probes_insn *asi,
> const struct decode_header *h)
> {
> diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c
> index 88999ed2cfc4..3ee0e3024ff0 100644
> --- a/arch/arm/probes/kprobes/core.c
> +++ b/arch/arm/probes/kprobes/core.c
> @@ -233,7 +233,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
> * kprobe, and that level is reserved for user kprobe handlers, so we can't
> * risk encountering a new kprobe in an interrupt handler.
> */
> -void __kprobes kprobe_handler(struct pt_regs *regs)
> +static void __kprobes kprobe_handler(struct pt_regs *regs)
> {
> struct kprobe *p, *cur;
> struct kprobe_ctlblk *kcb;
> diff --git a/arch/arm/probes/kprobes/opt-arm.c b/arch/arm/probes/kprobes/opt-arm.c
> index dbef34ed933f..7f65048380ca 100644
> --- a/arch/arm/probes/kprobes/opt-arm.c
> +++ b/arch/arm/probes/kprobes/opt-arm.c
> @@ -145,8 +145,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
> }
> }
>
> -extern void kprobe_handler(struct pt_regs *regs);
> -
> static void
> optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
> {
> diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c
> index c562832b8627..171c7076b89f 100644
> --- a/arch/arm/probes/kprobes/test-core.c
> +++ b/arch/arm/probes/kprobes/test-core.c
> @@ -720,7 +720,7 @@ static const char coverage_register_lookup[16] = {
> [REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP,
> };
>
> -unsigned coverage_start_registers(const struct decode_header *h)
> +static unsigned coverage_start_registers(const struct decode_header *h)
> {
> unsigned regs = 0;
> int i;
> diff --git a/arch/arm/probes/kprobes/test-core.h b/arch/arm/probes/kprobes/test-core.h
> index 56ad3c0aaeea..c7297037c162 100644
> --- a/arch/arm/probes/kprobes/test-core.h
> +++ b/arch/arm/probes/kprobes/test-core.h
> @@ -454,3 +454,7 @@ void kprobe_thumb32_test_cases(void);
> #else
> void kprobe_arm_test_cases(void);
> #endif
> +
> +void __kprobes_test_case_start(void);
> +void __kprobes_test_case_end_16(void);
> +void __kprobes_test_case_end_32(void);
> --
> 2.39.2
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-05-17 1:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 15:45 [PATCH 00/16] ARM: address -Wmissing-prototype warnings Arnd Bergmann
2023-05-16 15:45 ` [PATCH 01/16] ARM: dma-mapping: hide unused dma_contiguous_early_fixup function Arnd Bergmann
2023-05-16 15:45 ` [PATCH 02/16] ARM: traps: hide unused functions on NOMMU Arnd Bergmann
2023-05-16 15:45 ` [PATCH 03/16] ARM: vfp: include asm/neon.h in vfpmodule.c Arnd Bergmann
2023-05-16 15:45 ` [PATCH 04/16] ARM: vdso: add missing prototypes Arnd Bergmann
2023-05-16 15:45 ` [PATCH 05/16] ARM: kprobes: avoid missing-declaration warnings Arnd Bergmann
2023-05-17 1:29 ` Masami Hiramatsu [this message]
2023-05-16 15:45 ` [PATCH 06/16] ARM: tcm: move tcm_init() prototype to asm/tcm.h Arnd Bergmann
2023-05-22 7:34 ` Linus Walleij
2023-05-16 15:45 ` [PATCH 07/16] ARM: add prototype for function called only from asm Arnd Bergmann
2023-05-16 15:45 ` [PATCH 08/16] ARM: add clear/copy_user_highpage declarations Arnd Bergmann
2023-05-16 15:45 ` [PATCH 09/16] ARM: cacheflush: avoid __flush_anon_page() missing-prototype warning Arnd Bergmann
2023-05-16 15:45 ` [PATCH 10/16] ARM: nommu: include asm/idmap.h Arnd Bergmann
2023-05-16 15:46 ` [PATCH 11/16] ARM: move setup functions to header Arnd Bergmann
2023-05-22 7:35 ` Linus Walleij
2023-05-16 15:46 ` [PATCH 12/16] ARM: fiq: include asm/mach/irq.h for prototypes Arnd Bergmann
2023-05-16 15:46 ` [PATCH 13/16] ARM: vfp: add vfp_entry prototype Arnd Bergmann
2023-05-17 11:13 ` Ard Biesheuvel
2023-05-16 15:46 ` [PATCH 14/16] ARM: add missing syscall prototypes Arnd Bergmann
2023-05-16 15:46 ` [PATCH 15/16] ARM: decompressor: move function prototypes to misc.h Arnd Bergmann
2023-05-16 15:46 ` [PATCH 16/16] ARM: xip-kernel: add __inflate_kernel_data prototype Arnd Bergmann
2023-05-16 19:56 ` [PATCH 00/16] ARM: address -Wmissing-prototype warnings Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230517102910.753251be84c5156476d7c105@kernel.org \
--to=mhiramat@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=keescook@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=oleg@redhat.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).