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:22:24 +0800	[thread overview]
Message-ID: <201702022032.ou4IF2Az%fengguang.wu@intel.com> (raw)
In-Reply-To: <1486035113-2305-1-git-send-email-sgruszka@redhat.com>

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

Hi Stanislaw,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.10-rc6 next-20170202]
[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: cris-etrax-100lx_v2_defconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=cris 

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 >>):

   net/core/ethtool.c: In function 'ethtool_get_feature_mask':
   net/core/ethtool.c:311:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   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 'ethtool_get_regs':
>> arch/cris/include/asm/uaccess.h:380:10: warning: 'regbuf' may be used uninitialized in this function [-Wmaybe-uninitialized]
      return __copy_user(to, from, n);
             ^~~~~~~~~~~~~~~~~~~~~~~~
   net/core/ethtool.c:1395:8: note: 'regbuf' was declared here
     void *regbuf;
           ^~~~~~

vim +/regbuf +380 arch/cris/include/asm/uaccess.h

eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  364  		memset(to, 0, n);
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  365  		return n;
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  366  	}
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  367  	if (__builtin_constant_p(n))
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  368  		return __constant_copy_from_user(to, from, n);
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  369  	else
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  370  		return __copy_user_zeroing(to, from, n);
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  371  }
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  372  
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  373  static inline size_t copy_to_user(void __user *to, const void *from, size_t n)
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  374  {
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  375  	if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  376  		return n;
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  377  	if (__builtin_constant_p(n))
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  378  		return __constant_copy_to_user(to, from, n);
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  379  	else
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18 @380  		return __copy_user(to, from, n);
eb47e0293 arch/cris/include/asm/uaccess.h Al Viro        2016-08-18  381  }
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  382  
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  383  /* We let the __ versions of copy_from/to_user inline, because they're often
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  384   * used in fast paths and have only a small space overhead.
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  385   */
^1da177e4 include/asm-cris/uaccess.h      Linus Torvalds 2005-04-16  386  
d9b5444ee include/asm-cris/uaccess.h      Adrian Bunk    2005-11-07  387  static inline unsigned long
07f2402b4 include/asm-cris/uaccess.h      Jesper Nilsson 2008-03-04  388  __generic_copy_from_user_nocheck(void *to, const void __user *from,

:::::: The code at line 380 was first introduced by commit
:::::: eb47e0293baaa3044022059f1fa9ff474bfe35cb cris: buggered copy_from_user/copy_to_user/clear_user

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

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

      parent reply	other threads:[~2017-02-02 12:23 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
2017-02-02 12:22 ` kbuild test robot [this message]

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=201702022032.ou4IF2Az%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