diff options
author | Namhyung Kim <namhyung@kernel.org> | 2024-10-11 02:25:05 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-16 19:21:18 +0300 |
commit | a496d0cdc84d81fbfd2026ef41c8ae9385d01fbb (patch) | |
tree | f13f8b1d43a4c52e13ad58fea028a40574ac88d0 /kernel/bpf/arraymap.c | |
parent | a992d7a3979120fbd7c13435d27b3da8d9ed095a (diff) | |
download | linux-a496d0cdc84d81fbfd2026ef41c8ae9385d01fbb.tar.xz |
selftests/bpf: Add a test for kmem_cache_iter
The test traverses all slab caches using the kmem_cache_iter and save
the data into slab_result array map. And check if current task's
pointer is from "task_struct" slab cache using bpf_get_kmem_cache().
Also compare the result array with /proc/slabinfo if available (when
CONFIG_SLUB_DEBUG is on). Note that many of the fields in the slabinfo
are transient, so it only compares the name and objsize fields.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20241010232505.1339892-4-namhyung@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions