Article View: linux.kernel.netdev
Article #9419[PATCH RFC v2 4/4] bpf: Mark bpf_iter__sockmap::sk as PTR_TRUSTED
From: Michal Luczaj
Date: Mon, 02 Nov 2026 01:16
Date: Mon, 02 Nov 2026 01:16
27 lines
9646 bytes
9646 bytes
In preparation for plain-PTR_TO_BTF_ID removal: allow calling bpf helpers
with sk provided by iter/sockmap.
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Link: https://msgid.link/DM92JCFA4X4U.30MTDH0KCPTJ@gmail.com
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/core/sock_map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock_map.c b/net/core/sock_map.c
index 057e2f3c0265..2a2a07372818 100644
--- a/net/core/sock_map.c
+++ b/net/core/sock_map.c
@@ -1989,7 +1989,7 @@ static struct bpf_iter_reg sock_map_iter_reg = {
{ offsetof(struct bpf_iter__sockmap, key),
PTR_TO_BUF | PTR_MAYBE_NULL | MEM_RDONLY },
{ offsetof(struct bpf_iter__sockmap, sk),
- PTR_TO_BTF_ID_OR_NULL },
+ PTR_TO_BTF_ID_OR_NULL | PTR_TRUSTED },
},
};
--
2.56.0
Technical Details
Message-ID:
<20261102-sockmap-update-limit-iter-v2-4-e96a63c43b39@rbox.co>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354411-linux-kernel-netdev=dewy.ruReferences:
<20261102-sockmap-update-limit-iter-v2-0-e96a63c43b39@rbox.co>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354411-linux-kernel-netdev=dewy.ru From: mhal@rbox.co (Michal Luczaj) Newsgroups: linux.kernel.netdev Subject: [PATCH RFC v2 4/4] bpf: Mark bpf_iter__sockmap::sk as PTR_TRUSTED Date: Mon, 02 Nov 2026 02:16:01 +0100 Organization: Usenet Network Message-ID: <20261102-sockmap-update-limit-iter-v2-4-e96a63c43b39@rbox.co> References: <20261102-sockmap-update-limit-iter-v2-0-e96a63c43b39@rbox.co> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2817378"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:D3QCDJ4AEnmBiXwt99LmfeZ8JGw= sha256:ng73UaL0IE7zNzUThX1rbq3aRK/VVnyH3ys9XMP5nzU= sha1:W1t+BJrq46pOosiGzZrgGnFhdds= sha256:l0+e2hLZfDG8nxaySdcuF/tS4JnvCeXqr6elYdEdpuM= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 229191123E7; Mon, 2 Nov 2026 04:20:08 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.047 X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=rbox.co X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RmvKqNmn4KBn; Mon, 2 Nov 2026 04:20:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-354411-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=rbox.co X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 4D18F10FB99; Mon, 2 Nov 2026 04:19:53 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 3B0053269E; Mon, 2 Nov 2026 01:18:28 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793582303; b=qPNbyH1emprDfmBkwLtBVUeNayDy1aGYZuXzR6b7TjVhXA6hvYDf4jZuf8wkjAi8Pk7L mYEuB/Rxp1ltwvvK+Eu0ImYEEYT4ndXcvRjQ3F/AdbMF7kaGQ50g/snQ1I8gtsdHVopnV p12PA/jmph3y5/UwgTSlGZIvjBysI3AB9B9Sv0tZUTajdyimx5ux6wCeVC6YdVQGeTdq0 j/fNAHhe0RwcrXmPd4gssS3yulGwnWdM+0Lhz/lP3X9hYLDixEzhwWigpZXk9c3U+7tdz yWw5D558TJwW3YEPDKYi97bv6TovCmXlR/SJvEkpvdmA10vnvq+u++U2MpQBRM7S8vg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793582303; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received: Received:From:Date:Subject:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer; bh=abDysjfJOJSeYcrksOHfSG7PBUExgzQghoPikxkeJYw=; b=dGARy5S0pEQ6RTAu1qR+mQqxJcGqAKzddZB8VMrL83125Quq37hkAO7A1AIBXP+5qKvD uED822Z3H36wAEUgQcr+dd6TG83yDWeA1BdDW2tAZX1oUAB1TgBN5J4TRYTS0i32n5YuP HkloNkJb66H8zY1B55LQfGnkHV9UOMzRngLfoqpjXlHIrmQlwHRRcIt7J2y2u12SplrlC CdATZ9UzQsc+NDpsL9hCYV3PUTF3zwc16nF0qzRJUsLFqwhRGs8uHlHd/yR2DWle4JhC/ 4r88zxqDSfqYaCcm8o6xR/OtBjkz6N37cLVocNrrjz4pM0ubo92BpKd5exJ9yaMorbg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=QEP3kDFT; dmarc=pass header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E950960A261B; Mon, 2 Nov 2026 01:18:22 +0000 (UTC) X-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=QEP3kDFT X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.226.149.38 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793582302; b=lmp0vH6cuHonB3wxwWZjfzWsaVEKiDCFdzjzGGuSiKLnpmBt/VM3zaBrwJyO4Ob5tudo vZ/sKYJ9/YJ3B/4+F5LGQ8cD9WhhCWGwWW0lZrX0j8aAbRtAMz43iyDE+9Ku9skgw3pY9 PgSSifculq21j+Nggtk200neYKKs3CRy1I8tQUYZICiLFXtwTn/dL7TaOJGq+lqs3wd38 59ZuumrSkEWAw/33B3YUDqh0cFyIfD++mXh+OLl6wc8Ts6ySYG9k+sGZ3PxNW/7TdQkgy Uj78BIVD4+7uTPpVrNVmKqdDO8CncQPibWntvLG7m+wMwT647BzGRwA9VVm7F+6tkPA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793582302; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=abDysjfJOJSeYcrksOHfSG7PBUExgzQghoPikxkeJYw=; b=NPkwBRlsJMT5/GMBckrhgJaJIpvZXo650xqgP8vsj/wiZqjRGwBAZQ+KGDP3kahFSaOk 6QtEGNVzgIxOXhSS4Aa6e3h5W/GpUV/VX5tdNIZnas5Hkz4sGtxKoK7c/9BrbUFBWtzDE TDpDoqKvyrKNG2K51Gbr2nd24CWZqqKic2ZRchKO42ctdfJRx0fvjEJPt8RR69Z7VTYNK +D3HxFBi5GS3548A7Pk2YCnVvfhu/f65YNF/qPIoOXn5itrr/HJZh65FzdhHc43n1BSob ogjxNOAYEksQp/C8jk+SipEYzwm4rw4GWUYQJczkdQ6kL3FBHtbEfUQ9dzy7sa2vJzw== X-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=QEP3kDFT; arc=none smtp.remote-ip=185.226.149.38 X-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 AB599606A32E; Mon, 2 Nov 2026 01:18:21 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AB599606A32E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co X-Received: from mailtransmit02.runbox ([10.9.9.162] 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 <mhal@rbox.co>) id 1xNggX-00AGXd-7L; Mon, 02 Nov 2026 02:18:05 +0100 X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From; bh=abDysjfJOJSeYcrksOHfSG7PBUExgzQghoPikxkeJYw=; b=QEP3kDFToa87gPnr8gtagi/Agu 7v3wk+Nv+ov+Aix46JRYvBB+goLTUmhDPZCxbYHbh7h4DS2RLiIfLmfSvDSrrPqEcTGMsq/tFKDCA 5ptVRBQRWQFyHr1UgsBYZDvJJoRWvoFSAvyRbhPLxI4PjLBEhp/I2ALMvP3Z2XYHykR/PNggQCqYo FWIjrq/b9My0Rf1RzwXBVzxt8d36QiPNBL1qbALQbo5Y/cc5giD0kGtsNIsku9YljuKjBhexJ/PEY zc0J1d5Fg38QvVZ3KtJ4aS5Ir4qXOKFoHZ4hkYYIZI/pBciCpuh6vtZF2Ayvz+cWQPBuHxdfbSZvr DCaX7WUw==; X-Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from <mhal@rbox.co>) id 1xNggR-0005sF-OW; Mon, 02 Nov 2026 02:17:59 +0100 X-Received: by submission01.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) id 1xNggM-008JiF-Qe; Mon, 02 Nov 2026 02:17:54 +0100 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261102-sockmap-update-limit-iter-v2-0-e96a63c43b39@rbox.co> X-Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Luczaj <mhal@rbox.co>, netdev@vger.kernel.org X-Mailer: b4 0.15.2