Re: [PATCH bpf-next 2/3] bpf, sockmap: Restrict iter-context sockmap updates to iter/sockmap

From: Alexei Starovoitov

Date: Sat Oct 31 2026 - 21:28:26 EST


On Wed, Oct 21, 2026 at 04:12 AM Michal Luczaj <mhal@xxxxxxx> wrote:

sorry for delay.

> But, if I understand correctly, the removal of plain PTR_TO_BTF_ID will
> make pointers like `peer` inaccessible to helpers. And we just accept progs
> have to deal with potentially stale data, e.g. the value of sk_shutdown.

Right. Then the lock can go.

> Ah, sure. So the same bit for unix_reg_info left for later?

Yes. iter/unix cannot update sockmap after this patch.

> I've noticed commit 7cc639dc45c5 ("bpf: Don't take an extension for an
> iterator program") got merged. Should I post v2 with the env->prog->type
> check dropped or you guys don't want to restrict iters anymore?

The former. We still want it.
bpf-next doesn't close during merge window. Only people that
can process patches get busier.
Pls send the PTR_TRUSTED part in v2.

I'd also limit tracing_iter_filter() to iter/tcp and iter/udp.