From: Chris Mason <clm@meta.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: bot+bpf-ci@kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, inwardvessel@gmail.com,
ast@kernel.org, daniel@iogearbox.net, shakeel.butt@linux.dev,
mhocko@kernel.org, hannes@cmpxchg.org, andrii@kernel.org,
martin.lau@kernel.org, eddyz87@gmail.com,
yonghong.song@linux.dev, ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v2 5/7] mm: introduce BPF kfunc to access memory events
Date: Tue, 23 Dec 2025 09:09:35 -0500 [thread overview]
Message-ID: <23c71e42-7da8-42ed-a93b-0d81dca99f3e@meta.com> (raw)
In-Reply-To: <87pl862m0w.fsf@linux.dev>
On 12/22/25 5:23 PM, Roman Gushchin wrote:
> Chris Mason <clm@meta.com> writes:
>
>> On 12/20/25 1:43 PM, Roman Gushchin wrote:
>>>>> No, the bpf verifier enforces event > 0.
>>>>> It's a false positive.
>>>>
>>>> I'll add some words here to the bpf prompts, thanks Roman.
>>>
>>> I'll try to play with it too, hopefully we can fix it.
>>>
>>
>> https://github.com/masoncl/review-prompts/commit/fcc3bf704798f6be64cbb2e28b05a5c91eee9c7b
>
> Hi Chris!
>
> I'm sorry, apparently I was dead wrong and overestimated the bpf
> verifier (and ai was correct, lol). Somebody told me that enums
> are fully covered as a feedback to an earlier version and I didn't
> check.
>
> In reality the verifier doesn't guarantee the correctness of the value
> passed as an enum, only that it's a u32. So we need to check the value.
> I've added necessarily checks in v3 of my patchset. It passes the local
> ai review without your latest change. Please, revert it.
>
> Thanks and sorry for the hassle
Thanks Roman, I adjusted the prompt changes and looked harder for proof
of exactly what checks are done.
-chris
next prev parent reply other threads:[~2025-12-23 14:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 4:12 [PATCH bpf-next v2 0/7] mm: bpf kfuncs to access memcg data Roman Gushchin
2025-12-20 4:12 ` [PATCH bpf-next v2 1/7] mm: declare memcg_page_state_output() in memcontrol.h Roman Gushchin
2025-12-20 4:12 ` [PATCH bpf-next v2 2/7] mm: introduce BPF kfuncs to deal with memcg pointers Roman Gushchin
2025-12-20 5:20 ` Shakeel Butt
2025-12-22 0:39 ` Alexei Starovoitov
2025-12-20 4:12 ` [PATCH bpf-next v2 3/7] mm: introduce bpf_get_root_mem_cgroup() BPF kfunc Roman Gushchin
2025-12-20 5:21 ` Shakeel Butt
2025-12-20 4:12 ` [PATCH bpf-next v2 4/7] mm: introduce BPF kfuncs to access memcg statistics and events Roman Gushchin
2025-12-20 4:29 ` bot+bpf-ci
2025-12-20 4:39 ` Roman Gushchin
2025-12-20 5:22 ` Shakeel Butt
2025-12-20 4:12 ` [PATCH bpf-next v2 5/7] mm: introduce BPF kfunc to access memory events Roman Gushchin
2025-12-20 4:29 ` bot+bpf-ci
2025-12-20 4:41 ` Roman Gushchin
2025-12-20 13:19 ` Chris Mason
2025-12-20 18:43 ` Roman Gushchin
2025-12-20 19:59 ` Chris Mason
2025-12-22 22:23 ` Roman Gushchin
2025-12-23 14:09 ` Chris Mason [this message]
2025-12-22 0:49 ` Alexei Starovoitov
2025-12-22 0:51 ` Alexei Starovoitov
2025-12-20 4:12 ` [PATCH bpf-next v2 6/7] bpf: selftests: selftests for memcg stat kfuncs Roman Gushchin
2025-12-20 5:23 ` Shakeel Butt
2025-12-20 4:12 ` [PATCH bpf-next v2 7/7] MAINTAINERS: add an entry for MM BPF extensions Roman Gushchin
2025-12-20 5:26 ` Shakeel Butt
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=23c71e42-7da8-42ed-a93b-0d81dca99f3e@meta.com \
--to=clm@meta.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=ihor.solodrai@linux.dev \
--cc=inwardvessel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=martin.lau@kernel.org \
--cc=mhocko@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=yonghong.song@linux.dev \
/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