* [vbabka:slab-fms-cleanup 2/4] mm/slab.h:107:15: error: static assertion failed due to requirement 'sizeof(struct slab) <= sizeof(struct page)': sizeof(struct slab) <= sizeof(struct page)
@ 2025-11-04 20:50 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-04 20:50 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-fms-cleanup
head: e401df7388463ed094dca0ba9c7bac58b1ee4cc7
commit: 382037dcfead97fb0a66368b8237220a7f4a661b [2/4] slab: move counters union to freelist_aba_t
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251105/202511050409.LJTnpEfF-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d2625a438020ad35330cda29c3def102c1687b1b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511050409.LJTnpEfF-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/202511050409.LJTnpEfF-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/mempool.c:21:
>> mm/slab.h:107:15: error: static assertion failed due to requirement 'sizeof(struct slab) <= sizeof(struct page)': sizeof(struct slab) <= sizeof(struct page)
107 | static_assert(sizeof(struct slab) <= sizeof(struct page));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
mm/slab.h:107:35: note: expression evaluates to '64 <= 56'
107 | static_assert(sizeof(struct slab) <= sizeof(struct page));
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
1 error generated.
vim +107 mm/slab.h
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 95)
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 96) #define SLAB_MATCH(pg, sl) \
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 97) static_assert(offsetof(struct page, pg) == offsetof(struct slab, sl))
30908096dd8d79 Matthew Wilcox (Oracle 2025-06-11 98) SLAB_MATCH(flags, flags);
130d4df57390a2 Vlastimil Babka 2022-08-26 99 SLAB_MATCH(compound_head, slab_cache); /* Ensure bit 0 is clear */
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 100) SLAB_MATCH(_refcount, __page_refcount);
a52c6330ff2fe1 Alex Shi (Tencent 2024-07-12 101) #ifdef CONFIG_MEMCG
21c690a349baab Suren Baghdasaryan 2024-03-21 102 SLAB_MATCH(memcg_data, obj_exts);
a52c6330ff2fe1 Alex Shi (Tencent 2024-07-12 103) #elif defined(CONFIG_SLAB_OBJ_EXT)
a52c6330ff2fe1 Alex Shi (Tencent 2024-07-12 104) SLAB_MATCH(_unused_slab_obj_exts, obj_exts);
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 105) #endif
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 106) #undef SLAB_MATCH
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 @107) static_assert(sizeof(struct slab) <= sizeof(struct page));
a9e0b9f27266d4 Vlastimil Babka 2023-10-02 108 #if defined(system_has_freelist_aba)
6801be4f2653e5 Peter Zijlstra 2023-05-31 109 static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(freelist_aba_t)));
130d4df57390a2 Vlastimil Babka 2022-08-26 110 #endif
d122019bf061cc Matthew Wilcox (Oracle 2021-10-04 111)
:::::: The code at line 107 was first introduced by commit
:::::: d122019bf061cccc4583eb9ad40bf58c2fe517be mm: Split slab into its own type
:::::: TO: Matthew Wilcox (Oracle) <willy@infradead.org>
:::::: CC: Vlastimil Babka <vbabka@suse.cz>
--
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:[~2025-11-04 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 20:50 [vbabka:slab-fms-cleanup 2/4] mm/slab.h:107:15: error: static assertion failed due to requirement 'sizeof(struct slab) <= sizeof(struct page)': sizeof(struct slab) <= sizeof(struct page) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.