Re: [PATCH v1 02/14] bpf: mark struct oom_control's memcg field as TRUSTED_OR_NULL

From: Roman Gushchin
Date: Wed Aug 20 2025 - 18:32:28 EST


Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes:

> On Mon, 18 Aug 2025 at 19:01, Roman Gushchin <roman.gushchin@xxxxxxxxx> wrote:
>>
>> Struct oom_control is used to describe the OOM context.
>> It's memcg field defines the scope of OOM: it's NULL for global
>> OOMs and a valid memcg pointer for memcg-scoped OOMs.
>> Teach bpf verifier to recognize it as trusted or NULL pointer.
>> It will provide the bpf OOM handler a trusted memcg pointer,
>> which for example is required for iterating the memcg's subtree.
>>
>> Signed-off-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
>> ---
>
> Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>

Thanks!