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]
Date:   Wed, 17 Aug 2022 21:11:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [alobakin:kallsyms 2/2] scripts/mod/modpost.h:87:18: error: lvalue
 required as unary '&' operand

tree:   https://github.com/alobakin/linux kallsyms
head:   ce39255907a23839bfa3cf1e68a5ed8cfeabc407
commit: ce39255907a23839bfa3cf1e68a5ed8cfeabc407 [2/2] kallsyms: add option to include relative filepaths into kallsyms
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220817/202208172113.PQCj5XHg-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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/alobakin/linux/commit/ce39255907a23839bfa3cf1e68a5ed8cfeabc407
        git remote add alobakin https://github.com/alobakin/linux
        git fetch --no-tags alobakin kallsyms
        git checkout ce39255907a23839bfa3cf1e68a5ed8cfeabc407
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k prepare

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

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

   scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
   scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
   scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
   In file included from scripts/mod/sympath.c:15:
   scripts/mod/sympath.c: In function 'move_code':
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:100:31: note: in expansion of macro 't'
     100 |                 eh->e_shoff = t(h(eh->e_shoff) + off);
         |                               ^
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:103:31: note: in expansion of macro 't'
     103 |                 eh->e_phoff = t(h(eh->e_phoff) + off);
         |                               ^
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:115:43: note: in expansion of macro 't'
     115 |                         iter->sh_offset = t(h(iter->sh_offset) + off);
         |                                           ^
   scripts/mod/sympath.c: In function 'fix_strtab':
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:132:29: note: in expansion of macro 't'
     132 |         st->strh->sh_size = t(h(st->strh->sh_size) + len);
         |                             ^
   scripts/mod/sympath.c: In function 'add_file_sym':
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:169:29: note: in expansion of macro 't'
     169 |         st->symh->sh_size = t(h(st->symh->sh_size) + h(st->symh->sh_entsize));
         |                             ^
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:170:29: note: in expansion of macro 't'
     170 |         st->symh->sh_info = t(h(st->symh->sh_info) + 1);
         |                             ^
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:172:24: note: in expansion of macro 't'
     172 |         pos->st_info = t((STB_LOCAL << 4) | STT_FILE);
         |                        ^
>> scripts/mod/modpost.h:87:18: error: lvalue required as unary '&' operand
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                  ^
   scripts/mod/sympath.c:19:25: note: in expansion of macro 'TO_NATIVE'
      19 | #define t(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:173:25: note: in expansion of macro 't'
     173 |         pos->st_shndx = t(SHN_ABS);
         |                         ^
>> scripts/mod/modpost.h:87:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                        ^~~~~~
   scripts/mod/sympath.c:18:25: note: in expansion of macro 'TO_NATIVE'
      18 | #define h(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:177:38: note: in expansion of macro 'h'
     177 |              *end = (void *)st->sh + h(eh->e_shnum) * h(eh->e_shentsize);
         |                                      ^
   scripts/mod/modpost.h:77:52: note: expected 'void *' but argument is of type 'const Elf32_Half *' {aka 'const short unsigned int *'}
      77 | static inline void __endian(const void *src, void *dest, unsigned int size)
         |                                              ~~~~~~^~~~
>> scripts/mod/modpost.h:87:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                        ^~~~~~
   scripts/mod/sympath.c:18:25: note: in expansion of macro 'TO_NATIVE'
      18 | #define h(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:177:55: note: in expansion of macro 'h'
     177 |              *end = (void *)st->sh + h(eh->e_shnum) * h(eh->e_shentsize);
         |                                                       ^
   scripts/mod/modpost.h:77:52: note: expected 'void *' but argument is of type 'const Elf32_Half *' {aka 'const short unsigned int *'}
      77 | static inline void __endian(const void *src, void *dest, unsigned int size)
         |                                              ~~~~~~^~~~
>> scripts/mod/modpost.h:87:24: warning: passing argument 2 of '__endian' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      87 |         __endian(&(x), &(__x), sizeof(__x));                    \
         |                        ^~~~~~
   scripts/mod/sympath.c:18:25: note: in expansion of macro 'TO_NATIVE'
      18 | #define h(x)            TO_NATIVE(x)
         |                         ^~~~~~~~~
   scripts/mod/sympath.c:178:48: note: in expansion of macro 'h'
     178 |              iter < end; iter = (void *)iter + h(eh->e_shentsize)) {
         |                                                ^
   scripts/mod/modpost.h:77:52: note: expected 'void *' but argument is of type 'const Elf32_Half *' {aka 'const short unsigned int *'}
      77 | static inline void __endian(const void *src, void *dest, unsigned int size)
         |                                              ~~~~~~^~~~
>> scripts/mod/sympath.c:185:45: warning: right shift count >= width of type [-Wshift-count-overflow]
     185 |                         if (h(rela->r_info) >> 32 >=
         |                                             ^~
   make[2]: *** [scripts/Makefile.host:95: scripts/mod/sympath] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:222: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +87 scripts/mod/modpost.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  83  
^1da177e4c3f41 Linus Torvalds 2005-04-16  84  #define TO_NATIVE(x)						\
^1da177e4c3f41 Linus Torvalds 2005-04-16  85  ({								\
^1da177e4c3f41 Linus Torvalds 2005-04-16  86  	typeof(x) __x;						\
^1da177e4c3f41 Linus Torvalds 2005-04-16 @87  	__endian(&(x), &(__x), sizeof(__x));			\
^1da177e4c3f41 Linus Torvalds 2005-04-16  88  	__x;							\
^1da177e4c3f41 Linus Torvalds 2005-04-16  89  })
^1da177e4c3f41 Linus Torvalds 2005-04-16  90  

:::::: The code at line 87 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.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