Hi Yonghong, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Yonghong-Song/bpf-Add-bpf_rcu_read_lock-support/20221108-155529 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20221108074104.263145-1-yhs%40fb.com patch subject: [PATCH bpf-next v2 3/8] bpf: Abstract out functions to check sleepable helpers config: arm-neponset_defconfig compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/97528bc3a813d7e2b950063b7a1912672bcae1e7 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Yonghong-Song/bpf-Add-bpf_rcu_read_lock-support/20221108-155529 git checkout 97528bc3a813d7e2b950063b7a1912672bcae1e7 # 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=arm SHELL=/bin/bash arch/arm/kernel/ fs/ ipc/ kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from fs/statfs.c:2: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: include/linux/trace_events.h:801:51: error: variable has incomplete type 'enum bpf_func_id' bpf_tracing_sleepable_func_proto(enum bpf_func_id func_id) ^ include/linux/trace_events.h:20:6: note: forward declaration of 'enum bpf_func_id' enum bpf_func_id; ^ >> fs/statfs.c:131:3: warning: 'memcpy' will always overflow; destination buffer has size 64, but size argument is 88 [-Wfortify-source] memcpy(&buf, st, sizeof(*st)); ^ fs/statfs.c:172:3: warning: 'memcpy' will always overflow; destination buffer has size 84, but size argument is 88 [-Wfortify-source] memcpy(&buf, st, sizeof(*st)); ^ 2 warnings and 1 error generated. -- In file included from fs/aio.c:20: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: include/linux/trace_events.h:801:51: error: variable has incomplete type 'enum bpf_func_id' bpf_tracing_sleepable_func_proto(enum bpf_func_id func_id) ^ include/linux/trace_events.h:20:6: note: forward declaration of 'enum bpf_func_id' enum bpf_func_id; ^ In file included from fs/aio.c:29: >> include/linux/mman.h:154:9: warning: division by zero is undefined [-Wdivision-by-zero] _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:132:21: note: expanded from macro '_calc_vm_trans' : ((x) & (bit1)) / ((bit1) / (bit2)))) ^ ~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. -- In file included from ipc/msg.c:35: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: include/linux/trace_events.h:801:51: error: variable has incomplete type 'enum bpf_func_id' bpf_tracing_sleepable_func_proto(enum bpf_func_id func_id) ^ include/linux/trace_events.h:20:6: note: forward declaration of 'enum bpf_func_id' enum bpf_func_id; ^ >> ipc/msg.c:497:20: warning: implicit conversion from 'int' to 'unsigned short' changes value from 32768000 to 0 [-Wconstant-conversion] msginfo->msgseg = MSGSEG; ~ ^~~~~~ include/uapi/linux/msg.h:87:38: note: expanded from macro 'MSGSEG' #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) ^~~~~~~~ include/uapi/linux/msg.h:86:36: note: expanded from macro '__MSGSEG' #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ ~~~~~~~~~~~~~~~~~^~~~~~~~ 1 warning and 1 error generated. -- In file included from arch/arm/kernel/sys_arm.c:20: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: include/linux/trace_events.h:801:51: error: variable has incomplete type 'enum bpf_func_id' bpf_tracing_sleepable_func_proto(enum bpf_func_id func_id) ^ include/linux/trace_events.h:20:6: note: forward declaration of 'enum bpf_func_id' enum bpf_func_id; ^ In file included from arch/arm/kernel/sys_arm.c:21: >> include/linux/mman.h:154:9: warning: division by zero is undefined [-Wdivision-by-zero] _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:132:21: note: expanded from macro '_calc_vm_trans' : ((x) & (bit1)) / ((bit1) / (bit2)))) ^ ~~~~~~~~~~~~~~~~~ arch/arm/kernel/sys_arm.c:32:17: warning: no previous prototype for function 'sys_arm_fadvise64_64' [-Wmissing-prototypes] asmlinkage long sys_arm_fadvise64_64(int fd, int advice, ^ arch/arm/kernel/sys_arm.c:32:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage long sys_arm_fadvise64_64(int fd, int advice, ^ static 2 warnings and 1 error generated. vim +/memcpy +131 fs/statfs.c c8b91accfa1059 Al Viro 2011-03-12 125 c8b91accfa1059 Al Viro 2011-03-12 126 static int do_statfs_native(struct kstatfs *st, struct statfs __user *p) c8b91accfa1059 Al Viro 2011-03-12 127 { c8b91accfa1059 Al Viro 2011-03-12 128 struct statfs buf; 7ed1ee6118ae77 Al Viro 2010-03-23 129 c8b91accfa1059 Al Viro 2011-03-12 130 if (sizeof(buf) == sizeof(*st)) c8b91accfa1059 Al Viro 2011-03-12 @131 memcpy(&buf, st, sizeof(*st)); 7ed1ee6118ae77 Al Viro 2010-03-23 132 else { c8b91accfa1059 Al Viro 2011-03-12 133 if (sizeof buf.f_blocks == 4) { c8b91accfa1059 Al Viro 2011-03-12 134 if ((st->f_blocks | st->f_bfree | st->f_bavail | c8b91accfa1059 Al Viro 2011-03-12 135 st->f_bsize | st->f_frsize) & 7ed1ee6118ae77 Al Viro 2010-03-23 136 0xffffffff00000000ULL) 7ed1ee6118ae77 Al Viro 2010-03-23 137 return -EOVERFLOW; 7ed1ee6118ae77 Al Viro 2010-03-23 138 /* 7ed1ee6118ae77 Al Viro 2010-03-23 139 * f_files and f_ffree may be -1; it's okay to stuff 7ed1ee6118ae77 Al Viro 2010-03-23 140 * that into 32 bits 7ed1ee6118ae77 Al Viro 2010-03-23 141 */ c8b91accfa1059 Al Viro 2011-03-12 142 if (st->f_files != -1 && c8b91accfa1059 Al Viro 2011-03-12 143 (st->f_files & 0xffffffff00000000ULL)) 7ed1ee6118ae77 Al Viro 2010-03-23 144 return -EOVERFLOW; c8b91accfa1059 Al Viro 2011-03-12 145 if (st->f_ffree != -1 && c8b91accfa1059 Al Viro 2011-03-12 146 (st->f_ffree & 0xffffffff00000000ULL)) 7ed1ee6118ae77 Al Viro 2010-03-23 147 return -EOVERFLOW; 7ed1ee6118ae77 Al Viro 2010-03-23 148 } 7ed1ee6118ae77 Al Viro 2010-03-23 149 c8b91accfa1059 Al Viro 2011-03-12 150 buf.f_type = st->f_type; c8b91accfa1059 Al Viro 2011-03-12 151 buf.f_bsize = st->f_bsize; c8b91accfa1059 Al Viro 2011-03-12 152 buf.f_blocks = st->f_blocks; c8b91accfa1059 Al Viro 2011-03-12 153 buf.f_bfree = st->f_bfree; c8b91accfa1059 Al Viro 2011-03-12 154 buf.f_bavail = st->f_bavail; c8b91accfa1059 Al Viro 2011-03-12 155 buf.f_files = st->f_files; c8b91accfa1059 Al Viro 2011-03-12 156 buf.f_ffree = st->f_ffree; c8b91accfa1059 Al Viro 2011-03-12 157 buf.f_fsid = st->f_fsid; c8b91accfa1059 Al Viro 2011-03-12 158 buf.f_namelen = st->f_namelen; c8b91accfa1059 Al Viro 2011-03-12 159 buf.f_frsize = st->f_frsize; c8b91accfa1059 Al Viro 2011-03-12 160 buf.f_flags = st->f_flags; c8b91accfa1059 Al Viro 2011-03-12 161 memset(buf.f_spare, 0, sizeof(buf.f_spare)); c8b91accfa1059 Al Viro 2011-03-12 162 } c8b91accfa1059 Al Viro 2011-03-12 163 if (copy_to_user(p, &buf, sizeof(buf))) c8b91accfa1059 Al Viro 2011-03-12 164 return -EFAULT; 7ed1ee6118ae77 Al Viro 2010-03-23 165 return 0; 7ed1ee6118ae77 Al Viro 2010-03-23 166 } 7ed1ee6118ae77 Al Viro 2010-03-23 167 -- 0-DAY CI Kernel Test Service https://01.org/lkp