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] [day] [month] [year] [list]
Date:   Mon, 16 Aug 2021 10:11:08 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Chancellor <nathan@...nel.org>, Jens Axboe <axboe@...nel.dk>
Cc:     kernel test robot <lkp@...el.com>,
        clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: Re: [block:io_uring-fops.v6 58/64] io_uring.c:undefined reference to `__compiletime_assert_833'

On Fri, Aug 13, 2021 at 6:09 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
> On Sat, Aug 14, 2021 at 07:11:36AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git io_uring-fops.v6
> > head:   4e0c34c9b129fe84c63d3f76053d2e55d944e8a9
> > commit: 834d3e42c71acf4653f840ac3998f8601f37021c [58/64] io_uring: add infrastructure around io_uring_cmd_sqe issue type
> > config: s390-randconfig-r033-20210813 (attached as .config)

^ Note: 390 randconfig. Not sure if that could have changed the offset
of some members?

> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
> > 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
> >         # install s390 cross compiling tool for clang build
> >         # apt-get install binutils-s390x-linux-gnu
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=834d3e42c71acf4653f840ac3998f8601f37021c
> >         git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
> >         git fetch --no-tags block io_uring-fops.v6
> >         git checkout 834d3e42c71acf4653f840ac3998f8601f37021c
> >         # save the attached .config to linux build tree
> >         mkdir build_dir
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@...el.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    s390x-linux-gnu-ld: kernel/dma/coherent.o: in function `dma_declare_coherent_memory':
> >    coherent.c:(.text+0xc4): undefined reference to `memunmap'
> >    s390x-linux-gnu-ld: coherent.c:(.text+0x1c4): undefined reference to `memunmap'
> >    s390x-linux-gnu-ld: kernel/dma/coherent.o: in function `dma_init_coherent_memory':
> >    coherent.c:(.text+0x2b4): undefined reference to `memremap'
> >    s390x-linux-gnu-ld: coherent.c:(.text+0x564): undefined reference to `memunmap'
> >    s390x-linux-gnu-ld: fs/io_uring.o: in function `io_uring_init':
> > >> io_uring.c:(.init.text+0x30): undefined reference to `__compiletime_assert_833'
> > >> s390x-linux-gnu-ld: io_uring.c:(.init.text+0x4a): undefined reference to `__compiletime_assert_835'
> >    s390x-linux-gnu-ld: drivers/dma/fsl-edma.o: in function `fsl_edma_probe':
> >    fsl-edma.c:(.text+0x1bc): undefined reference to `devm_ioremap_resource'
> >    s390x-linux-gnu-ld: fsl-edma.c:(.text+0x40a): undefined reference to `devm_ioremap_resource'
> >    s390x-linux-gnu-ld: drivers/dma/idma64.o: in function `idma64_platform_probe':
> >    idma64.c:(.text+0xc6): undefined reference to `devm_ioremap_resource'
> >    s390x-linux-gnu-ld: drivers/char/xillybus/xillybus_of.o: in function `xilly_drv_probe':
> >    xillybus_of.c:(.text+0xc4): undefined reference to `devm_platform_ioremap_resource'
> >    s390x-linux-gnu-ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
> >    cistpl.c:(.text+0x1d6): undefined reference to `iounmap'
> >    s390x-linux-gnu-ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
> >    cistpl.c:(.text+0xb10): undefined reference to `ioremap'
> >    s390x-linux-gnu-ld: cistpl.c:(.text+0xbbe): undefined reference to `iounmap'
> >    s390x-linux-gnu-ld: cistpl.c:(.text+0xf4e): undefined reference to `iounmap'
> >    s390x-linux-gnu-ld: cistpl.c:(.text+0xf8c): undefined reference to `ioremap'
> >    s390x-linux-gnu-ld: drivers/clocksource/timer-of.o: in function `timer_of_base_init':
> >    timer-of.c:(.init.text+0x576): undefined reference to `of_iomap'
> >    s390x-linux-gnu-ld: drivers/clocksource/timer-of.o: in function `timer_of_base_exit':
> >    timer-of.c:(.init.text+0x17ba): undefined reference to `iounmap'
>
> Grabbing Nick's patch [1] to support the error function attribute turns
> this into:
>
> fs/io_uring.c:10531:2: error: call to '__compiletime_assert_833' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct io_uring_cmd_sqe, user_data) != sqe_offsets[1].user_data
>         BUILD_BUG_SQEC_ELEM(sqe_offsets[1].user_data,   __u64,  user_data);
>         ^
> fs/io_uring.c:10528:2: note: expanded from macro 'BUILD_BUG_SQEC_ELEM'
>         __BUILD_BUG_VERIFY_ELEMENT(struct io_uring_cmd_sqe, eoffset, etype, ename)
>         ^
> fs/io_uring.c:10489:2: note: expanded from macro '__BUILD_BUG_VERIFY_ELEMENT'
>         BUILD_BUG_ON(offsetof(stype, ename) != eoffset); \
>         ^
> ./include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
>         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>         ^
> note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
> ./include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
>         __compiletime_assert(condition, msg, prefix, suffix)
>         ^
> ./include/linux/compiler_types.h:303:4: note: expanded from macro '__compiletime_assert'
>                         prefix ## suffix();                             \
>                         ^
> <scratch space>:17:1: note: expanded from here
> __compiletime_assert_833
> ^
> fs/io_uring.c:10532:2: error: call to '__compiletime_assert_835' declared with 'error' attribute: BUILD_BUG_ON failed: offsetof(struct io_uring_cmd_sqe, personality) != sqe_offsets[1].personality
>         BUILD_BUG_SQEC_ELEM(sqe_offsets[1].personality, __u16,  personality);
>         ^
> fs/io_uring.c:10528:2: note: expanded from macro 'BUILD_BUG_SQEC_ELEM'
>         __BUILD_BUG_VERIFY_ELEMENT(struct io_uring_cmd_sqe, eoffset, etype, ename)
>         ^
> fs/io_uring.c:10489:2: note: expanded from macro '__BUILD_BUG_VERIFY_ELEMENT'
>         BUILD_BUG_ON(offsetof(stype, ename) != eoffset); \
>         ^
> ./include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
>         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>         ^
> note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
> ./include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert'
>         __compiletime_assert(condition, msg, prefix, suffix)
>         ^
> ./include/linux/compiler_types.h:303:4: note: expanded from macro '__compiletime_assert'
>                         prefix ## suffix();                             \
>                         ^
> <scratch space>:25:1: note: expanded from here
> __compiletime_assert_835
> ^
> 2 errors generated.
>
> Is this a legitimate failure? I do not see this with GCC 11.2.0.
>
> [1]: https://reviews.llvm.org/D106030 + https://lore.kernel.org/r/20210802202326.1817503-1-ndesaulniers@google.com/
>
> Cheers,
> Nathan



-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ