Re: [PATCH bpf v2 2/2] bpf: Reject untrusted pointers in refcount_acquire

"Kumar Kartikeya Dwivedi" <[email protected]> Mon, 03 Aug 2026 09:48:22 +0200
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On Mon Aug 3, 2026 at 9:44 AM CEST, Ning Ding wrote:
>> In addition, I would add a comment saying that the BPF_WRITE case for the
>> type_is_untrusted_ptr_alloc_obj() types was already rejected earlier, so this
>> check only permits reads on them.
>
> Thanks, I’m preparing the respin and will check every
> type_is_ptr_alloc_obj() caller to decide whether it should use the new
> stricter one or stay the same.

Sounds good. I'd still keep type_is_ptr_alloc_obj() as the naming for stricter
one, but auditing all users sounds good. On quick skim I don't think we need to
relax anything except this case.