tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git misc.compat head: bc73ff4b6ab8549dcb1a6b253b4afeae3e2f8b32 commit: e89802c72a15385e22af7acd747fc1204dbf2827 [18/20] get_compat_bpf_fprog(): don't copyin field-by-field config: x86_64-randconfig-x006-201726 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout e89802c72a15385e22af7acd747fc1204dbf2827 # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/compat.c: In function 'get_compat_bpf_fprog': >> net/compat.c:324:27: error: incompatible type for argument 2 of 'copy_to_user' if (copy_to_user(kfprog, f, sizeof(struct sock_fprog))) ^ In file included from include/net/checksum.h:25:0, from include/linux/skbuff.h:31, from include/linux/icmpv6.h:4, from net/compat.c:19: include/linux/uaccess.h:164:1: note: expected 'const void *' but argument is of type 'struct sock_fprog' copy_to_user(void __user *to, const void *from, unsigned long n) ^~~~~~~~~~~~ vim +/copy_to_user +324 net/compat.c 318 319 if (copy_from_user(&f32, fprog32, sizeof(*fprog32))) 320 return NULL; 321 memset(&f, 0, sizeof(f)); 322 f.len = f32.len; 323 f.filter = compat_ptr(f32.filter); > 324 if (copy_to_user(kfprog, f, sizeof(struct sock_fprog))) 325 return NULL; 326 327 return kfprog; --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip