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

From: Jiayuan Chen

Date: Sun Nov 08 2026 - 21:16:04 EST



On 11/8/26 1:58 AM, Michal Luczaj wrote:
> Among tracing progs, allow only iter/sockmap to update sockmaps and
> sockhashes. Previously, any BPF_TRACE_ITER program could perform these
> updates, which caused locking issues in specific scenarios [1][2][3]. This
> tightening is part of the broader effort to lock down the BPF API [4].
>
> [1]: commit 4d328dd69538 ("bpf, sockmap: Fix af_unix iter deadlock")
> [2]: commit 64c2f93fc325 ("bpf, sockmap: Take state lock for af_unix iter")
> [3]: https://msgid.link/87echn2fhd.fsf@xxxxxxxxxxxxxx
> [4]: https://msgid.link/akRZ_e7DJh2aP-2i@john-p8
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://msgid.link/20260626205814.BAC3C1F000E9@xxxxxxxxxxxxxxx
> Suggested-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>
> Signed-off-by: Michal Luczaj <mhal@xxxxxxx>


Reviewed-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>