Netdev List
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
	Ben Hutchings <ben@decadent.org.uk>
Subject: Re: [PATCH] ethtool: do not vzalloc(0) on registers dump
Date: Thu, 2 Feb 2017 20:00:55 +0800	[thread overview]
Message-ID: <201702021919.a1Qg5odD%fengguang.wu@intel.com> (raw)
In-Reply-To: <1486035113-2305-1-git-send-email-sgruszka@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3384 bytes --]

Hi Stanislaw,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.10-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Stanislaw-Gruszka/ethtool-do-not-vzalloc-0-on-registers-dump/20170202-194352
config: i386-randconfig-x001-201705 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from include/linux/uaccess.h:5:0,
                    from include/net/checksum.h:25,
                    from include/linux/skbuff.h:31,
                    from include/linux/if_ether.h:23,
                    from include/uapi/linux/ethtool.h:18,
                    from include/linux/ethtool.h:17,
                    from net/core/ethtool.c:18:
   net/core/ethtool.c: In function 'dev_ethtool':
>> arch/x86/include/asm/uaccess.h:722:5: warning: 'regbuf' may be used uninitialized in this function [-Wmaybe-uninitialized]
      n = _copy_to_user(to, from, n);
      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/ethtool.c:1395:8: note: 'regbuf' was declared here
     void *regbuf;
           ^~~~~~

vim +/regbuf +722 arch/x86/include/asm/uaccess.h

0d025d27 Josh Poimboeuf  2016-08-30  706  		__bad_copy_user();
3df7b41a Jan Beulich     2013-10-21  707  
3df7b41a Jan Beulich     2013-10-21  708  	return n;
3df7b41a Jan Beulich     2013-10-21  709  }
3df7b41a Jan Beulich     2013-10-21  710  
e6971009 Kees Cook       2016-09-06  711  static __always_inline unsigned long __must_check
7a3d9b0f Jan Beulich     2013-10-21  712  copy_to_user(void __user *to, const void *from, unsigned long n)
7a3d9b0f Jan Beulich     2013-10-21  713  {
7a3d9b0f Jan Beulich     2013-10-21  714  	int sz = __compiletime_object_size(from);
7a3d9b0f Jan Beulich     2013-10-21  715  
1771c6e1 Andrey Ryabinin 2016-05-20  716  	kasan_check_read(from, n);
1771c6e1 Andrey Ryabinin 2016-05-20  717  
7a3d9b0f Jan Beulich     2013-10-21  718  	might_fault();
7a3d9b0f Jan Beulich     2013-10-21  719  
5b710f34 Kees Cook       2016-06-23  720  	if (likely(sz < 0 || sz >= n)) {
5b710f34 Kees Cook       2016-06-23  721  		check_object_size(from, n, true);
7a3d9b0f Jan Beulich     2013-10-21 @722  		n = _copy_to_user(to, from, n);
0d025d27 Josh Poimboeuf  2016-08-30  723  	} else if (!__builtin_constant_p(n))
0d025d27 Josh Poimboeuf  2016-08-30  724  		copy_user_overflow(sz, n);
7a3d9b0f Jan Beulich     2013-10-21  725  	else
0d025d27 Josh Poimboeuf  2016-08-30  726  		__bad_copy_user();
7a3d9b0f Jan Beulich     2013-10-21  727  
7a3d9b0f Jan Beulich     2013-10-21  728  	return n;
7a3d9b0f Jan Beulich     2013-10-21  729  }
7a3d9b0f Jan Beulich     2013-10-21  730  

:::::: The code at line 722 was first introduced by commit
:::::: 7a3d9b0f3abbea957b829cdfff8169872c575642 x86: Unify copy_to_user() and add size checking to it

:::::: TO: Jan Beulich <JBeulich@suse.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
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: 30831 bytes --]

  reply	other threads:[~2017-02-02 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 11:31 [PATCH] ethtool: do not vzalloc(0) on registers dump Stanislaw Gruszka
2017-02-02 12:00 ` kbuild test robot [this message]
2017-02-02 12:22 ` kbuild test robot

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=201702021919.a1Qg5odD%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=ben@decadent.org.uk \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    /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