Re: include/linux/slab.h:552:15: error: type defaults to 'int' in declaration of 'kmem_buckets_create'

From: Kees Cook
Date: Wed Aug 28 2024 - 21:48:04 EST


On Wed, Aug 28, 2024 at 05:21:04AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 3ec3f5fc4a91e389ea56b111a73d97ffc94f19c6
> commit: b32801d1255be1da62ea8134df3ed9f3331fba12 mm/slab: Introduce kmem_buckets_create() and family
> date: 8 weeks ago
> config: x86_64-randconfig-072-20240827 (https://download.01.org/0day-ci/archive/20240828/202408280559.FIsoHAAc-lkp@xxxxxxxxx/config)
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280559.FIsoHAAc-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/202408280559.FIsoHAAc-lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>):
>
> arch/x86/include/asm/fpu/types.h:355:22: note: in expansion of macro 'PAGE_SIZE'
> 355 | u8 __padding[PAGE_SIZE];
> | ^~~~~~~~~
> arch/x86/include/asm/page_types.h:10:33: warning: "CONFIG_PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef]
> 10 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
> | ^~~~~~~~~~~~~~~~~

This continues to be a problem with CONFIG_PAGE_SHIFT with this config,
and is a known problem with no clear fix[1]. I think reports could be
silenced for now.

-Kees

[1] https://lore.kernel.org/all/85bb8bbc-f48d-46fd-aebb-03b2f7d3980a@xxxxxxxxxxxxxxxx/

--
Kees Cook