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>] [day] [month] [year] [list]
Message-ID: <202206121354.mdOkwo61-lkp@intel.com>
Date:   Sun, 12 Jun 2022 13:58:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Matteo Croce <mcroce@...rosoft.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Anup Patel <anup@...infault.org>
Subject: [avpatel:virtio_rpmsg_bus_fix_v1 36/52]
 include/linux/fortify-string.h:374:63: error: expected identifier or '('
 before '{' token

tree:   https://github.com/avpatel/linux.git virtio_rpmsg_bus_fix_v1
head:   390aaf641ff2f8919268d611e864227265c3f3f2
commit: 312a993799c081eda5135198ad59b691211d14fe [36/52] riscv: optimized memcpy
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20220612/202206121354.mdOkwo61-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.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
        # https://github.com/avpatel/linux/commit/312a993799c081eda5135198ad59b691211d14fe
        git remote add avpatel https://github.com/avpatel/linux.git
        git fetch --no-tags avpatel virtio_rpmsg_bus_fix_v1
        git checkout 312a993799c081eda5135198ad59b691211d14fe
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from include/linux/string.h:253,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from arch/riscv/lib/string.c:10:
>> include/linux/fortify-string.h:374:63: error: expected identifier or '(' before '{' token
     374 |                              p_size_field, q_size_field, op) ({         \
         |                                                               ^
   include/linux/fortify-string.h:385:26: note: in expansion of macro '__fortify_memcpy_chk'
     385 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
         |                          ^~~~~~~~~~~~~~~~~~~~
   arch/riscv/lib/string.c:89:7: note: in expansion of macro 'memcpy'
      89 | void *memcpy(void *dest, const void *src, size_t count) __weak __alias(__memcpy);
         |       ^~~~~~


vim +374 include/linux/fortify-string.h

a28a6e860c6cf2 Francis Laniel 2021-02-25  372  
f68f2ff91512c1 Kees Cook      2021-04-20  373  #define __fortify_memcpy_chk(p, q, size, p_size, q_size,		\
f68f2ff91512c1 Kees Cook      2021-04-20 @374  			     p_size_field, q_size_field, op) ({		\
f68f2ff91512c1 Kees Cook      2021-04-20  375  	size_t __fortify_size = (size_t)(size);				\
f68f2ff91512c1 Kees Cook      2021-04-20  376  	fortify_memcpy_chk(__fortify_size, p_size, q_size,		\
f68f2ff91512c1 Kees Cook      2021-04-20  377  			   p_size_field, q_size_field, #op);		\
f68f2ff91512c1 Kees Cook      2021-04-20  378  	__underlying_##op(p, q, __fortify_size);			\
f68f2ff91512c1 Kees Cook      2021-04-20  379  })
f68f2ff91512c1 Kees Cook      2021-04-20  380  

:::::: The code at line 374 was first introduced by commit
:::::: f68f2ff91512c199ec24883001245912afc17873 fortify: Detect struct member overflows in memcpy() at compile-time

:::::: TO: Kees Cook <keescook@...omium.org>
:::::: CC: Kees Cook <keescook@...omium.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ