Message ID | 20230124160802.1122124-3-void@manifault.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2243697wrn; Tue, 24 Jan 2023 08:21:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXsaex0cAekVlQrzaHOEkgSjm25C1ZZZbi1wWjDVDzDufNa9cvfJe7Ny1KJCuzUeSNGgnvSD X-Received: by 2002:a17:906:94d0:b0:7c4:f0b5:fedc with SMTP id d16-20020a17090694d000b007c4f0b5fedcmr30257280ejy.65.1674577270942; Tue, 24 Jan 2023 08:21:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674577270; cv=none; d=google.com; s=arc-20160816; b=vhmwKZqNoN025whOaAYQFB5/swAwvAR2hBW2azHkll7bQBjk4T7Dc89B4TRRv63VzZ 904k5ArLF1Y6lqM4xMVxEA+v7MXhydisw9iF09BdiMGexqJzDAANed7Xv8qH1uHBhHBT 6BNiL/ASmQdCy5DGPnUfZthTIHLIVMtTHqwHsjG7LgbWxQ+I6axl8Z6NoEMFsAcgF3Qr fOmI0G7OCbfWl/gl2FZ7VG84Delf/f7l5+FabFv5R7pSShVndNofbnaAGv0C7jkI/tSh kkEbZT0ToihlMPmsClwoOX7mFbk8hEJAltiwbqn+2zM9DhQrTCIwCwl9bxlEP31hkiGb JtxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/fu5eVF7dMpmGGWY5c48C3xPPttDeaZkjkMTCdf0Gr0=; b=HToyJxaazfDpEX2HMd1QeUEGVjKL2vT/aVDPzD471MH/nAXpOmXeruR3rZlFZtSfMs gMDNk17Ievfi02jKfS8PWBCkd2P7CDM3SzfOUD2Xc+fQkiij8DqS/JgVon+lNpvZ48LX gBi6cx3/9mz1p70+IKzmXwOsG9OcmJpMm40U0hwzhGhxNdfPUWoiYyiHqOX5wAJ5u2XF IayeXSN3uPbRoY4XN9bi/oPlLZHhtfMp/OMbW3Ozv1/RWsaHtCFXKhKfiVhnRMjK3Iew sZTWsLX7E+tEW6FUBwDd09L+yfv2cWQErESz8i0bl8Gg3QA55fKYOZCFLGgVAHZqtl8X lkhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ft21-20020a170907801500b0084d44edc334si2432680ejc.204.2023.01.24.08.20.45; Tue, 24 Jan 2023 08:21:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233868AbjAXQJe (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 11:09:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233741AbjAXQJa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 11:09:30 -0500 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17B8D4A1EB; Tue, 24 Jan 2023 08:09:29 -0800 (PST) Received: by mail-qt1-f181.google.com with SMTP id s4so13435257qtx.6; Tue, 24 Jan 2023 08:09:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/fu5eVF7dMpmGGWY5c48C3xPPttDeaZkjkMTCdf0Gr0=; b=1wI9tfI1qOh+StW0HIzmBcpQjt4X50Bwe8clhM5U0u8nmVfAdPnn9E2PBVeEiyYn5V BICYZwGISQaVg/IrkkkohvPSreQJ3uvYNFw4zA7sud5zFpMwbrwnO2oeb0grRsr6Z1Gd PKAV6IzWT1TyOs+cHPlVqm1oPNsFEsaUzbfsMIlEqHe4OP4pTKv7Z2aAKjMjmsf97PBO 5n4L0MepveEDjuprFgEvSIiIfedtwi9yVEgZxluibXfoAUZ23qhsCpY2f1TJL9opVvV3 le7e1K86UIb0OlN4L6nKOvxAs80NHBScyISAGzEeSd1VKMbLMIoUjEYEJT5ze+SzmTKN QbFg== X-Gm-Message-State: AFqh2kpQgjrBdMrQE2CgiiTJZLTrooguv4VHuMnRHXUkQTgHsKgtFOaW vOY9KQwLHIuU9ySfs+IZwW0SNsN0sPHGViAA X-Received: by 2002:ac8:4c84:0:b0:3b6:31e2:f537 with SMTP id j4-20020ac84c84000000b003b631e2f537mr37609803qtv.8.1674576567725; Tue, 24 Jan 2023 08:09:27 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:93a0]) by smtp.gmail.com with ESMTPSA id m15-20020aed27cf000000b003afbf704c7csm1492934qtg.24.2023.01.24.08.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 08:09:27 -0800 (PST) From: David Vernet <void@manifault.com> To: bpf@vger.kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@meta.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, tj@kernel.org Subject: [PATCH bpf-next v2 2/4] libbpf: Support sleepable struct_ops.s section Date: Tue, 24 Jan 2023 10:08:00 -0600 Message-Id: <20230124160802.1122124-3-void@manifault.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230124160802.1122124-1-void@manifault.com> References: <20230124160802.1122124-1-void@manifault.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755921536391076844?= X-GMAIL-MSGID: =?utf-8?q?1755921536391076844?= |
Series |
Enable struct_ops programs to be sleepable
|
|
Commit Message
David Vernet
Jan. 24, 2023, 4:08 p.m. UTC
In a prior change, the verifier was updated to support sleepable
BPF_PROG_TYPE_STRUCT_OPS programs. A caller could set the program as
sleepable with bpf_program__set_flags(), but it would be more ergonomic
and more in-line with other sleepable program types if we supported
suffixing a struct_ops section name with .s to indicate that it's
sleepable.
Signed-off-by: David Vernet <void@manifault.com>
---
tools/lib/bpf/libbpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 27d9faa80471..eed5cec6f510 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -8605,6 +8605,7 @@ static const struct bpf_sec_def section_defs[] = { SEC_DEF("cgroup/setsockopt", CGROUP_SOCKOPT, BPF_CGROUP_SETSOCKOPT, SEC_ATTACHABLE), SEC_DEF("cgroup/dev", CGROUP_DEVICE, BPF_CGROUP_DEVICE, SEC_ATTACHABLE_OPT), SEC_DEF("struct_ops+", STRUCT_OPS, 0, SEC_NONE), + SEC_DEF("struct_ops.s+", STRUCT_OPS, 0, SEC_SLEEPABLE), SEC_DEF("sk_lookup", SK_LOOKUP, BPF_SK_LOOKUP, SEC_ATTACHABLE), };