* [ast-bpf:arena_slab 63/63] kernel/bpf/arena.c:963:15: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
@ 2026-05-20 4:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-20 4:37 UTC (permalink / raw)
To: Alexei Starovoitov; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git arena_slab
head: cb83f972bd005841d18f7bbff6e50d9bcbf0adf8
commit: cb83f972bd005841d18f7bbff6e50d9bcbf0adf8 [63/63] bpf,slab: Add slub-backed allocator for bpf_arena
config: x86_64-buildonly-randconfig-004 (https://download.01.org/0day-ci/archive/20260520/202605201210.BlkPbSSh-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260520/202605201210.BlkPbSSh-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/202605201210.BlkPbSSh-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/bpf/arena.c: In function 'arena_alloc_slab_page':
>> kernel/bpf/arena.c:963:15: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
963 | slab->obj_exts = (unsigned long)uaddr32 | BIT_ULL(63);
| ^~~~~~~~
| objects
In file included from <command-line>:
kernel/bpf/arena.c: In function 'arena_slab_uaddr32':
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof'
635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
| ^
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:369,
from include/uapi/linux/filter.h:9,
from include/linux/bpf.h:8,
from kernel/bpf/arena.c:3:
>> kernel/bpf/arena.c:974:47: error: 'const struct slab' has no member named 'obj_exts'; did you mean 'objects'?
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
kernel/bpf/arena.c:974:31: note: in expansion of macro 'READ_ONCE'
974 | unsigned long stash = READ_ONCE(slab->obj_exts);
| ^~~~~~~~~
kernel/bpf/arena.c: In function 'arena_free_slab_page':
kernel/bpf/arena.c:988:26: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:988:9: note: in expansion of macro 'WRITE_ONCE'
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~~~
kernel/bpf/arena.c:988:26: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:988:9: note: in expansion of macro 'WRITE_ONCE'
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~~~
kernel/bpf/arena.c:988:26: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:988:9: note: in expansion of macro 'WRITE_ONCE'
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~~~
kernel/bpf/arena.c:988:26: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/arena.c:988:9: note: in expansion of macro 'WRITE_ONCE'
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~~~
kernel/bpf/arena.c:988:26: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'?
988 | WRITE_ONCE(slab->obj_exts, 0);
| ^~~~~~~~
include/linux/compiler_types.h:679:23: note: in definition of macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:699:9: note: in expansion of macro '_compiletime_assert'
vim +963 kernel/bpf/arena.c
917
918 /*
919 * SLAB_BPF_ARENA support: each arena owns a set of kmem_cache buckets that
920 * back kmalloc-style alloc/free for BPF programs. Slab pages are drawn from
921 * the arena's page pool, but slub treats them as ordinary direct-map kernel
922 * memory (slab_address/virt_to_slab/freepointers all use direct-map VAs).
923 * The arena's vmalloc mapping is what BPF programs see; bpf_arena_alloc/free
924 * translate between direct-map and arena offset in O(1) by reading the slab
925 * page's arena uaddr32 stashed in slab->obj_exts.
926 */
927
928 static struct slab *arena_alloc_slab_page(void *arena_p, gfp_t flags, int node,
929 unsigned int order, bool allow_spin)
930 {
931 struct bpf_arena *arena = arena_p;
932 long ret_user_va;
933 u32 uaddr32;
934 void *kva;
935 struct page *page;
936 struct slab *slab;
937
938 if (order)
939 return NULL;
940
941 /* Propagate allow_spin to the arena page allocator; non-sleeping
942 * contexts (BPF NMI/irq-off) take the best-effort path.
943 */
944 ret_user_va = arena_alloc_pages(arena, 0, 1, node, allow_spin);
945 if (!ret_user_va)
946 return NULL;
947
948 uaddr32 = (u32)ret_user_va;
949 kva = (void *)(bpf_arena_get_kern_vm_start(arena) + uaddr32);
950
951 page = vmalloc_to_page(kva);
952 if (WARN_ON_ONCE(!page))
953 goto fail;
954
955 __SetPageSlab(page);
956 slab = page_slab(page);
957 /*
958 * Stash this slab page's arena offset in obj_exts. allocate_slab()
959 * skips init_slab_obj_exts() for SLAB_BPF_ARENA caches, so this
960 * survives until __free_slab(). High bit set as a presence sentinel
961 * (uaddr32 < 4GB so bit 63 is always free).
962 */
> 963 slab->obj_exts = (unsigned long)uaddr32 | BIT_ULL(63);
964 WRITE_ONCE(arena->slab_pages[uaddr32 >> PAGE_SHIFT], page);
965
966 return slab;
967 fail:
968 arena_free_pages(arena, uaddr32, 1, true);
969 return NULL;
970 }
971
972 static u32 arena_slab_uaddr32(const struct slab *slab)
973 {
> 974 unsigned long stash = READ_ONCE(slab->obj_exts);
975
976 if (WARN_ON_ONCE(!(stash & BIT_ULL(63))))
977 return 0;
978 return (u32)stash;
979 }
980
--
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-05-20 4:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 4:37 [ast-bpf:arena_slab 63/63] kernel/bpf/arena.c:963:15: error: 'struct slab' has no member named 'obj_exts'; did you mean 'objects'? 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.