tree: https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/6.0 head: bd551cbc62ced5f513fb2ca4ad2df2d65fef04a9 commit: ef6f162ebca61cc906cdae48458fa53e52e253b3 [235/265] bpf: Convert BPF_DISPATCHER to use static_call() (not ftrace) config: i386-randconfig-a013-20221128 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) 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://github.com/ammarfaizi2/linux-block/commit/ef6f162ebca61cc906cdae48458fa53e52e253b3 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/6.0 git checkout ef6f162ebca61cc906cdae48458fa53e52e253b3 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> kernel/bpf/dispatcher.c:126:33: warning: pointer type mismatch ('void *' and 'unsigned int (*)(const void *, const struct bpf_insn *, bpf_func_t)' (aka 'unsigned int (*)(const void *, const struct bpf_insn *, unsigned int (*)(const void *, const struct bpf_insn *))')) [-Wpointer-type-mismatch] __BPF_DISPATCHER_UPDATE(d, new ?: &bpf_dispatcher_nop_func); ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:938:54: note: expanded from macro '__BPF_DISPATCHER_UPDATE' __static_call_update((_d)->sc_key, (_d)->sc_tramp, (_new)) ^~~~ 1 warning generated. vim +126 kernel/bpf/dispatcher.c 105 106 static void bpf_dispatcher_update(struct bpf_dispatcher *d, int prev_num_progs) 107 { 108 void *new, *tmp; 109 u32 noff = 0; 110 111 if (prev_num_progs) 112 noff = d->image_off ^ (PAGE_SIZE / 2); 113 114 new = d->num_progs ? d->image + noff : NULL; 115 tmp = d->num_progs ? d->rw_image + noff : NULL; 116 if (new) { 117 /* Prepare the dispatcher in d->rw_image. Then use 118 * bpf_arch_text_copy to update d->image, which is RO+X. 119 */ 120 if (bpf_dispatcher_prepare(d, new, tmp)) 121 return; 122 if (IS_ERR(bpf_arch_text_copy(new, tmp, PAGE_SIZE / 2))) 123 return; 124 } 125 > 126 __BPF_DISPATCHER_UPDATE(d, new ?: &bpf_dispatcher_nop_func); 127 128 if (new) 129 d->image_off = noff; 130 } 131 -- 0-DAY CI Kernel Test Service https://01.org/lkp