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]
Date:   Fri, 28 Aug 2020 12:30:28 +0800
From:   kernel test robot <lkp@...el.com>
To:     Chunguang Xu <brookxu.cn@...il.com>, arnd@...db.de
Cc:     kbuild-all@...ts.01.org, rppt@...nel.org,
        linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/23] cachefiles: use ASSERT_FAIL()/ASSERT_WARN() to
 cleanup some code

Hi Chunguang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next block/for-next linus/master asm-generic/master v5.9-rc2 next-20200827]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chunguang-Xu/clean-up-the-code-related-to-ASSERT/20200827-182148
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/cachefiles/bind.c:8:
   fs/cachefiles/bind.c: In function 'cachefiles_daemon_bind':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/bind.c:39:2: note: in expansion of macro 'ASSERT'
      39 |  ASSERT(cache->fstop_percent >= 0 &&
         |  ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/bind.c:39:2: note: in expansion of macro 'ASSERT'
      39 |  ASSERT(cache->fstop_percent >= 0 &&
         |  ^~~~~~
--
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/cachefiles/daemon.c:8:
   fs/cachefiles/daemon.c: In function 'cachefiles_daemon_release':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/daemon.c:135:2: note: in expansion of macro 'ASSERT'
     135 |  ASSERT(cache);
         |  ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/daemon.c:135:2: note: in expansion of macro 'ASSERT'
     135 |  ASSERT(cache);
         |  ^~~~~~
   fs/cachefiles/daemon.c: In function 'cachefiles_daemon_write':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/daemon.c:223:2: note: in expansion of macro 'ASSERT'
     223 |  ASSERT(cache);
         |  ^~~~~~
--
   In file included from include/asm-generic/bug.h:5,
                    from arch/sh/include/asm/bug.h:112,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from fs/cachefiles/interface.c:8:
   fs/cachefiles/interface.c: In function 'cachefiles_drop_object':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/interface.c:269:2: note: in expansion of macro 'ASSERT'
     269 |  ASSERT(_object);
         |  ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/interface.c:269:2: note: in expansion of macro 'ASSERT'
     269 |  ASSERT(_object);
         |  ^~~~~~
   fs/cachefiles/interface.c: In function 'cachefiles_put_object':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/interface.c:329:2: note: in expansion of macro 'ASSERT'
     329 |  ASSERT(_object);
         |  ^~~~~~
   fs/cachefiles/interface.c: In function 'cachefiles_attr_changed':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/interface.c:455:2: note: in expansion of macro 'ASSERT'
     455 |  ASSERT(d_is_reg(object->backer));
         |  ^~~~~~
   fs/cachefiles/interface.c: In function 'cachefiles_invalidate_object':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/interface.c:518:3: note: in expansion of macro 'ASSERT'
     518 |   ASSERT(d_is_reg(object->backer));
         |   ^~~~~~
--
   In file included from include/asm-generic/bug.h:5,
                    from arch/sh/include/asm/bug.h:112,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from fs/cachefiles/key.c:8:
   fs/cachefiles/key.c: In function 'cachefiles_cook_key':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/key.c:107:4: note: in expansion of macro 'ASSERT'
     107 |    ASSERT(len < max);
         |    ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/key.c:107:4: note: in expansion of macro 'ASSERT'
     107 |    ASSERT(len < max);
         |    ^~~~~~
--
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/cachefiles/namei.c:8:
   fs/cachefiles/namei.c: In function 'cachefiles_mark_object_active':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/namei.c:163:3: note: in expansion of macro 'ASSERT'
     163 |   ASSERT(xobject != object);
         |   ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/namei.c:163:3: note: in expansion of macro 'ASSERT'
     163 |   ASSERT(xobject != object);
         |   ^~~~~~
   fs/cachefiles/namei.c: In function 'cachefiles_delete_object':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/namei.c:443:2: note: in expansion of macro 'ASSERT'
     443 |  ASSERT(object->dentry);
         |  ^~~~~~
   fs/cachefiles/namei.c: In function 'cachefiles_walk_to_object':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/namei.c:503:2: note: in expansion of macro 'ASSERT'
     503 |  ASSERT(parent->dentry);
         |  ^~~~~~
   fs/cachefiles/namei.c: In function 'cachefiles_get_directory':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/namei.c:802:3: note: in expansion of macro 'ASSERT'
     802 |   ASSERT(d_backing_inode(subdir));
         |   ^~~~~~
--
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from fs/cachefiles/xattr.c:8:
   fs/cachefiles/xattr.c: In function 'cachefiles_check_object_type':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/xattr.c:31:2: note: in expansion of macro 'ASSERT'
      31 |  ASSERT(dentry);
         |  ^~~~~~
   fs/cachefiles/internal.h:319:31: note: each undeclared identifier is reported only once for each function it appears in
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/xattr.c:31:2: note: in expansion of macro 'ASSERT'
      31 |  ASSERT(dentry);
         |  ^~~~~~
   fs/cachefiles/xattr.c: In function 'cachefiles_set_object_xattr':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/xattr.c:105:2: note: in expansion of macro 'ASSERT'
     105 |  ASSERT(dentry);
         |  ^~~~~~
   fs/cachefiles/xattr.c: In function 'cachefiles_check_auxdata':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/xattr.c:166:2: note: in expansion of macro 'ASSERT'
     166 |  ASSERT(dentry);
         |  ^~~~~~
   fs/cachefiles/xattr.c: In function 'cachefiles_check_object_xattr':
>> fs/cachefiles/internal.h:319:31: error: 'x' undeclared (first use in this function)
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                               ^
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   fs/cachefiles/internal.h:319:19: note: in expansion of macro 'ASSERT_FAIL'
     319 | #define ASSERT(X) ASSERT_FAIL(x)
         |                   ^~~~~~~~~~~
   fs/cachefiles/xattr.c:206:2: note: in expansion of macro 'ASSERT'
     206 |  ASSERT(dentry);
         |  ^~~~~~
..

# https://github.com/0day-ci/linux/commit/417c020454c51ba2275386ea2cce82645eb31164
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chunguang-Xu/clean-up-the-code-related-to-ASSERT/20200827-182148
git checkout 417c020454c51ba2275386ea2cce82645eb31164
vim +/x +319 fs/cachefiles/internal.h

   318	
 > 319	#define ASSERT(X) ASSERT_FAIL(x)
   320	

---
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" (52700 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ