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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202002090559.lGld6b4m%lkp@intel.com>
Date:   Sun, 9 Feb 2020 05:28:36 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, trond.myklebust@...merspace.com,
        Anna Schumaker <anna.schumaker@...app.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Arnd Bergmann <arnd@...db.de>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Joe Perches <joe@...ches.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v3 3/4] kernel.h: Split out might_sleep() and friends

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@...el.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@...iv.linux.org.uk>
:::::: CC: Al Viro <viro@...iv.linux.org.uk>

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

Download attachment ".config.gz" of type "application/gzip" (30517 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ