tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: 275d686abcb590d862b74e2670533d93fd10e58c commit: 2900cb53f7d7d47f73c4c368c0db15a2c6df3e72 [18/225] lib/stackdepot: double DEPOT_POOLS_CAP if KASAN is enabled config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20240808/202408082024.K413hXT3-lkp@xxxxxxxxx/config) compiler: or1k-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240808/202408082024.K413hXT3-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408082024.K413hXT3-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> lib/stackdepot.c:44:9: error: implicit declaration of function 'MIN' [-Wimplicit-function-declaration] 44 | MIN((1LL << (DEPOT_POOL_INDEX_BITS)) - 1, DEPOT_POOLS_CAP) | ^~~ lib/stackdepot.c:66:26: note: in expansion of macro 'DEPOT_MAX_POOLS' 66 | static void *stack_pools[DEPOT_MAX_POOLS]; | ^~~~~~~~~~~~~~~ >> lib/stackdepot.c:66:14: error: variably modified 'stack_pools' at file scope 66 | static void *stack_pools[DEPOT_MAX_POOLS]; | ^~~~~~~~~~~ vim +/MIN +44 lib/stackdepot.c 41 42 /* The pool_index is offset by 1 so the first record does not have a 0 handle. */ 43 #define DEPOT_MAX_POOLS \ > 44 MIN((1LL << (DEPOT_POOL_INDEX_BITS)) - 1, DEPOT_POOLS_CAP) 45 46 static bool stack_depot_disabled; 47 static bool __stack_depot_early_init_requested __initdata = IS_ENABLED(CONFIG_STACKDEPOT_ALWAYS_INIT); 48 static bool __stack_depot_early_init_passed __initdata; 49 50 /* Use one hash table bucket per 16 KB of memory. */ 51 #define STACK_HASH_TABLE_SCALE 14 52 /* Limit the number of buckets between 4K and 1M. */ 53 #define STACK_BUCKET_NUMBER_ORDER_MIN 12 54 #define STACK_BUCKET_NUMBER_ORDER_MAX 20 55 /* Initial seed for jhash2. */ 56 #define STACK_HASH_SEED 0x9747b28c 57 58 /* Hash table of stored stack records. */ 59 static struct list_head *stack_table; 60 /* Fixed order of the number of table buckets. Used when KASAN is enabled. */ 61 static unsigned int stack_bucket_number_order; 62 /* Hash mask for indexing the table. */ 63 static unsigned int stack_hash_mask; 64 65 /* Array of memory regions that store stack records. */ > 66 static void *stack_pools[DEPOT_MAX_POOLS]; 67 /* Newly allocated pool that is not yet added to stack_pools. */ 68 static void *new_pool; 69 /* Number of pools in stack_pools. */ 70 static int pools_num; 71 /* Offset to the unused space in the currently used pool. */ 72 static size_t pool_offset = DEPOT_POOL_SIZE; 73 /* Freelist of stack records within stack_pools. */ 74 static LIST_HEAD(free_stacks); 75 /* The lock must be held when performing pool or freelist modifications. */ 76 static DEFINE_RAW_SPINLOCK(pool_lock); 77 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki