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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511020603.NRNONOtT-lkp@intel.com>
Date: Sun, 2 Nov 2025 07:06:43 +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 v4] 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 linux/master v6.18-rc3 next-20251031]
[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/20251101-054539
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link:    https://lore.kernel.org/r/20251030105242.801528-1-mjguzik%40gmail.com
patch subject: [PATCH v4] fs: hide names_cachep behind runtime access machinery
config: riscv-randconfig-r111-20251102 (https://download.01.org/0day-ci/archive/20251102/202511020603.NRNONOtT-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251102/202511020603.NRNONOtT-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/202511020603.NRNONOtT-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/riscv/include/asm/runtime-const.h:7,
                    from include/linux/fs.h:53,
                    from include/linux/huge_mm.h:7,
                    from include/linux/mm.h:1016,
                    from arch/riscv/kernel/asm-offsets.c:8:
   arch/riscv/include/asm/cacheflush.h: In function 'flush_cache_vmap':
   arch/riscv/include/asm/cacheflush.h:49:13: error: implicit declaration of function 'is_vmalloc_or_module_addr' [-Werror=implicit-function-declaration]
      49 |         if (is_vmalloc_or_module_addr((void *)start)) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compat.h:18,
                    from arch/riscv/include/asm/elf.h:12,
                    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 include/linux/node.h:18,
                    from include/linux/memory.h:19,
                    from arch/riscv/include/asm/runtime-const.h:9,
                    from include/linux/fs.h:53,
                    from include/linux/huge_mm.h:7,
                    from include/linux/mm.h:1016,
                    from arch/riscv/kernel/asm-offsets.c:8:
   include/uapi/linux/aio_abi.h: At top level:
   include/uapi/linux/aio_abi.h:79:9: error: unknown type name '__kernel_rwf_t'
      79 |         __kernel_rwf_t aio_rw_flags;    /* RWF_* flags */
         |         ^~~~~~~~~~~~~~
   In file included from arch/riscv/kernel/asm-offsets.c:8:
>> include/linux/mm.h:1092:19: error: static declaration of 'is_vmalloc_or_module_addr' follows non-static declaration
    1092 | static inline int is_vmalloc_or_module_addr(const void *x)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/riscv/include/asm/runtime-const.h:7,
                    from include/linux/fs.h:53,
                    from include/linux/huge_mm.h:7,
                    from include/linux/mm.h:1016,
                    from arch/riscv/kernel/asm-offsets.c:8:
   arch/riscv/include/asm/cacheflush.h:49:13: note: previous implicit declaration of 'is_vmalloc_or_module_addr' with type 'int()'
      49 |         if (is_vmalloc_or_module_addr((void *)start)) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   make[3]: *** [scripts/Makefile.build:182: arch/riscv/kernel/asm-offsets.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1282: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/is_vmalloc_or_module_addr +1092 include/linux/mm.h

98b1917cdef92c David Hildenbrand       2025-04-10  1015  
71e3aac0724ffe Andrea Arcangeli        2011-01-13 @1016  #include <linux/huge_mm.h>
^1da177e4c3f41 Linus Torvalds          2005-04-16  1017  
^1da177e4c3f41 Linus Torvalds          2005-04-16  1018  /*
^1da177e4c3f41 Linus Torvalds          2005-04-16  1019   * Methods to modify the page usage count.
^1da177e4c3f41 Linus Torvalds          2005-04-16  1020   *
^1da177e4c3f41 Linus Torvalds          2005-04-16  1021   * What counts for a page usage:
^1da177e4c3f41 Linus Torvalds          2005-04-16  1022   * - cache mapping   (page->mapping)
^1da177e4c3f41 Linus Torvalds          2005-04-16  1023   * - private data    (page->private)
^1da177e4c3f41 Linus Torvalds          2005-04-16  1024   * - page mapped in a task's page tables, each mapping
^1da177e4c3f41 Linus Torvalds          2005-04-16  1025   *   is counted separately
^1da177e4c3f41 Linus Torvalds          2005-04-16  1026   *
^1da177e4c3f41 Linus Torvalds          2005-04-16  1027   * Also, many kernel routines increase the page count before a critical
^1da177e4c3f41 Linus Torvalds          2005-04-16  1028   * routine so they can be sure the page doesn't go away from under them.
^1da177e4c3f41 Linus Torvalds          2005-04-16  1029   */
^1da177e4c3f41 Linus Torvalds          2005-04-16  1030  
^1da177e4c3f41 Linus Torvalds          2005-04-16  1031  /*
da6052f7b33abe Nicholas Piggin         2006-09-25  1032   * Drop a ref, return true if the refcount fell to zero (the page has no users)
^1da177e4c3f41 Linus Torvalds          2005-04-16  1033   */
7c8ee9a86340db Nicholas Piggin         2006-03-22  1034  static inline int put_page_testzero(struct page *page)
7c8ee9a86340db Nicholas Piggin         2006-03-22  1035  {
fe896d1878949e Joonsoo Kim             2016-03-17  1036  	VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
fe896d1878949e Joonsoo Kim             2016-03-17  1037  	return page_ref_dec_and_test(page);
7c8ee9a86340db Nicholas Piggin         2006-03-22  1038  }
^1da177e4c3f41 Linus Torvalds          2005-04-16  1039  
b620f63358cd35 Matthew Wilcox (Oracle  2020-12-06  1040) static inline int folio_put_testzero(struct folio *folio)
b620f63358cd35 Matthew Wilcox (Oracle  2020-12-06  1041) {
b620f63358cd35 Matthew Wilcox (Oracle  2020-12-06  1042) 	return put_page_testzero(&folio->page);
b620f63358cd35 Matthew Wilcox (Oracle  2020-12-06  1043) }
b620f63358cd35 Matthew Wilcox (Oracle  2020-12-06  1044) 
^1da177e4c3f41 Linus Torvalds          2005-04-16  1045  /*
7c8ee9a86340db Nicholas Piggin         2006-03-22  1046   * Try to grab a ref unless the page has a refcount of zero, return false if
7c8ee9a86340db Nicholas Piggin         2006-03-22  1047   * that is the case.
8e0861fa3c4edf Alexey Kardashevskiy    2013-08-28  1048   * This can be called when MMU is off so it must not access
8e0861fa3c4edf Alexey Kardashevskiy    2013-08-28  1049   * any of the virtual mappings.
^1da177e4c3f41 Linus Torvalds          2005-04-16  1050   */
c25303281d7929 Matthew Wilcox (Oracle  2021-06-05  1051) static inline bool get_page_unless_zero(struct page *page)
7c8ee9a86340db Nicholas Piggin         2006-03-22  1052  {
fe896d1878949e Joonsoo Kim             2016-03-17  1053  	return page_ref_add_unless(page, 1, 0);
7c8ee9a86340db Nicholas Piggin         2006-03-22  1054  }
^1da177e4c3f41 Linus Torvalds          2005-04-16  1055  
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1056) static inline struct folio *folio_get_nontail_page(struct page *page)
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1057) {
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1058) 	if (unlikely(!get_page_unless_zero(page)))
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1059) 		return NULL;
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1060) 	return (struct folio *)page;
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1061) }
3c1ea2c729ef8e Vishal Moola (Oracle    2023-01-30  1062) 
53df8fdc15fb64 Wu Fengguang            2010-01-27  1063  extern int page_is_ram(unsigned long pfn);
124fe20d94630b Dan Williams            2015-08-10  1064  
124fe20d94630b Dan Williams            2015-08-10  1065  enum {
124fe20d94630b Dan Williams            2015-08-10  1066  	REGION_INTERSECTS,
124fe20d94630b Dan Williams            2015-08-10  1067  	REGION_DISJOINT,
124fe20d94630b Dan Williams            2015-08-10  1068  	REGION_MIXED,
124fe20d94630b Dan Williams            2015-08-10  1069  };
124fe20d94630b Dan Williams            2015-08-10  1070  
1c29f25bf5d6c5 Toshi Kani              2016-01-26  1071  int region_intersects(resource_size_t offset, size_t size, unsigned long flags,
1c29f25bf5d6c5 Toshi Kani              2016-01-26  1072  		      unsigned long desc);
53df8fdc15fb64 Wu Fengguang            2010-01-27  1073  
48667e7a43c1a1 Christoph Lameter       2008-02-04  1074  /* Support for virtually mapped pages */
b3bdda02aa547a Christoph Lameter       2008-02-04  1075  struct page *vmalloc_to_page(const void *addr);
b3bdda02aa547a Christoph Lameter       2008-02-04  1076  unsigned long vmalloc_to_pfn(const void *addr);
48667e7a43c1a1 Christoph Lameter       2008-02-04  1077  
0738c4bb8f2a8b Paul Mundt              2008-03-12  1078  /*
0738c4bb8f2a8b Paul Mundt              2008-03-12  1079   * Determine if an address is within the vmalloc range
0738c4bb8f2a8b Paul Mundt              2008-03-12  1080   *
0738c4bb8f2a8b Paul Mundt              2008-03-12  1081   * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
0738c4bb8f2a8b Paul Mundt              2008-03-12  1082   * is no special casing required.
0738c4bb8f2a8b Paul Mundt              2008-03-12  1083   */
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1084  #ifdef CONFIG_MMU
186525bd6b83ef Ingo Molnar             2019-11-29  1085  extern bool is_vmalloc_addr(const void *x);
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1086  extern int is_vmalloc_or_module_addr(const void *x);
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1087  #else
186525bd6b83ef Ingo Molnar             2019-11-29  1088  static inline bool is_vmalloc_addr(const void *x)
186525bd6b83ef Ingo Molnar             2019-11-29  1089  {
186525bd6b83ef Ingo Molnar             2019-11-29  1090  	return false;
186525bd6b83ef Ingo Molnar             2019-11-29  1091  }
934831d060ccd5 David Howells           2009-09-24 @1092  static inline int is_vmalloc_or_module_addr(const void *x)
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1093  {
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1094  	return 0;
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1095  }
81ac3ad9061dd9 KAMEZAWA Hiroyuki       2009-09-22  1096  #endif
9e2779fa281cfd Christoph Lameter       2008-02-04  1097  

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