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-next>] [day] [month] [year] [list]
Message-ID: <202312091837.cKaPw0Tf-lkp@intel.com>
Date:   Sat, 9 Dec 2023 18:20:37 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org, Josef Bacik <josef@...icpanda.com>
Subject: [paulmck-rcu:frederic.2023.12.08a 29/37]
 fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329'
 declared with 'error' attribute: Need native word sized stores/loads for
 atomicity.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git frederic.2023.12.08a
head:   37843b5f561a08ae899fb791eeeb5abd992eabe2
commit: 7dd87072d40809e26503f04b79d63290288dbbac [29/37] btrfs: Adjust ->last_trans ordering in btrfs_record_root_in_trans()
config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20231209/202312091837.cKaPw0Tf-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231209/202312091837.cKaPw0Tf-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312091837.cKaPw0Tf-lkp@intel.com/

All errors (new ones prefixed by >>):

   warning: unknown warning option '-Wpacked-not-aligned'; did you mean '-Wpacked-non-pod'? [-Wunknown-warning-option]
   warning: unknown warning option '-Wstringop-truncation'; did you mean '-Wstring-concatenation'? [-Wunknown-warning-option]
   warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
>> fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     496 |         if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
         |             ^
   include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
     176 | #define smp_load_acquire(p) __smp_load_acquire(p)
         |                             ^
   arch/riscv/include/asm/barrier.h:42:2: note: expanded from macro '__smp_load_acquire'
      42 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:60:1: note: expanded from here
      60 | __compiletime_assert_329
         | ^
   fs/btrfs/transaction.c:434:3: error: call to '__compiletime_assert_326' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     434 |                 smp_store_release(&root->last_trans, trans->transid); /* ^^^ */
         |                 ^
   include/asm-generic/barrier.h:172:55: note: expanded from macro 'smp_store_release'
     172 | #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0)
         |                                                       ^
   arch/riscv/include/asm/barrier.h:34:2: note: expanded from macro '__smp_store_release'
      34 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:46:1: note: expanded from here
      46 | __compiletime_assert_326
         | ^
>> fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     496 |         if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
         |             ^
   include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
     176 | #define smp_load_acquire(p) __smp_load_acquire(p)
         |                             ^
   arch/riscv/include/asm/barrier.h:42:2: note: expanded from macro '__smp_load_acquire'
      42 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:60:1: note: expanded from here
      60 | __compiletime_assert_329
         | ^
   3 warnings and 3 errors generated.


vim +496 fs/btrfs/transaction.c

   481	
   482	int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans,
   483				       struct btrfs_root *root)
   484	{
   485		struct btrfs_fs_info *fs_info = root->fs_info;
   486		int ret;
   487	
   488		if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state))
   489			return 0;
   490	
   491		/*
   492		 * see record_root_in_trans for comments about IN_TRANS_SETUP usage
   493		 * and barriers.  The smp_load_acquire() pairs with the smp_wmb()
   494		 * and the test_bit_acquire pairs with the smp_mb__before_atomic().
   495		 */
 > 496		if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
   497		    !test_bit_acquire(BTRFS_ROOT_IN_TRANS_SETUP, &root->state)) /* ^^^ */
   498			return 0;
   499	
   500		mutex_lock(&fs_info->reloc_mutex);
   501		ret = record_root_in_trans(trans, root, 0);
   502		mutex_unlock(&fs_info->reloc_mutex);
   503	
   504		return ret;
   505	}
   506	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ