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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202410020326.iaZIteIx-lkp@intel.com>
Date: Wed, 2 Oct 2024 03:53:13 +0800
From: kernel test robot <lkp@...el.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: mm/slub.c:5000:2: error: call to '__compiletime_assert_641' declared
 with 'error' attribute: BUILD_BUG_ON failed: PERCPU_DYNAMIC_EARLY_SIZE <
 NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH * sizeof(struct kmem_cache_cpu)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: d8fccd9ca5f905533dc6c26cfd1f91beb8691c95 arm64: Allow to enable PREEMPT_RT.
date:   2 weeks ago
config: arm64-randconfig-002-20241002 (https://download.01.org/0day-ci/archive/20241002/202410020326.iaZIteIx-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project fef3566a25ff0e34fb87339ba5e13eca17cec00f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020326.iaZIteIx-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/202410020326.iaZIteIx-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/slub.c:13:
   In file included from include/linux/mm.h:2237:
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> mm/slub.c:5000:2: error: call to '__compiletime_assert_641' declared with 'error' attribute: BUILD_BUG_ON failed: PERCPU_DYNAMIC_EARLY_SIZE < NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH * sizeof(struct kmem_cache_cpu)
    5000 |         BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
         |         ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:510:2: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:498:2: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:491:4: note: expanded from macro '__compiletime_assert'
     491 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:99:1: note: expanded from here
      99 | __compiletime_assert_641
         | ^
   1 warning and 1 error generated.


vim +5000 mm/slub.c

81819f0fc8285a Christoph Lameter 2007-05-06  4996  
0af8489b0216fa Vlastimil Babka   2022-11-15  4997  #ifndef CONFIG_SLUB_TINY
55136592fedf5c Christoph Lameter 2010-08-20  4998  static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
4c93c355d5d563 Christoph Lameter 2007-10-16  4999  {
6c182dc0de26ef Christoph Lameter 2010-08-20 @5000  	BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
a0dc161ae77377 Baoquan He        2022-10-24  5001  			NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH *
a0dc161ae77377 Baoquan He        2022-10-24  5002  			sizeof(struct kmem_cache_cpu));
4c93c355d5d563 Christoph Lameter 2007-10-16  5003  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5004  	/*
d4d84fef6d0366 Chris Metcalf     2011-06-02  5005  	 * Must align to double word boundary for the double cmpxchg
d4d84fef6d0366 Chris Metcalf     2011-06-02  5006  	 * instructions to work; see __pcpu_double_call_return_bool().
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5007  	 */
d4d84fef6d0366 Chris Metcalf     2011-06-02  5008  	s->cpu_slab = __alloc_percpu(sizeof(struct kmem_cache_cpu),
d4d84fef6d0366 Chris Metcalf     2011-06-02  5009  				     2 * sizeof(void *));
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5010  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5011  	if (!s->cpu_slab)
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5012  		return 0;
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5013  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5014  	init_kmem_cache_cpus(s);
4c93c355d5d563 Christoph Lameter 2007-10-16  5015  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5016  	return 1;
4c93c355d5d563 Christoph Lameter 2007-10-16  5017  }
0af8489b0216fa Vlastimil Babka   2022-11-15  5018  #else
0af8489b0216fa Vlastimil Babka   2022-11-15  5019  static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
0af8489b0216fa Vlastimil Babka   2022-11-15  5020  {
0af8489b0216fa Vlastimil Babka   2022-11-15  5021  	return 1;
0af8489b0216fa Vlastimil Babka   2022-11-15  5022  }
0af8489b0216fa Vlastimil Babka   2022-11-15  5023  #endif /* CONFIG_SLUB_TINY */
4c93c355d5d563 Christoph Lameter 2007-10-16  5024  

:::::: The code at line 5000 was first introduced by commit
:::::: 6c182dc0de26ef97efb6a97a8deab074833764e7 slub: Remove static kmem_cache_cpu array for boot

:::::: TO: Christoph Lameter <cl@...ux.com>
:::::: CC: Pekka Enberg <penberg@...nel.org>

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