* [harry:kmalloc-no-objext-rfc-v1r2 3/3] mm/internal.h:838:26: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 17179869184 to 0
@ 2026-07-02 9:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-02 9:18 UTC (permalink / raw)
To: Harry Yoo (Oracle); +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/harry/linux.git kmalloc-no-objext-rfc-v1r2
head: a734609d2f387a9e682d352e9f28599744cc300b
commit: a734609d2f387a9e682d352e9f28599744cc300b [3/3] mm/slab: prevent unbounded recursion in free path with new kmalloc type
config: x86_64-randconfig-016-20260702 (https://download.01.org/0day-ci/archive/20260702/202607021730.dIjpsiXL-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260702/202607021730.dIjpsiXL-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607021730.dIjpsiXL-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/slub.c:23:
mm/slab.h:397:10: error: use of undeclared identifier 'KMALLOC_NO_OBJ_EXT'
397 | type = KMALLOC_NO_OBJ_EXT;
| ^~~~~~~~~~~~~~~~~~
In file included from mm/slub.c:55:
>> mm/internal.h:838:26: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 17179869184 to 0 [-Wconstant-conversion]
838 | VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
| ^~~~~~~~~~~~~~~
include/linux/mmzone.h:85:33: note: expanded from macro 'MAX_FOLIO_ORDER'
85 | #define MAX_FOLIO_ORDER (ilog2(SZ_16G) - PAGE_SHIFT)
| ~~~~~~^~~~~~~
include/linux/sizes.h:56:19: note: expanded from macro 'SZ_16G'
56 | #define SZ_16G _AC(0x400000000, ULL)
| ^~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
21 | #define _AC(X,Y) __AC(X,Y)
| ^~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/log2.h:162:14: note: expanded from macro 'ilog2'
162 | __ilog2_u32(n) : \
| ~~~~~~~~~~~ ^
include/linux/mmdebug.h:123:50: note: expanded from macro 'VM_WARN_ON_ONCE'
123 | #define VM_WARN_ON_ONCE(cond) (void)WARN_ON_ONCE(cond)
| ^~~~
include/asm-generic/bug.h:120:25: note: expanded from macro 'WARN_ON_ONCE'
120 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
1 warning and 1 error generated.
vim +838 mm/internal.h
904d58578fce531 Kefeng Wang 2023-05-16 822
3c605096d315821 Joonsoo Kim 2014-11-13 823 extern int __isolate_free_page(struct page *page, unsigned int order);
624f58d8f463967 Alexander Duyck 2020-04-06 824 extern void __putback_isolated_page(struct page *page, unsigned int order,
624f58d8f463967 Alexander Duyck 2020-04-06 825 int mt);
58e3e5265484a1b Shengming Hu 2025-12-29 826 extern void memblock_free_pages(unsigned long pfn, unsigned int order);
13c526540b31693 David Hildenbrand 2024-06-07 827 extern void __free_pages_core(struct page *page, unsigned int order,
13c526540b31693 David Hildenbrand 2024-06-07 828 enum meminit_context context);
9420f89db2dd611 Mike Rapoport (IBM 2023-03-21 829)
1e3be4856f49d55 Tarun Sahu 2023-06-12 830 /*
1e3be4856f49d55 Tarun Sahu 2023-06-12 831 * This will have no effect, other than possibly generating a warning, if the
1e3be4856f49d55 Tarun Sahu 2023-06-12 832 * caller passes in a non-large folio.
1e3be4856f49d55 Tarun Sahu 2023-06-12 833 */
1e3be4856f49d55 Tarun Sahu 2023-06-12 834 static inline void folio_set_order(struct folio *folio, unsigned int order)
1e3be4856f49d55 Tarun Sahu 2023-06-12 835 {
1e3be4856f49d55 Tarun Sahu 2023-06-12 836 if (WARN_ON_ONCE(!order || !folio_test_large(folio)))
1e3be4856f49d55 Tarun Sahu 2023-06-12 837 return;
99132d24d76511f David Hildenbrand 2025-09-01 @838 VM_WARN_ON_ONCE(order > MAX_FOLIO_ORDER);
1e3be4856f49d55 Tarun Sahu 2023-06-12 839
ebc1baf5c9b46c2 Matthew Wilcox (Oracle 2023-08-16 840) folio->_flags_1 = (folio->_flags_1 & ~0xffUL) | order;
4996fc547f5b49f David Hildenbrand 2025-03-03 841 #ifdef NR_PAGES_IN_LARGE_FOLIO
4996fc547f5b49f David Hildenbrand 2025-03-03 842 folio->_nr_pages = 1U << order;
1e3be4856f49d55 Tarun Sahu 2023-06-12 843 #endif
1e3be4856f49d55 Tarun Sahu 2023-06-12 844 }
1e3be4856f49d55 Tarun Sahu 2023-06-12 845
:::::: The code at line 838 was first introduced by commit
:::::: 99132d24d76511f0f6ded2e25448765b632794aa mm: sanity-check maximum folio size in folio_set_order()
:::::: TO: David Hildenbrand <david@redhat.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-02 9:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 9:18 [harry:kmalloc-no-objext-rfc-v1r2 3/3] mm/internal.h:838:26: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 17179869184 to 0 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox