From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.226.149.38 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794784251; b=ZjNMIBgSv6zkbQmAovgI8DcjlNBYQ8ZQVlvN4VKnrWUUIShC3FbQ4NpFzvNWXC55U14m T0yS09MYKKaELq0IeouCVy5SJLY7BDrzJGHIRid/qbAa+dHk0+GJOI4CyPqXGof9zdHxq KuFC0APJ/c9KqTQiZdTBO3JqK6Z0JKr5hwBW0Niahll3LiPCb/Ihdb3iJZlKZrq+LqXgI 1ujaRhjehWoX/nAVH8O77yTICqz1tgU9hw8ujeTJo4Z86mSI+s1UgsRALuwTuyybL2+pj zu4852j53TwO0hLHc4GkTfXS34z5soGOCt/oG9h7nNd7APtv0qraCc7JP7bhP9lpUbg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794784251; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Message-ID: Date:MIME-Version:User-Agent:From:Subject:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=Y2c4GuntC+J+u1XdIe8/YlwOw+mNu6OQYE3WM0aA4Sw=; b=J3Dt2odrs8KBvmp4J5tEnBrpOnT3+QuVEmJTZdEs0SXlcZXSotg1qJQ/ditSegV8R21F J51KvqPv5wRwver+QtUKcj8Ljq7BNSaQLjImElC2pUFwpCwzXyHjNZ55rqiFL/Y/60kCd fyYqTCPNPV5iKg/ziczGOlA1Xr6IbzjnwJ5hCGZrbQQlIL53ONJQqOUBD+hCTyRxP6bw4 Qow/v3D0CbL7rV3TRn7MjVuaOyQDPHLobOlCeh94fe1sZHBrGHsj+YP7RK0j7jSbHkx13 fiyZsne+ZtsvR8hx33yUTXjEhazImVq2j9AtfmFK1vCVtZeBGBxTINTH6YmriWlxHmw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=Y5kqtfjb; arc=none smtp.remote-ip=185.226.149.38 Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [185.226.149.38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD002606A31F; Sun, 15 Nov 2026 23:10:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD002606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=Y5kqtfjb Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1xSjMb-00FK8o-Mj; Mon, 16 Nov 2026 00:10:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Cc:To:Subject:From:MIME-Version:Date:Message-ID; bh=Y2c4GuntC+J+u1XdIe8/YlwOw+mNu6OQYE3WM0aA4Sw=; b=Y5kqtfjbJEBZsunJyvYzYSuOKJ x4GqsvQFHvgz6aMwDH35pjfmNTCxYUppfB+rnK63mUjpLQWszSGSzqnWenkREZ98QWq0quF1sByHE ZlzY9j6508J9K+z3CGvJvjvCdIzjVKa3UoLSnstBqpQQ8BI7ggksAIB/AsGYhWiB2s1S+46SThI5s HeuMc00fyAyAt83o3Qd3TJnKjU6o7Or5v+fBiLyGEeZ1j5sb3tSOVFUqwp8o0WuoWjqiqFzqOrbKh AeQo30VTE0YXV9+3O8kohQd3lf1omZmHB94dTmmsdwlvARbC2IEyq0fDDMRMctSMFZh+enWO9CUxW zu2hz7oQ==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1xSjMN-0001t3-8N; Mon, 16 Nov 2026 00:10:07 +0100 Received: by submission03.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) id 1xSjML-000piU-I1; Mon, 16 Nov 2026 00:10:05 +0100 Message-ID: Date: Mon, 16 Nov 2026 00:10:03 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Michal Luczaj Subject: Re: [PATCH bpf-next v3 0/8] bpf, sockmap: Restrict iter-context sockmap updates to sockmap iterators To: Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , Shuah Khan , John Fastabend , Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , Willem de Bruijn , Jakub Sitnicki , Jiayuan Chen , "David S. Miller" , Jakub Kicinski , Simon Horman , Jonathan Corbet , Shuah Khan , Randy Dunlap , Stanislav Fomichev Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, Sashiko References: <20261107-sockmap-update-limit-iter-v3-0-7c0bad1ad036@rbox.co> Content-Language: pl-PL, en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/14/26 19:45, Alexei Starovoitov wrote: > On Sat Nov 7, 2026 at 5:58 PM UTC, Michal Luczaj wrote: >> Follow-up to Sashiko's report [1] and the decision to restrict which >> iterator may perform sockmap updates [2]. Series started short: remove >> about-to-be-stale test, restrict updates, add a negative test. Then it >> expanded: mark bpf_iter__sockmap::sk as PTR_TRUSTED, restrict >> bpf_sock_destroy() callers to iter/{tcp,udp}, few little tweaks. >> >> [1]: https://msgid.link/20260626205814.BAC3C1F000E9@smtp.kernel.org >> [2]: https://msgid.link/87echn2fhd.fsf@cloudflare.com >> >> Signed-off-by: Michal Luczaj >> --- >> Changes in v3: >> - Drop RFC prefix >> - Update bpf_iter_reg::feature docs >> - Fix tcp_request_sock BTF build error >> - Restrict allowed callers of bpf_sock_destroy() to iter/{tcp,udp} (Alexei) >> - Link to v2: https://patch.msgid.link/20261102-sockmap-update-limit-iter-v2-0-e96a63c43b39@rbox.co > > Sorry for the delay. Applied. No problem, thanks. To follow up on bpf_iter__unix::unix_sk, looks like there's a single helper that will become unusable from iter/unix (once plain-PTR_TO_BTF_ID is gone): bpf_get_socket_cookie(). PTR_TRUSTED then? Michal