From: kbuild test robot <fengguang.wu@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@01.org, linux-fsdevel@vger.kernel.org
Subject: [vfs:misc.compat 18/20] net/compat.c:324:27: error: incompatible type for argument 2 of 'copy_to_user'
Date: Thu, 29 Jun 2017 02:54:55 +0800 [thread overview]
Message-ID: <201706290252.oS6ik4Ru%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
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 #2: .config.gz --]
[-- Type: application/gzip, Size: 28605 bytes --]
reply other threads:[~2017-06-28 18:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201706290252.oS6ik4Ru%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).