lkml.org 
[lkml]   [2021]   [Dec]   [29]   [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:5: error: 'struct kprobe' has no member named 'multi'
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: x86_64-randconfig-c022-20211228 (https://download.01.org/0day-ci/archive/20211229/202112291203.QEXXBIxn-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=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
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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: In function 'kprobe_init':
>> samples/kprobes/kprobe_example.c:124:5: error: 'struct kprobe' has no member named 'multi'
124 | kp.multi.symbols = (const char **) symbols;
| ^
samples/kprobes/kprobe_example.c:125:5: error: 'struct kprobe' has no member named 'multi'
125 | kp.multi.cnt = cnt;
| ^


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 06:06    [W:0.032 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site