linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Fix test_cgroup_iter_memcg issues found during back-porting
@ 2026-02-12  8:23 Hui Zhu
  2026-02-12  8:23 ` [PATCH bpf-next 1/3] selftests/bpf: Check bpf_mem_cgroup_page_state return value Hui Zhu
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hui Zhu @ 2026-02-12  8:23 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt,
	Muchun Song, Andrew Morton, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan, Hui Zhu, JP Kobryn, cgroups,
	linux-mm, linux-kernel, bpf, linux-kselftest

From: Hui Zhu <zhuhui@kylinos.cn>

While back-porting "mm: bpf kfuncs to access memcg data", I
encountered issues with test_cgroup_iter_memcg, specifically
in test_kmem.

The test_cgroup_iter_memcg test would falsely pass when
bpf_mem_cgroup_page_state() failed due to incompatible enum
values across kernel versions. Additionally, test_kmem would
fail on systems with cgroup.memory=nokmem enabled.

This series addresses these issues:
1. Add return value checks for bpf_mem_cgroup_page_state()
2. Return error when accessing kmem with nokmem enabled
3. Skip test_kmem when cgroup.memory=nokmem is set

Hui Zhu (3):
  selftests/bpf: Check bpf_mem_cgroup_page_state return value
  mm/memcontrol: Return error when accessing kmem with nokmem
  selftests/bpf: Skip test_kmem when cgroup.memory=nokmem

 mm/memcontrol.c                               |  3 +-
 .../bpf/prog_tests/cgroup_iter_memcg.c        | 40 +++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletion(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-02-13  7:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-12  8:23 [PATCH bpf-next 0/3] Fix test_cgroup_iter_memcg issues found during back-porting Hui Zhu
2026-02-12  8:23 ` [PATCH bpf-next 1/3] selftests/bpf: Check bpf_mem_cgroup_page_state return value Hui Zhu
2026-02-12  8:50   ` bot+bpf-ci
2026-02-12  9:23     ` hui.zhu
2026-02-13  0:14   ` JP Kobryn
2026-02-13  7:29     ` hui.zhu
2026-02-12  8:23 ` [PATCH bpf-next 2/3] mm/memcontrol: Return error when accessing kmem with nokmem Hui Zhu
2026-02-13  0:38   ` JP Kobryn (Meta)
2026-02-12  8:23 ` [PATCH bpf-next 3/3] selftests/bpf: Skip test_kmem when cgroup.memory=nokmem Hui Zhu
2026-02-13  0:41   ` JP Kobryn (Meta)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox