[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202510301846.5be7UPQy-lkp@intel.com>
Date: Thu, 30 Oct 2025 18:34:55 +0800
From: kernel test robot <lkp@...el.com>
To: Mateusz Guzik <mjguzik@...il.com>, brauner@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, viro@...iv.linux.org.uk, jack@...e.cz,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
torvalds@...ux-foundation.org, pfalcato@...e.de,
Mateusz Guzik <mjguzik@...il.com>
Subject: Re: [PATCH v2] fs: hide names_cachep behind runtime access machinery
Hi Mateusz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arnd-asm-generic/master]
[also build test WARNING on linus/master brauner-vfs/vfs.all linux/master v6.18-rc3 next-20251030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mateusz-Guzik/fs-hide-names_cachep-behind-runtime-access-machinery/20251030-170230
base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link: https://lore.kernel.org/r/20251030085949.787504-1-mjguzik%40gmail.com
patch subject: [PATCH v2] fs: hide names_cachep behind runtime access machinery
config: nios2-allnoconfig (https://download.01.org/0day-ci/archive/20251030/202510301846.5be7UPQy-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251030/202510301846.5be7UPQy-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/202510301846.5be7UPQy-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
drivers/base/firmware_loader/main.c: In function 'fw_get_filesystem_firmware':
include/linux/fs.h:2965:33: error: implicit declaration of function 'runtime_const_ptr' [-Werror=implicit-function-declaration]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~
include/linux/alloc_tag.h:239:16: note: in definition of macro 'alloc_hooks_tag'
239 | typeof(_do_alloc) _res; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:239:16: note: in definition of macro 'alloc_hooks_tag'
239 | typeof(_do_alloc) _res; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:243:24: note: in definition of macro 'alloc_hooks_tag'
243 | _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/percpu.h:5,
from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_alloc_noprof' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/alloc_tag.h:246:24: note: in definition of macro 'alloc_hooks_tag'
246 | _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:739:49: note: in expansion of macro 'alloc_hooks'
739 | #define kmem_cache_alloc(...) alloc_hooks(kmem_cache_alloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/fs.h:2968:33: note: in expansion of macro 'kmem_cache_alloc'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~~~
include/linux/fs.h:2968:50: note: in expansion of macro '__names_cachep'
2968 | #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:509:16: note: in expansion of macro '__getname'
509 | path = __getname();
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:737:50: note: expected 'struct kmem_cache *' but argument is of type 'int'
737 | void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/huge_mm.h:7,
from include/linux/mm.h:1016,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
>> include/linux/fs.h:2965:33: warning: passing argument 1 of 'kmem_cache_free' makes pointer from integer without a cast [-Wint-conversion]
2965 | #define __names_cachep runtime_const_ptr(names_cachep)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/fs.h:2969:49: note: in expansion of macro '__names_cachep'
2969 | #define __putname(name) kmem_cache_free(__names_cachep, (void *)(name))
| ^~~~~~~~~~~~~~
drivers/base/firmware_loader/main.c:591:9: note: in expansion of macro '__putname'
591 | __putname(path);
| ^~~~~~~~~
In file included from include/linux/mm.h:34,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/include/uapi/asm/elf.h:24,
from arch/nios2/include/asm/elf.h:9,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from drivers/base/firmware_loader/main.c:14:
include/linux/slab.h:774:41: note: expected 'struct kmem_cache *' but argument is of type 'int'
774 | void kmem_cache_free(struct kmem_cache *s, void *objp);
| ~~~~~~~~~~~~~~~~~~~^
cc1: some warnings being treated as errors
vim +/kmem_cache_alloc_noprof +2965 include/linux/fs.h
2958
2959 /*
2960 * XXX The runtime_const machinery does not support modules at the moment.
2961 */
2962 #ifdef MODULE
2963 #define __names_cachep names_cachep
2964 #else
> 2965 #define __names_cachep runtime_const_ptr(names_cachep)
2966 #endif
2967
> 2968 #define __getname() kmem_cache_alloc(__names_cachep, GFP_KERNEL)
2969 #define __putname(name) kmem_cache_free(__names_cachep, (void *)(name))
2970
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists