Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4754938rwe; Mon, 17 Apr 2023 18:42:04 -0700 (PDT) X-Google-Smtp-Source: AKy350YL+UnOl6AJWlwGOVUh9pTp8v0QCIW0vA5XtizchL2+2uGPiFHgKNcxcxdGAoPorZYvRIAt X-Received: by 2002:a05:6a21:33aa:b0:ef:f44a:1a42 with SMTP id yy42-20020a056a2133aa00b000eff44a1a42mr5460494pzb.25.1681782124222; Mon, 17 Apr 2023 18:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681782124; cv=none; d=google.com; s=arc-20160816; b=x5onT6mLy2k3plYMmRUqhpVhWuOO62QFTJnc1MJHqhPfiJ4GjpLgu2cFfT/XlG15ar 0Zq4d8q/FIOSiXotdbVrVIismVmzY4S96Gc0qOJtQS1Nj2ixvKz4lAdddKIOhPCR3SMk BdScsIVdOuJQDU8IJ1mJA1LUcwRYBaRCA2CqAJtYvS9K3dSJVipg78dxniTnpcp9NREf pQwWgRcQuldgt3q62Yp3Lhv+KrjDbTRVLW4vfh2DnIp3MGC0Ymgx8d6B6Xthr486BGH8 WOAQXECY71ZcMl2kh3NOh8tG6OwOoUtgNcoeXFDUfVb59EYy05Yg4c0tv/gezMvootmK 8buA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=lsQkf1cfcx1tPqZWAOmJuqvsGQVDqkZnL5eNvi6K+GA=; b=zybP20JjdyjxwueC74BLAsoIcowQZF/0l21xVCEnqaYxoRfGYfStGbF9Yx8ctZ3MA9 izIw7lIxoFBrYdP3MKVSajY9eoMLSKRh/O19V4POe17C4SqLgCunfMYVx0AtgA+E+wnh 3FASIm5NOKJSu5Ue9Oa7bALLVyiNEwOOQxIrg4l54EliNhJztAWoZMNI5H6pS+FdVkxG fBftjCcQYuIf4G7pjH1RLYD/uC/B198ShXE9lWSCjykytK2M6k2lyktlZRei4TFU7sMx QKpaZWx87cNY+Crn9x5lsc251IBXEU+R4gtXp9tPz3utNaSlFuTBZwmsAQ7r4FJ84ZGx VQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=UQ9uxhJb; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020aa79a43000000b0063b1bfa94dasi8153666pfj.323.2023.04.17.18.41.51; Mon, 17 Apr 2023 18:42:04 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20221208 header.b=UQ9uxhJb; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbjDRBlX (ORCPT + 99 others); Mon, 17 Apr 2023 21:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjDRBlQ (ORCPT ); Mon, 17 Apr 2023 21:41:16 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F086A63 for ; Mon, 17 Apr 2023 18:41:03 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-54f69fb5cafso190541017b3.12 for ; Mon, 17 Apr 2023 18:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681782062; x=1684374062; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=lsQkf1cfcx1tPqZWAOmJuqvsGQVDqkZnL5eNvi6K+GA=; b=UQ9uxhJbkgCQxRon02p9V9Zp2euXuXeVILgWOJj+rbvZ3QD7E30qpSzuqQRtpHzIcs 8tnRPiCMZyAQmeuciCikVJLw4VTasapz/7TmXSqFJVxajgMpiDPL3jaC69UU0eF3Pmld suwPAwdtbxwHDIwMmZV1+ebFmsf+0c1mQqM0wqAbBAcWmTR/pu/B+pWRBe6CMDjEcF28 52pROSussOyzq+qdDWeLqKG/NteVXVxS9qOWASMLH+0EyOqr9kwiYoF84wPX73T5L1ct 9vIqWaFSNn9DOrA0aD+R+WbFQQl5+R6HM2rzlIC/vsjZJqWw523DmBw3bRNkdvwjG4sw pLVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681782062; x=1684374062; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lsQkf1cfcx1tPqZWAOmJuqvsGQVDqkZnL5eNvi6K+GA=; b=MYDpaAb1FGSm1tmEBadiDlrnmLgLqycgxMXAHINK1dYZDzKhY7+Hd5ktxp2Oy1N4GK ncPzwMxjBQAI8ybD8AlbuA8+U/CGpdKk45TWcoglbA5SsGdW7gN4EcK8YiIpFtSNoAEy 1O4tNe1ArLyqPnaQK1pDZS10PP7DD54KuAUVEh8Xcb1359bOdSTkDHAOutPeAWyI0Itz h8nf7iRxByUTwW//Swqeg2WeiD86S6DP7oaBTA1GQw35qKEE4giU8szAFh4nruV/b/+2 +nQ51S9dkmrbKMFHfd1qWdr/OfxjrqnANM4rLpll4tRkTYdHJYwg/7H1EitUj/xjharn rdtw== X-Gm-Message-State: AAQBX9cmV3vz/sP9EpYGYo9YtSIwYDP/HkqP0ULIXlXgu6pbhPtk/5pa R0LslPewxeq6y7Aovph1dgnLi24OGL8= X-Received: from drosen.mtv.corp.google.com ([2620:15c:211:201:e67a:98b0:942d:86aa]) (user=drosen job=sendgmr) by 2002:a81:c406:0:b0:54d:913b:c9e8 with SMTP id j6-20020a81c406000000b0054d913bc9e8mr10100712ywi.5.1681782062021; Mon, 17 Apr 2023 18:41:02 -0700 (PDT) Date: Mon, 17 Apr 2023 18:40:05 -0700 In-Reply-To: <20230418014037.2412394-1-drosen@google.com> Mime-Version: 1.0 References: <20230418014037.2412394-1-drosen@google.com> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog Message-ID: <20230418014037.2412394-6-drosen@google.com> Subject: [RFC PATCH v3 05/37] fuse-bpf: Update fuse side uapi From: Daniel Rosenberg To: Miklos Szeredi , bpf@vger.kernel.org, Alexei Starovoitov Cc: Amir Goldstein , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jonathan Corbet , Joanne Koong , Mykola Lysenko , kernel-team@android.com, Daniel Rosenberg , Paul Lawrence Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org Adds structures which will be used to inform fuse about what it is being stacked on top of. Once filters are in place, error_in will inform the post filter if the backing call returned an error. Signed-off-by: Daniel Rosenberg Signed-off-by: Paul Lawrence --- include/uapi/linux/fuse.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 1b9d0dfae72d..04d96f34e9a1 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h @@ -607,6 +607,29 @@ struct fuse_entry_out { struct fuse_attr attr; }; +#define FUSE_BPF_MAX_ENTRIES 2 + +enum fuse_bpf_type { + FUSE_ENTRY_BACKING = 1, + FUSE_ENTRY_BPF = 2, + FUSE_ENTRY_REMOVE_BACKING = 3, + FUSE_ENTRY_REMOVE_BPF = 4, +}; + +#define BPF_FUSE_NAME_MAX 15 + +struct fuse_bpf_entry_out { + uint32_t entry_type; + uint32_t unused; + union { + struct { + uint64_t unused2; + uint64_t fd; + }; + char name[BPF_FUSE_NAME_MAX + 1]; + }; +}; + struct fuse_forget_in { uint64_t nlookup; }; -- 2.40.0.634.g4ca3ef3211-goog