lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201510261411.AMbxkedL%fengguang.wu@intel.com>
Date:	Mon, 26 Oct 2015 14:50:05 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	kbuild-all@...org, acme@...nel.org, ast@...nel.org,
	linux-kernel@...r.kernel.org, pi3orama@....com, lizefan@...wei.com,
	Wang Nan <wangnan0@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [net-next PATCH] bpf: Output error message to logbuf when loading

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

Download attachment ".config.gz" of type "application/octet-stream" (25729 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ