lkml.org 
[lkml]   [2021]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jolsa-perf:kprobe/multi 7/13] samples/kprobes/kprobe_example.c:124:6: error: no member named 'multi' in 'struct kprobe'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head: 774280c9bc95e4e50cda3cd09324bd03fec50b52
commit: 2bf53e58ccdc41fb37bc2768bfa17ed9f822bf1e [7/13] samples/kprobes: Add support for multi kprobe interface
config: i386-randconfig-a016-20211228 (https://download.01.org/0day-ci/archive/20211229/202112291138.cVJHohUf-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7171af744543433ac75b232eb7dfdaef7efd4d7a)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=2bf53e58ccdc41fb37bc2768bfa17ed9f822bf1e
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 2bf53e58ccdc41fb37bc2768bfa17ed9f822bf1e
# 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=i386 SHELL=/bin/bash samples/kprobes/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> samples/kprobes/kprobe_example.c:124:6: error: no member named 'multi' in 'struct kprobe'
kp.multi.symbols = (const char **) symbols;
~~ ^
samples/kprobes/kprobe_example.c:125:6: error: no member named 'multi' in 'struct kprobe'
kp.multi.cnt = cnt;
~~ ^
2 errors generated.


vim +124 samples/kprobes/kprobe_example.c

98
99 static int __init kprobe_init(void)
100 {
101 char *p, *tmp, **symbols = NULL;
102 int cnt, ret;
103
104 kp.pre_handler = handler_pre;
105 kp.post_handler = handler_post;
106
107 if (strchr(symbol, ',')) {
108 tmp = kstrdup(symbol, GFP_KERNEL);
109 if (!tmp)
110 return -ENOMEM;
111
112 p = strchr(tmp, ',');
113 while (p) {
114 *p = ' ';
115 p = strchr(p + 1, ',');
116 }
117
118 symbols = argv_split(GFP_KERNEL, tmp, &cnt);
119 if (!symbols) {
120 ret = -ENOMEM;
121 goto out;
122 }
123
> 124 kp.multi.symbols = (const char **) symbols;
125 kp.multi.cnt = cnt;
126 }
127
128 ret = register_kprobe(&kp);
129 if (ret < 0) {
130 pr_err("register_kprobe failed, returned %d\n", ret);
131 goto out;
132 }
133
134 if (symbols)
135 pr_info("Planted multi kprobe to %s\n", symbol);
136 else
137 pr_info("Planted kprobe at %p\n", kp.addr);
138
139 out:
140 kfree(tmp);
141 if (symbols)
142 argv_free(symbols);
143 return ret;
144 }
145

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2021-12-29 04:43    [W:0.025 / U:4.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site