From: kernel test robot <lkp@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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)
Date: Wed, 5 Nov 2025 04:50:00 +0800 [thread overview]
Message-ID: <202511050409.LJTnpEfF-lkp@intel.com> (raw)
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
reply other threads:[~2025-11-04 20:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202511050409.LJTnpEfF-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox