Re: [PATCH] mm/mempolicy: fix a race between offset_il_node and mpol_rebind_task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 14, 2021 at 07:16:24AM +0800, kernel test robot wrote:
> Hi yanghui,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on v5.14-rc5]
> [cannot apply to hnaz-linux-mm/master next-20210813]
> [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/yanghui/mm-mempolicy-fix-a-race-between-offset_il_node-and-mpol_rebind_task/20210814-004451
> base:    36a21d51725af2ce0700c6ebcb6b9594aac658a6
> config: x86_64-randconfig-a003-20210813 (attached as .config)
> 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
>         # https://github.com/0day-ci/linux/commit/99d8d888eb92ea46a5f4883773f3edaee5ccd28e
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review yanghui/mm-mempolicy-fix-a-race-between-offset_il_node-and-mpol_rebind_task/20210814-004451
>         git checkout 99d8d888eb92ea46a5f4883773f3edaee5ccd28e
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> All errors (new ones prefixed by >>):
> 
> >> ld.lld: error: undefined symbol: __compiletime_assert_467
>    >>> referenced by mempolicy.c:1968 (mm/mempolicy.c:1968)
>    >>> mempolicy.o:(offset_il_node) in archive mm/built-in.a

Grabbing Nick's patch [1] to support the error function attribute in
clang and the kernel side patch [2] turns this into:

mm/mempolicy.c:1968:24: error: call to '__compiletime_assert_467' declared with 'error' attribute: Unsupported access size for {READ,WRITE}_ONCE().
        nodemask_t nodemask = READ_ONCE(pol->nodes);
                              ^
./include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
        compiletime_assert_rwonce_type(x);                              \
        ^
./include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
        compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
        ^
./include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
        _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        ^
./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>:246:1: note: expanded from here
__compiletime_assert_467
^
mm/mempolicy.c:214:2: error: call to '__compiletime_assert_448' declared with 'error' attribute: Unsupported access size for {READ,WRITE}_ONCE().
        WRITE_ONCE(pol->nodes, *nodes);
        ^
./include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
        compiletime_assert_rwonce_type(x);                              \
        ^
./include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
        compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
        ^
./include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
        _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        ^
./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>:16:1: note: expanded from here
__compiletime_assert_448
^
mm/mempolicy.c:337:2: error: call to '__compiletime_assert_452' declared with 'error' attribute: Unsupported access size for {READ,WRITE}_ONCE().
        WRITE_ONCE(pol->nodes, tmp);
        ^
./include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
        compiletime_assert_rwonce_type(x);                              \
        ^
./include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
        compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
        ^
./include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
        _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        ^
./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>:38:1: note: expanded from here
__compiletime_assert_452
^
mm/mempolicy.c:196:2: error: call to '__compiletime_assert_447' declared with 'error' attribute: Unsupported access size for {READ,WRITE}_ONCE().
        WRITE_ONCE(pol->nodes, *nodes);
        ^
./include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
        compiletime_assert_rwonce_type(x);                              \
        ^
./include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
        compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
        ^
./include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert'
        _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        ^
./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>:13:1: note: expanded from here
__compiletime_assert_447
^
4 errors generated.

Which appears to be what Matthew mentioned, as this config has
CONFIG_NODES_SHIFT=10 so nodemask_t is 128 bytes large.

[1]: https://reviews.llvm.org/D106030
[2]: https://lore.kernel.org/r/20210802202326.1817503-1-ndesaulniers@xxxxxxxxxx/

Cheers,
Nathan




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux