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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202511201828.xfphUVkJ-lkp@intel.com>
Date: Thu, 20 Nov 2025 18:37:12 +0800
From: kernel test robot <lkp@...el.com>
To: George Guo <dongtai.guo@...ux.dev>, Huacai Chen <chenhuacai@...nel.org>,
	WANG Xuerui <kernel@...0n.name>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
	George Guo <dongtai.guo@...ux.dev>
Subject: Re: [PATCH 2/2] LoongArch: Enable 128-bit atomics cmpxchg support

Hi George,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8b690556d8fe074b4f9835075050fba3fb180e93]

url:    https://github.com/intel-lab-lkp/linux/commits/George-Guo/LoongArch-Add-128-bit-atomic-cmpxchg-support/20251120-160152
base:   8b690556d8fe074b4f9835075050fba3fb180e93
patch link:    https://lore.kernel.org/r/20251120-2-v1-2-705bdc440550%40linux.dev
patch subject: [PATCH 2/2] LoongArch: Enable 128-bit atomics cmpxchg support
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251120/202511201828.xfphUVkJ-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251120/202511201828.xfphUVkJ-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/202511201828.xfphUVkJ-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a2, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a3, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a5, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $t3, 0                           
         |                       ^
   4 errors generated.


vim +766 mm/slub.c

881db7fb03a77a Christoph Lameter 2011-06-01  756  
6801be4f2653e5 Peter Zijlstra    2023-05-31  757  static inline bool
6801be4f2653e5 Peter Zijlstra    2023-05-31  758  __update_freelist_fast(struct slab *slab,
6801be4f2653e5 Peter Zijlstra    2023-05-31  759  		      void *freelist_old, unsigned long counters_old,
6801be4f2653e5 Peter Zijlstra    2023-05-31  760  		      void *freelist_new, unsigned long counters_new)
6801be4f2653e5 Peter Zijlstra    2023-05-31  761  {
6801be4f2653e5 Peter Zijlstra    2023-05-31  762  #ifdef system_has_freelist_aba
6801be4f2653e5 Peter Zijlstra    2023-05-31  763  	freelist_aba_t old = { .freelist = freelist_old, .counter = counters_old };
6801be4f2653e5 Peter Zijlstra    2023-05-31  764  	freelist_aba_t new = { .freelist = freelist_new, .counter = counters_new };
6801be4f2653e5 Peter Zijlstra    2023-05-31  765  
6801be4f2653e5 Peter Zijlstra    2023-05-31 @766  	return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
6801be4f2653e5 Peter Zijlstra    2023-05-31  767  #else
6801be4f2653e5 Peter Zijlstra    2023-05-31  768  	return false;
6801be4f2653e5 Peter Zijlstra    2023-05-31  769  #endif
6801be4f2653e5 Peter Zijlstra    2023-05-31  770  }
6801be4f2653e5 Peter Zijlstra    2023-05-31  771  

-- 
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