Hello,

On Mon, Aug 10, 2026 at 05:17:26PM -0700, JP Kobryn wrote:
...
> The get/put kfuncs above use KF_ACQUIRE/RELEASE so the verifier can
> reject memcg access after the put. Replacing them with a generic API
> would call for tracking a new lifetime relationship between the css and
> memcg (or other derived) pointer.

So, if you need css -> memcg casting, I think that can just be RCU
protected. In fact, even for the iteration and access, RCU protection
probably makes more sense then KF_ACQUIRE/RELEASE. It's simpler and less
overhead especially given that most bpf progs that people care about are
non-sleepable and already in RCU critical section anyway.

Thanks.

-- 
tejun

Reply via email to