Commit 1b9c3ddc authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Russell King (Oracle)

ARM: 9303/1: kprobes: avoid missing-declaration warnings

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: 6624cf65 ("ARM: kprobes: collects stack consumption for store instructions")
Fixes: 454f3e13 ("ARM/kprobes: Remove jprobe arm implementation")
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent 4b026ca3
...@@ -40,7 +40,7 @@ enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn, ...@@ -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 * Different from other insn uses imm8, the real addressing offset of
* STRD in T32 encoding should be imm8 * 4. See ARMARM description. * 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, struct arch_probes_insn *asi,
const struct decode_header *h) const struct decode_header *h)
{ {
......
...@@ -233,7 +233,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) ...@@ -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 * kprobe, and that level is reserved for user kprobe handlers, so we can't
* risk encountering a new kprobe in an interrupt handler. * 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 *p, *cur;
struct kprobe_ctlblk *kcb; struct kprobe_ctlblk *kcb;
......
...@@ -145,8 +145,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty) ...@@ -145,8 +145,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
} }
} }
extern void kprobe_handler(struct pt_regs *regs);
static void static void
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs) optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
{ {
......
...@@ -720,7 +720,7 @@ static const char coverage_register_lookup[16] = { ...@@ -720,7 +720,7 @@ static const char coverage_register_lookup[16] = {
[REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP, [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; unsigned regs = 0;
int i; int i;
......
...@@ -454,3 +454,7 @@ void kprobe_thumb32_test_cases(void); ...@@ -454,3 +454,7 @@ void kprobe_thumb32_test_cases(void);
#else #else
void kprobe_arm_test_cases(void); void kprobe_arm_test_cases(void);
#endif #endif
void __kprobes_test_case_start(void);
void __kprobes_test_case_end_16(void);
void __kprobes_test_case_end_32(void);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment