tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tracing_multi_ng_7 head: c35e21f7c5e98d9c2a5056305f17127e05b6c209 commit: c35e21f7c5e98d9c2a5056305f17127e05b6c209 [30/30] fix config: powerpc-allyesconfig compiler: powerpc-linux-gcc (GCC) 12.1.0 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=c35e21f7c5e98d9c2a5056305f17127e05b6c209 git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git git fetch --no-tags jolsa-perf bpf/tracing_multi_ng_7 git checkout c35e21f7c5e98d9c2a5056305f17127e05b6c209 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/bpf/trampoline.c: In function 'trampoline_multi_update': kernel/bpf/trampoline.c:1260:15: error: implicit declaration of function 'set_ftrace_direct'; did you mean 'modify_ftrace_direct'? [-Werror=implicit-function-declaration] 1260 | err = set_ftrace_direct(hash); | ^~~~~~~~~~~~~~~~~ | modify_ftrace_direct kernel/bpf/trampoline.c: In function 'bpf_trampoline_multi_attach': >> kernel/bpf/trampoline.c:1281:14: error: 'i' undeclared (first use in this function) 1281 | for (i = 0; i < TRAMPOLINE_TABLE_SIZE; i++) { | ^ kernel/bpf/trampoline.c:1281:14: note: each undeclared identifier is reported only once for each function it appears in In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/timer.h:5, from include/linux/workqueue.h:9, from include/linux/bpf.h:10, from kernel/bpf/trampoline.c:4: include/linux/container_of.h:19:35: error: invalid type argument of unary '*' (have 'int') 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:19:23: note: in expansion of macro '__same_type' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/list.h:1018:40: note: in expansion of macro 'container_of' 1018 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) | ^~~~~~~~~~~~ include/linux/list.h:1029:22: note: in expansion of macro 'hlist_entry' 1029 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ | ^~~~~~~~~~~ include/linux/list.h:1039:20: note: in expansion of macro 'hlist_entry_safe' 1039 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ | ^~~~~~~~~~~~~~~~ kernel/bpf/trampoline.c:1282:17: note: in expansion of macro 'hlist_for_each_entry' 1282 | hlist_for_each_entry(tr, &trampoline_table[i], hlist) { | ^~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:20:35: error: invalid type argument of unary '*' (have 'int') 20 | __same_type(*(ptr), void), \ | ^~~~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | __same_type(*(ptr), void), \ | ^~~~~~~~~~~ include/linux/list.h:1018:40: note: in expansion of macro 'container_of' 1018 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) | ^~~~~~~~~~~~ include/linux/list.h:1029:22: note: in expansion of macro 'hlist_entry' 1029 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ | ^~~~~~~~~~~ include/linux/list.h:1039:20: note: in expansion of macro 'hlist_entry_safe' 1039 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ | ^~~~~~~~~~~~~~~~ kernel/bpf/trampoline.c:1282:17: note: in expansion of macro 'hlist_for_each_entry' 1282 | hlist_for_each_entry(tr, &trampoline_table[i], hlist) { | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:299:27: error: expression in static assertion is not an integer 299 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:19:23: note: in expansion of macro '__same_type' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/list.h:1018:40: note: in expansion of macro 'container_of' 1018 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member) | ^~~~~~~~~~~~ include/linux/list.h:1029:22: note: in expansion of macro 'hlist_entry' 1029 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ | ^~~~~~~~~~~ include/linux/list.h:1039:20: note: in expansion of macro 'hlist_entry_safe' 1039 | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ | ^~~~~~~~~~~~~~~~ kernel/bpf/trampoline.c:1282:17: note: in expansion of macro 'hlist_for_each_entry' 1282 | hlist_for_each_entry(tr, &trampoline_table[i], hlist) { | ^~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/i +1281 kernel/bpf/trampoline.c 1265 1266 int bpf_trampoline_multi_attach(struct bpf_tramp_prog *tp, struct btf_bitmap *bmap) 1267 { 1268 struct btf_bitmap *bmap_and, *bmap_new; 1269 struct bpf_trampoline *tr, *n; 1270 int err = -ENOMEM; 1271 LIST_HEAD(trampolines); 1272 LIST_HEAD(upd); 1273 1274 bmap_new = btf_bitmap_funcs_alloc(); 1275 bmap_and = btf_bitmap_funcs_alloc(); 1276 if (!bmap_and || bmap_and) 1277 goto error; 1278 1279 btf_bitmap_copy(bmap_new, bmap); 1280 > 1281 for (i = 0; i < TRAMPOLINE_TABLE_SIZE; i++) { 1282 hlist_for_each_entry(tr, &trampoline_table[i], hlist) { 1283 1284 } 1285 } 1286 1287 list_for_each_entry(tr, &multi_trampolines, multi.list) { 1288 btf_bitmap_and(bmap_and, tr->multi.bmap, bmap_new); 1289 if (btf_bitmap_empty(bmap_and)) 1290 continue; 1291 1292 err = trampoline_multi_split(tr, tp, bmap_and, &upd, &trampolines); 1293 if (err) 1294 goto error_rollback; 1295 1296 btf_bitmap_andnot(bmap_new, bmap_new, bmap_and); 1297 } 1298 1299 if (!btf_bitmap_empty(bmap_new)) { 1300 tr = bpf_trampoline_alloc(); 1301 if (!tr) { 1302 err = -ENOMEM; 1303 goto error_rollback; 1304 } 1305 1306 err = __bpf_trampoline_link_prog(tp, tr, &upd); 1307 if (err) 1308 goto error_rollback; 1309 1310 tr->update.bmap = bmap_new; 1311 bmap_new = NULL; 1312 } 1313 1314 err = trampoline_multi_update(&upd); 1315 if (err) 1316 goto error_rollback; 1317 1318 list_for_each_entry_safe(tr, n, &upd, update.list) { 1319 bpf_trampoline_commit(tr); 1320 list_del_init(&tr->update.list); 1321 } 1322 1323 list_splice(&trampolines, &multi_trampolines); 1324 1325 error_rollback: 1326 if (err) { 1327 list_for_each_entry_safe(tr, n, &upd, update.list) { 1328 bpf_trampoline_rollback(tr); 1329 __bpf_trampoline_put(tr); 1330 } 1331 } 1332 error: 1333 btf_bitmap_free(bmap_new); 1334 btf_bitmap_free(bmap_and); 1335 return err; 1336 } 1337 -- 0-DAY CI Kernel Test Service https://01.org/lkp