Re: [PATCH bpf] bpf: Reject writes through untrusted allocated pointers

From: Ning Ding

Date: Mon Aug 03 2026 - 00:07:21 EST


> Why is this not enough? 'key' is scalar, but 'res' which is being written to is
> still a PTR_TO_BTF_ID with PTR_UNTRUSTED.

Ah, right. I was testing against Linus’ master, where that
PTR_UNTRUSTED write check is not present, and I missed that it had
already been added in bpf-next. That patch is not necessary.