Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6321239rdb; Thu, 14 Dec 2023 15:06:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf1FWZ1+d7kRVEvkF+Mw/edAQkFVL5SV4wl3b+FDleFtxroH6ALDRoPoxHBSObSUtjl+Ij X-Received: by 2002:a05:620a:108b:b0:77e:ffae:5f01 with SMTP id g11-20020a05620a108b00b0077effae5f01mr11304205qkk.139.1702595196008; Thu, 14 Dec 2023 15:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702595195; cv=none; d=google.com; s=arc-20160816; b=WgF+VN0IL8ZaU7BoOkrOA/rRQlvDCEJOYPHn7c7les31UP6XWHpADPnbx97D9QKZ4k NOB7jjh81alwpxbbVdK8og2S5NcmlALm03x/ApyXTjvYindsRSHuRfPzqOaSd4Xmn1/q OKxWLWgsSlTUAjGbl8V98myOpAODOtIkFGUSk2+haV0gCqN6XUHNSZUsJabrK+HkP+D8 c5L139n4Z6A2z5y/8L4GABKznWrzYw4TwbW40T1clB+ffXrA/qvRHsZD7QStca5flOBA gNyw8tyEteNp2q/rvhpdrCTEcAz/ALabe+3jwtxIcsxARN4Omkyp4UcK3HRPDcmYi73o 3plg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :feedback-id:dkim-signature:dkim-signature; bh=mAOtBUxiev8A1klFiszd1tSU2jSZmoDYflzMLZxURoo=; fh=EnWR4QDysWpk0bRrd0TIuYSRNHacwQdd9M+jpFs6O5E=; b=TH8uAhBCjW/nSl8Cqj1VACHhLq9PI3ymkrYVIETHP+GLmsXBMm8jg4VXAJVJUfvppg LpZhjAohPyA9jDEVpFujnVpmVg40TEe/ZbOIcypAZRQ6Lq8uzDMw66m+SsX1E1SCzCh4 U5bqOzOjP3HCogdqWA9h8ny7x7PHuC/SLDHskME4U83LyqJEsvSKcQlT9uZI00CIvjfy vSHJcc9igVWuq1xwn37HWy6WvVNIWYkw+JRDo0oxhJsNuMz+AY9270IQRD0xAWheUejs eP50008GeXnIp5+7f2Ih714d33aSrWss5/2+TadvksuVqPH9/eg0pMY4di9zzfC2dCxA Q3/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=H5R9MNmL; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RiYYGLAi; spf=pass (google.com: domain of linux-kernel+bounces-219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-219-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k10-20020a05620a414a00b00773e6f8895fsi16571107qko.241.2023.12.14.15.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 15:06:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=H5R9MNmL; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RiYYGLAi; spf=pass (google.com: domain of linux-kernel+bounces-219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-219-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BDB591C21E6F for ; Thu, 14 Dec 2023 23:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD1AA6E588; Thu, 14 Dec 2023 23:06:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="H5R9MNmL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RiYYGLAi" X-Original-To: linux-kernel@vger.kernel.org Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 774EF66AC2; Thu, 14 Dec 2023 23:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dxuuu.xyz Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 10BD53200AD1; Thu, 14 Dec 2023 17:56:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 14 Dec 2023 17:56:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1702594599; x=1702680999; bh=mAOtBUxiev8A1klFiszd1 tSU2jSZmoDYflzMLZxURoo=; b=H5R9MNmL2zOf0n2xWsNYMU41KsDdpWzjXeRDj mvW9PKiduGR+64G1AB5NPGQmE+HgjjLZMKHxw8hK5HU/gISpr/y85tV2+K0PaJU/ KMEGr476aQB+lcchXd5jDtx6bu517RnMTMWYtUOifiAQHt/uTcv3vFY5Iiau19i8 15Ef/QSIAeulNlpxzFPU1HhMN1V5NQyHb7yvklfn7exuftT9NBYFgaBF2Mb8mNeb 49BnkgvdgmsP75UIsQmedQ1neznrO1wmyaXyx1t1xvD74f/Js7Tr+AQGGcCwrlxt pfwNK82GfQ6iv3hMIgoaYQhPd4Px4vQ3sMvGrlMomC2FPBIgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1702594599; x=1702680999; bh=mAOtBUxiev8A1klFiszd1tSU2jSZ moDYflzMLZxURoo=; b=RiYYGLAiuTtKuPBetHDYryXre7VYTFSn4Pyq3Iz+/ps4 MmRQTcJ2p+LnzOhsDys9VfWQlqW3Lm//ViXw7kr6JwcnPEdyakiLyJs5LAUwwcnP 734xUPatO0Xs+CoQtCnWnOdcHggwlgQz8e8mCUOQuZTfWKxV7PXmxg3V7WFOJRzJ Ahvj4WXrb3aMmFRQTZHyI+hri5z0g0iPyAMn/15wLTkir4hyu063UOVBXkFSVr1x bOWebBrPz2tZNctuTCI+DBphEpv+viNUE1RMEnz8R6MCp27EbMq80V5ykQQ/6yeq I3laUnvnQtOFq8Pu/deZm+CYvrhUQgI01Vnkd7nIbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddttddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf fufffkofgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegugihu segugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpeeifffgledvffeitdeljedvte effeeivdefheeiveevjeduieeigfetieevieffffenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Dec 2023 17:56:38 -0500 (EST) From: Daniel Xu To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, memxor@gmail.com Subject: [PATCH bpf-next 0/3] Various BPF exception improvements Date: Thu, 14 Dec 2023 15:56:24 -0700 Message-ID: X-Mailer: git-send-email 2.42.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two small improves to BPF exceptions in this patchset: 1. Allow throwing exceptions in XDP progs 2. Add some macros to help release references before throwing exceptions Note the macros are intended to be temporary, at least until BPF exception infra is able to automatically release acquired resources. Daniel Xu (3): bpf: xdp: Register generic_kfunc_set with XDP programs bpf: selftests: Add bpf_assert_if() and bpf_assert_with_if() macros bpf: selftests: Test bpf_assert_if() and bpf_assert_with_if() kernel/bpf/helpers.c | 1 + .../testing/selftests/bpf/bpf_experimental.h | 22 +++++++ .../selftests/bpf/prog_tests/exceptions.c | 5 ++ .../testing/selftests/bpf/progs/exceptions.c | 61 +++++++++++++++++++ 4 files changed, 89 insertions(+) -- 2.42.1