[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202510301819.TojcyrUJ-lkp@intel.com>
Date: Thu, 30 Oct 2025 18:34:58 +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 errors:
[auto build test ERROR on arnd-asm-generic/master]
[also build test ERROR 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: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20251030/202510301819.TojcyrUJ-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251030/202510301819.TojcyrUJ-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/202510301819.TojcyrUJ-lkp@intel.com/
All errors (new ones prefixed by >>):
   In file included from include/linux/workqueue.h:9,
                    from include/linux/mm_types.h:19,
                    from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from fs/namei.c:20:
   fs/namei.c: In function 'getname_flags':
>> include/linux/fs.h:2965:33: error: implicit declaration of function 'runtime_const_ptr' [-Wimplicit-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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:146:18: note: in expansion of macro '__getname'
     146 |         result = __getname();
         |                  ^~~~~~~~~
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:146:18: note: in expansion of macro '__getname'
     146 |         result = __getname();
         |                  ^~~~~~~~~
   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,
         |                               ~~~~~~~~~~~~~~~~~~~^~~~~~
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:146:18: note: in expansion of macro '__getname'
     146 |         result = __getname();
         |                  ^~~~~~~~~
   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,
         |                               ~~~~~~~~~~~~~~~~~~~^~~~~~
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:146:18: note: in expansion of macro '__getname'
     146 |         result = __getname();
         |                  ^~~~~~~~~
   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 fs/namei.c:22:
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:163:25: note: in expansion of macro '__putname'
     163 |                         __putname(result);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:169:25: note: in expansion of macro '__putname'
     169 |                         __putname(result);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:191:25: note: in expansion of macro '__putname'
     191 |                         __putname(kname);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:197:25: note: in expansion of macro '__putname'
     197 |                         __putname(kname);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:203:25: note: in expansion of macro '__putname'
     203 |                         __putname(kname);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:208:25: note: in expansion of macro '__putname'
     208 |                         __putname(kname);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
   fs/namei.c: In function 'getname_kernel':
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:249:18: note: in expansion of macro '__getname'
     249 |         result = __getname();
         |                  ^~~~~~~~~
   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,
         |                               ~~~~~~~~~~~~~~~~~~~^~~~~~
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:249:18: note: in expansion of macro '__getname'
     249 |         result = __getname();
         |                  ^~~~~~~~~
   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,
         |                               ~~~~~~~~~~~~~~~~~~~^~~~~~
>> include/linux/fs.h:2965:33: error: 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)
         |                                                  ^~~~~~~~~~~~~~
   fs/namei.c:249:18: note: in expansion of macro '__getname'
     249 |         result = __getname();
         |                  ^~~~~~~~~
   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,
         |                               ~~~~~~~~~~~~~~~~~~~^~~~~~
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:261:25: note: in expansion of macro '__putname'
     261 |                         __putname(result);
         |                         ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:267:17: note: in expansion of macro '__putname'
     267 |                 __putname(result);
         |                 ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
   fs/namei.c: In function 'putname':
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:294:17: note: in expansion of macro '__putname'
     294 |                 __putname(name->name);
         |                 ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
>> include/linux/fs.h:2965:33: error: 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))
         |                                                 ^~~~~~~~~~~~~~
   fs/namei.c:297:17: note: in expansion of macro '__putname'
     297 |                 __putname(name);
         |                 ^~~~~~~~~
   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);
         |                      ~~~~~~~~~~~~~~~~~~~^
..
vim +/runtime_const_ptr +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
 
