public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: kbuild-all@lists.01.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, trond.myklebust@hammerspace.com,
	Anna Schumaker <anna.schumaker@netapp.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Joe Perches <joe@perches.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v3 3/4] kernel.h: Split out might_sleep() and friends
Date: Sun, 9 Feb 2020 05:28:36 +0800	[thread overview]
Message-ID: <202002090559.lGld6b4m%lkp@intel.com> (raw)
In-Reply-To: <20200206163940.1940-3-andriy.shevchenko@linux.intel.com>

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

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20200207]
[cannot apply to nfs/linux-next rcu/dev cryptodev/master crypto/master dennis-percpu/for-next tip/sched/core linux/master v5.5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/kernel-h-Split-out-min-max-et-al-helpers/20200209-041358
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f757165705e92db62f85a1ad287e9251d1f2cd82
config: alpha-randconfig-a001-20200209 (attached as .config)
compiler: alpha-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=alpha 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/current.h:5:0,
                    from ./arch/alpha/include/generated/asm/current.h:1,
                    from include/linux/might_sleep.h:6,
                    from include/linux/kernel.h:14,
                    from include/asm-generic/bug.h:19,
                    from arch/alpha/include/asm/bug.h:23,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
   include/linux/thread_info.h: In function 'copy_overflow':
>> include/linux/thread_info.h:134:2: error: implicit declaration of function 'WARN' [-Werror=implicit-function-declaration]
     WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
     ^~~~
   include/linux/thread_info.h: In function 'check_copy_size':
>> include/linux/thread_info.h:150:6: error: implicit declaration of function 'WARN_ON_ONCE'; did you mean 'WRITE_ONCE'? [-Werror=implicit-function-declaration]
     if (WARN_ON_ONCE(bytes > INT_MAX))
         ^~~~~~~~~~~~
         WRITE_ONCE
   cc1: some warnings being treated as errors
   make[2]: *** [kernel/bounds.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2
   10 real  3 user  4 sys  83.61% cpu 	make prepare

vim +/WARN +134 include/linux/thread_info.h

b0377fedb652808 Al Viro   2017-06-29  131  
b0377fedb652808 Al Viro   2017-06-29  132  static inline void copy_overflow(int size, unsigned long count)
b0377fedb652808 Al Viro   2017-06-29  133  {
b0377fedb652808 Al Viro   2017-06-29 @134  	WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
b0377fedb652808 Al Viro   2017-06-29  135  }
b0377fedb652808 Al Viro   2017-06-29  136  
9dd819a15162f8f Kees Cook 2019-09-25  137  static __always_inline __must_check bool
b0377fedb652808 Al Viro   2017-06-29  138  check_copy_size(const void *addr, size_t bytes, bool is_source)
b0377fedb652808 Al Viro   2017-06-29  139  {
b0377fedb652808 Al Viro   2017-06-29  140  	int sz = __compiletime_object_size(addr);
b0377fedb652808 Al Viro   2017-06-29  141  	if (unlikely(sz >= 0 && sz < bytes)) {
b0377fedb652808 Al Viro   2017-06-29  142  		if (!__builtin_constant_p(bytes))
b0377fedb652808 Al Viro   2017-06-29  143  			copy_overflow(sz, bytes);
b0377fedb652808 Al Viro   2017-06-29  144  		else if (is_source)
b0377fedb652808 Al Viro   2017-06-29  145  			__bad_copy_from();
b0377fedb652808 Al Viro   2017-06-29  146  		else
b0377fedb652808 Al Viro   2017-06-29  147  			__bad_copy_to();
b0377fedb652808 Al Viro   2017-06-29  148  		return false;
b0377fedb652808 Al Viro   2017-06-29  149  	}
6d13de1489b6bf5 Kees Cook 2019-12-04 @150  	if (WARN_ON_ONCE(bytes > INT_MAX))
6d13de1489b6bf5 Kees Cook 2019-12-04  151  		return false;
b0377fedb652808 Al Viro   2017-06-29  152  	check_object_size(addr, bytes, is_source);
b0377fedb652808 Al Viro   2017-06-29  153  	return true;
b0377fedb652808 Al Viro   2017-06-29  154  }
b0377fedb652808 Al Viro   2017-06-29  155  

:::::: The code at line 134 was first introduced by commit
:::::: b0377fedb6528087ed319b0d054d6ed82240372c copy_{to,from}_user(): consolidate object size checks

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

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30517 bytes --]

  reply	other threads:[~2020-02-08 21:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 16:39 [PATCH v3 1/4] kernel.h: Split out min()/max() et al helpers Andy Shevchenko
2020-02-06 16:39 ` [PATCH v3 2/4] kernel.h: Split out mathematical helpers Andy Shevchenko
2020-02-06 16:39 ` [PATCH v3 3/4] kernel.h: Split out might_sleep() and friends Andy Shevchenko
2020-02-08 21:28   ` kbuild test robot [this message]
2020-02-08 21:47   ` kbuild test robot
2020-02-09 20:50   ` kbuild test robot
2020-02-06 16:39 ` [PATCH v3 4/4] kernel.h: Move lower_32_bits()/upper_32_bits() to bitops.h Andy Shevchenko
2020-02-06 17:34   ` Joe Perches

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=202002090559.lGld6b4m%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=anna.schumaker@netapp.com \
    --cc=arnd@arndb.de \
    --cc=joe@perches.com \
    --cc=josh@joshtriplett.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=paulmck@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=trond.myklebust@hammerspace.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