tree:
git://git.infradead.org/users/hch/misc.git sockopt-cleanups
head: 0264f2fcbf6787d9084710c3f5adb536affc2022
commit: d8999fc632dd22b6da1bab932bd84b4d74bc1951 [4/6] net: simplify cBPF setsockopt
compat handling
config: openrisc-randconfig-r035-20200715 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.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
git checkout d8999fc632dd22b6da1bab932bd84b4d74bc1951
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/core/sock.c: In function 'copy_bpf_fprog_from_user':
> net/core/sock.c:825:28: error: storage size of 'f32'
isn't known
825 | struct compat_sock_fprog f32;
| ^~~
> net/core/sock.c:827:21: error: invalid application of
'sizeof' to incomplete type 'struct compat_sock_fprog'
827 |
if (len != sizeof(struct compat_sock_fprog))
| ^~~~~~
net/core/sock.c:829:40: error: invalid application of 'sizeof' to incomplete
type 'struct compat_sock_fprog'
829 | if (copy_from_user(&f32, src, sizeof(struct compat_sock_fprog)))
| ^~~~~~
net/core/sock.c:825:28: warning: unused variable 'f32' [-Wunused-variable]
825 | struct compat_sock_fprog f32;
| ^~~
vim +825 net/core/sock.c
821
822 int copy_bpf_fprog_from_user(struct sock_fprog *dst, void __user *src, int len)
823 {
824 if (in_compat_syscall()) {
825 struct compat_sock_fprog f32;
826
827 if (len != sizeof(struct compat_sock_fprog))
828 return -EINVAL;
829 if (copy_from_user(&f32, src, sizeof(struct compat_sock_fprog)))
830 return -EFAULT;
831 memset(dst, 0, sizeof(*dst));
832 dst->len = f32.len;
833 dst->filter = compat_ptr(f32.filter);
834 } else {
835 if (len != sizeof(struct sock_fprog))
836 return -EINVAL;
837 if (copy_from_user(dst, src, sizeof(struct sock_fprog)))
838 return -EFAULT;
839 }
840
841 return 0;
842 }
843 EXPORT_SYMBOL_GPL(copy_bpf_fprog_from_user);
844
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org