From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E0312D0614; Fri, 13 Feb 2026 07:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967458; cv=none; b=UC4uD4oWIISvhi4MDFU1TZevZFTw6PGQ6B1H0DXn+LWynvdukV7f6Eredljox6THtJNtPSeKI7QXdw2diEr156CVQhD+PDcx4Ex29T2tY9PQ3I0WR7ti5Tu1oijoxrEzY4MDYWHV4Xg01w9xsZZd9xnwjMztDCEPDd5kD4cDsj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967458; c=relaxed/simple; bh=uySMJvyft9jtAkrDAcp3YGsuHvDvCEgMDRF46Oa4B0Y=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Ff49jPTW9zfezy+qnf9neTe6T/qrhIqOEWTFSoI+/dOzC8aO/JFk/X6SXHm9GUJByJkVxQG1kQjNAFnoluM0xWIiuyzv8x/DoziPxfYxxYBef+8o/EmCoaXLnJ50VSf2ulP4Da6KOx9Y1QSUiTI1UkDVcotP9F3lvowyPW/RpRw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=bLZRB+KC; arc=none smtp.client-ip=95.215.58.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bLZRB+KC" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770967445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VwNvFdIKZszOyx5SX4bymsUV474G0+X1JTSop6CJF0M=; b=bLZRB+KCujV6r+3tDxD/hCqTqrXaKPY5gKNVJCgqvm9HEhbrD39q8vpE7E4wD5kgiOVmdu eq3Sxy4rSM5H+g/vAMMjoAVUXltZTcZ7hYvyfJsPlHilNj02Y6e7JkSl0xQxzUDRmYi4BO fKZGFZsoa+VTnuaiC587gmVcpj4IImo= From: Hui Zhu 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@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next v2 0/3] Fix test_cgroup_iter_memcg issues found during back-porting Date: Fri, 13 Feb 2026 15:23:38 +0800 Message-ID: Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Hui Zhu While back-porting "mm: bpf kfuncs to access memcg data", I encountered issues with test_cgroup_iter_memcg, specifically in test_kmem. These patches are my fixes for the problems I encountered. Changelog: v2: According to the comments of JP Kobryn, added bpf_core_enum_value() usage in the BPF program to handle cross-kernel enum value differences at load-time instead of compile-time. Dropped the mm/memcontrol.c patch. Modified test_kmem handling: instead of skipping when nokmem is set, verify that kmem value is zero as expected. According to the comments of bot, fixed assertion message: changed "bpf_mem_cgroup_page_state" to "bpf_mem_cgroup_vm_events" for PGFAULT check. Hui Zhu (3): bpf: Use bpf_core_enum_value for stats in cgroup_iter_memcg selftests/bpf: Check bpf_mem_cgroup_page_state return value bpf: selftests: Skip kmem test when cgroup.memory=nokmem is set .../bpf/prog_tests/cgroup_iter_memcg.c | 42 +++++++++++++++++++ .../selftests/bpf/progs/cgroup_iter_memcg.c | 41 ++++++++++++++---- 2 files changed, 76 insertions(+), 7 deletions(-) -- 2.43.0