[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201041521.a4yJyq96-lkp@intel.com>
Date: Tue, 4 Jan 2022 15:20:55 +0800
From: kernel test robot <lkp@...el.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jolsa-perf:kprobe/multi 4/14] include/linux/kprobes.h:77:21: error:
field 'ops' has incomplete type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head: 27d253a29de023f664387fcc049edeeaadf23c8e
commit: fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d [4/14] kprobe: Add support to register multiple ftrace kprobes
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220104/202201041521.a4yJyq96-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf kprobe/multi
git checkout fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from lib/nmi_backtrace.c:18:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
--
In file included from arch/x86/kernel/kprobes/core.c:29:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
arch/x86/kernel/kprobes/core.c:1081:23: warning: no previous prototype for 'trampoline_handler' [-Wmissing-prototypes]
1081 | __used __visible void trampoline_handler(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/kgdb.h:19,
from include/linux/fb.h:6,
from include/linux/backlight.h:13,
from drivers/acpi/acpi_video.c:19:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
drivers/acpi/acpi_video.c:2259:6: warning: no previous prototype for 'acpi_video_unregister_backlight' [-Wmissing-prototypes]
2259 | void acpi_video_unregister_backlight(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/kgdb.h:19,
from include/linux/fb.h:6,
from include/linux/backlight.h:13,
from drivers/acpi/video_detect.c:30:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
drivers/acpi/video_detect.c:532:13: warning: no previous prototype for 'acpi_video_detect_exit' [-Wmissing-prototypes]
532 | void __exit acpi_video_detect_exit(void)
| ^~~~~~~~~~~~~~~~~~~~~~
--
In file included from init/main.c:36:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
init/main.c:780:20: warning: no previous prototype for 'mem_encrypt_init' [-Wmissing-prototypes]
780 | void __init __weak mem_encrypt_init(void) { }
| ^~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/entry/common.c:29:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
arch/x86/entry/common.c:119:24: warning: no previous prototype for 'do_int80_syscall_32' [-Wmissing-prototypes]
119 | __visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:186:24: warning: no previous prototype for 'do_fast_syscall_32' [-Wmissing-prototypes]
186 | __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:238:24: warning: no previous prototype for 'do_SYSENTER_32' [-Wmissing-prototypes]
238 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/kernel/doublefault_32.c:11:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
arch/x86/kernel/doublefault_32.c:23:36: warning: no previous prototype for 'doublefault_shim' [-Wmissing-prototypes]
23 | asmlinkage noinstr void __noreturn doublefault_shim(void)
| ^~~~~~~~~~~~~~~~
arch/x86/kernel/doublefault_32.c:114:6: warning: no previous prototype for 'doublefault_init_cpu_tss' [-Wmissing-prototypes]
114 | void doublefault_init_cpu_tss(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from kernel/kallsyms.c:27:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
kernel/kallsyms.c:586:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
586 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
| ^~~~~~~~~~~~~~~~
--
In file included from kernel/kprobes.c:23:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
kernel/kprobes.c: In function 'check_addr':
>> kernel/kprobes.c:1721:10: error: implicit declaration of function 'check_ftrace_multi'; did you mean 'check_ftrace_location'? [-Werror=implicit-function-declaration]
1721 | return check_ftrace_multi(p);
| ^~~~~~~~~~~~~~~~~~
| check_ftrace_location
kernel/kprobes.c: In function '__unregister_kprobe_top':
>> kernel/kprobes.c:1916:3: error: implicit declaration of function 'free_ftrace_multi'; did you mean 'kprobe_ftrace_multi'? [-Werror=implicit-function-declaration]
1916 | free_ftrace_multi(ap);
| ^~~~~~~~~~~~~~~~~
| kprobe_ftrace_multi
cc1: some warnings being treated as errors
--
In file included from include/linux/kgdb.h:19,
from kernel/panic.c:15:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
kernel/panic.c: In function '__warn':
kernel/panic.c:588:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
588 | vprintk(args->fmt, args->args);
| ^~~~~~~
kernel/panic.c: At top level:
kernel/panic.c:682:24: warning: no previous prototype for '__stack_chk_fail' [-Wmissing-prototypes]
682 | __visible noinstr void __stack_chk_fail(void)
| ^~~~~~~~~~~~~~~~
--
In file included from kernel/exit.c:66:
>> include/linux/kprobes.h:77:21: error: field 'ops' has incomplete type
77 | struct ftrace_ops ops;
| ^~~
kernel/exit.c:1817:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes]
1817 | __weak void abort(void)
| ^~~~~
..
vim +/ops +77 include/linux/kprobes.h
48
49 struct kprobe;
50 struct pt_regs;
51 struct kretprobe;
52 struct kretprobe_instance;
53 typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *);
54 typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *,
55 unsigned long flags);
56 typedef int (*kretprobe_handler_t) (struct kretprobe_instance *,
57 struct pt_regs *);
58
59 struct kprobe {
60 struct hlist_node hlist;
61
62 /* list of kprobes for multi-handler support */
63 struct list_head list;
64
65 /*count the number of times this probe was temporarily disarmed */
66 unsigned long nmissed;
67
68 /* location of the probe point */
69 kprobe_opcode_t *addr;
70
71 #ifdef CONFIG_HAVE_KPROBES_MULTI_ON_FTRACE
72 /* location of the multi probe points */
73 struct {
74 const char **symbols;
75 kprobe_opcode_t **addrs;
76 unsigned int cnt;
> 77 struct ftrace_ops ops;
78 } multi;
79 #endif
80
81 /* Allow user to indicate symbol name of the probe point */
82 const char *symbol_name;
83
84 /* Offset into the symbol */
85 unsigned int offset;
86
87 /* traced function address */
88 unsigned long func_addr;
89
90 /* Called before addr is executed. */
91 kprobe_pre_handler_t pre_handler;
92
93 /* Called after addr is executed, unless... */
94 kprobe_post_handler_t post_handler;
95
96 /* Saved opcode (which has been replaced with breakpoint) */
97 kprobe_opcode_t opcode;
98
99 /* copy of the original instruction */
100 struct arch_specific_insn ainsn;
101
102 /*
103 * Indicates various status flags.
104 * Protected by kprobe_mutex after this kprobe is registered.
105 */
106 u32 flags;
107 };
108
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists