Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255703

Re: [net-next PATCH] bpf: Output error message to logbuf when loading

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject Re: [net-next PATCH] bpf: Output error message to logbuf when loading
Date 2015-10-26 08:00 +0100
Message-ID <qnJV7-4WM-5@gated-at.bofh.it> (permalink)
References <qnJBM-4Q3-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Wang,

[auto build test WARNING on net-next/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Wang-Nan/bpf-Output-error-message-to-logbuf-when-loading/20151026-143920
config: x86_64-randconfig-x019-201543 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   kernel/bpf/syscall.c: In function 'bpf_prog_load_note':
>> kernel/bpf/syscall.c:600:2: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result [-Wunused-result]
     copy_to_user(log_ubuf, log_buf, log_size);
     ^

vim +/copy_to_user +600 kernel/bpf/syscall.c

   584		va_list args;
   585	
   586		log_ubuf = (char __user *) (unsigned long) attr->log_buf;
   587		log_level = attr->log_level;
   588		log_size = sizeof(log_buf);
   589		if (attr->log_size < log_size)
   590			log_size = attr->log_size;
   591	
   592		if (log_level == 0 || !log_size || !log_ubuf)
   593			return;
   594	
   595		va_start(args, fmt);
   596		log_len = vscnprintf(log_buf, log_size, fmt, args);
   597		va_end(args);
   598	
   599		/* Don't need to care the copying result too much */
 > 600		copy_to_user(log_ubuf, log_buf, log_size);
   601	}
   602	
   603	/* last field in 'union bpf_attr' used by this command */
   604	#define	BPF_PROG_LOAD_LAST_FIELD kern_version
   605	
   606	static int bpf_prog_load(union bpf_attr *attr)
   607	{
   608		enum bpf_prog_type type = attr->prog_type;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[net-next PATCH] bpf: Output error message to logbuf when loading Wang Nan <wangnan0@huawei.com> - 2015-10-26 07:40 +0100
  Re: [net-next PATCH] bpf: Output error message to logbuf when loading "Wangnan (F)" <wangnan0@huawei.com> - 2015-10-26 07:50 +0100
  Re: [net-next PATCH] bpf: Output error message to logbuf when loading kbuild test robot <lkp@intel.com> - 2015-10-26 08:00 +0100
  [net-next PATCHv2] bpf: Output error message to logbuf when loading failure Wang Nan <wangnan0@huawei.com> - 2015-10-26 08:20 +0100
    Re: [net-next PATCHv2] bpf: Output error message to logbuf when  loading failure Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-10-27 04:30 +0100
      Re: [net-next PATCHv2] bpf: Output error message to logbuf when loading  failure "Wangnan (F)" <wangnan0@huawei.com> - 2015-10-27 04:50 +0100

csiph-web