[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112280215.yJhYdrvd-lkp@intel.com>
Date: Tue, 28 Dec 2021 02:18:38 +0800
From: kernel test robot <lkp@...el.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [jolsa-perf:kprobe/multi 4/13] include/linux/kprobes.h:76:21: error:
field has incomplete type 'struct ftrace_ops'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head: bc59262730d5cfc95d6cae84f247d2e8690a309b
commit: 9ea9f7bc2b16659a9932cc80aed62216856c111e [4/13] kprobe: Add support to register multiple ftrace kprobes
config: arm64-randconfig-r033-20211227 (https://download.01.org/0day-ci/archive/20211228/202112280215.yJhYdrvd-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 511726c64d3b6cca66f7c54d457d586aa3129f67)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=9ea9f7bc2b16659a9932cc80aed62216856c111e
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 9ea9f7bc2b16659a9932cc80aed62216856c111e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 prepare
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 arch/arm64/kernel/asm-offsets.c:15:
In file included from include/linux/kvm_host.h:39:
In file included from arch/arm64/include/asm/kvm_host.h:21:
In file included from arch/arm64/include/asm/arch_gicv3.h:17:
In file included from arch/arm64/include/asm/cacheflush.h:11:
In file included from include/linux/kgdb.h:19:
>> include/linux/kprobes.h:76:21: error: field has incomplete type 'struct ftrace_ops'
struct ftrace_ops ops;
^
include/linux/ftrace.h:332:8: note: forward declaration of 'struct ftrace_ops'
struct ftrace_ops;
^
1 error generated.
make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1197: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +76 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 /* location of the multi probe points */
72 struct {
73 const char **symbols;
74 kprobe_opcode_t **addrs;
75 unsigned int cnt;
> 76 struct ftrace_ops ops;
77 } multi;
78
79 /* Allow user to indicate symbol name of the probe point */
80 const char *symbol_name;
81
82 /* Offset into the symbol */
83 unsigned int offset;
84
85 /* traced function address */
86 unsigned long func_addr;
87
88 /* Called before addr is executed. */
89 kprobe_pre_handler_t pre_handler;
90
91 /* Called after addr is executed, unless... */
92 kprobe_post_handler_t post_handler;
93
94 /* Saved opcode (which has been replaced with breakpoint) */
95 kprobe_opcode_t opcode;
96
97 /* copy of the original instruction */
98 struct arch_specific_insn ainsn;
99
100 /*
101 * Indicates various status flags.
102 * Protected by kprobe_mutex after this kprobe is registered.
103 */
104 u32 flags;
105 };
106
---
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