Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp822840lqh; Thu, 28 Mar 2024 19:03:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtivDiKFhQ6+iZTBU/PVJ7yhJ7UMOp49LjdlHDZNDZejq7Cqe7KAqNXWbnFn30Q42UgVj3uWKAqjvR57tczTAc6csV2Eo7hU8Mee/RSA== X-Google-Smtp-Source: AGHT+IF9NUQyLh8PwnPSQBj6lTsrnKixVGQfpQsvHa/rJ0Tu/fzNB7EZJi6KnPqEM0ADgrlrMikT X-Received: by 2002:a17:903:247:b0:1e0:e2c2:5712 with SMTP id j7-20020a170903024700b001e0e2c25712mr1284228plh.3.1711677805292; Thu, 28 Mar 2024 19:03:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711677805; cv=pass; d=google.com; s=arc-20160816; b=oLkIa0PkQ1Qa+cs5CHH97MCok95Q+YNvn8G3J9relDchIWqAyVSow5fw8FxGdBSwr1 wu4/XcwAE4pw93V+v2GATIqQY+oqx7lxbjkBCynMGYFFAw9k+m+KR+EW6iPY08SBDKVk v4pSPVjKCr1GcPKLYukljA837xtJW326D5v/K+dwGuHzch/LAb6Fb2juzXphdJX11kn8 muIAhPIwRHqyTWVw3NtCKEQHiRFiBLJZ6ueQP0YN2dwhxWU+K0SPnUUA3qp2pYUnE3fp nyj/sa0/qhuRgypFSj6vGSy6J1FFUVbq8m+n2KfT+rycs1KSRKkK3Uaeqz0wFnEQ0VYr o5IQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=+fgPCyEdk35RPimkCV3pdmwq6y+0q0t2sbyu7i903QQ=; fh=MmxNK9WzzHk56W8Z6vMb7q8IXsX3sLR4w3ARFBn41bQ=; b=sNDuBfJh8jg59cl+883CFo0jdkUI4bJHCoZS8IWN1juP6jqEAM0Fuy5230nW7l1Iic ceNebt2kmUzg5gWzlJIar9tT+Q3FK3vXIRg64GPEnwBLz0T/Q7TKNg4HIII533w9Ug9D SGYLba+kKFA6CNls+VRQ6px8lfjaOsPALhIffV40fArw2yjexh0/Vu6Ua9XUqJ4mf7sn s6kNwJV4W9Bew61zkpixteBdmKAnwMpIB0eKqtJj1pxJb2JYjAgXiZ2k3LZwpM9tZPA4 3r5MWM43dZ0HXUna5TQIpZI9pihcQtORUciZKh0nGIY3SS8AuB08jRUhgxW0CW+iaJuo 86Pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g2VOdESG; arc=pass (i=1 spf=pass spfdomain=flex--drosen.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-124004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124004-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t13-20020a17090340cd00b001e0a22c7619si2552014pld.263.2024.03.28.19.03.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 19:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=g2VOdESG; arc=pass (i=1 spf=pass spfdomain=flex--drosen.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-124004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124004-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CC06289C58 for ; Fri, 29 Mar 2024 02:03:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E65326E2C3; Fri, 29 Mar 2024 01:54:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="g2VOdESG" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97AB02C69C for ; Fri, 29 Mar 2024 01:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711677297; cv=none; b=uMF//ce8VPlMXjJR8RkltBVVgFaEF5I45Ic/tUzyF7KmZOZCwnaz3I46TVBBrg0cnwMXpQ1PjvCJtsCAYiXpKJsgoXOqYXhlnHMhCAi1kKfodrleQGDr5/UI2AUUS3wfAB4CgNNaYr6oMZ5YqT2m9cwV33r7Sl9v2FdOA7nCfrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711677297; c=relaxed/simple; bh=pk9Ej0arFqeZkCMlr0ALuLSLryIAG82IwMSP2yyNpaA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Hn/1xDVtSNwY4ic1UdtdePqYFzqHbDT9F+KEfr+3QiPT7ejzb++r6pCDN0yAt5YlGvFIir1rj0MmXeMl5KjzFyU+SmY4MMeucXIwcsoHFxTVLQ4olmJRErbVmPmFHmYERc4GMqPZE2r6mcGQ9vvfQNmMd2rF7roIaL0Lig2L/Xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--drosen.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=g2VOdESG; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--drosen.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60cc00203faso29576037b3.2 for ; Thu, 28 Mar 2024 18:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711677294; x=1712282094; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+fgPCyEdk35RPimkCV3pdmwq6y+0q0t2sbyu7i903QQ=; b=g2VOdESG7aOUIisPtFkupRcX6ia+1Kfiecp2P94L9rUQd+vzrnMk5RPTbcZ0MzlgYC HXbIXoREjqZ4882v06Q0aoemrjFGyQ0PyJMRAof0xZsIWhLRGE9DVItTQvnG8oBVHhVE C4TlIcaVFaz2NNBUJj3Tr4JDQZMbEfF8xXeyDZiBGYRjz0JtIswu4QaqAfmnxKsKf4Jb nF+cS5hzqPyvlbaCgV5O+6kho+DVMdXmEHdXu7aT+xKU876MA9pILqfbB6tB7KTpwYgn YP1jmfssx1pGCOgX9kYZ6G0TPpj1TEQrN+F1e0FqxAywIivT9i9eqrZOns6l8Rf+Avwd LAcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711677294; x=1712282094; 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=+fgPCyEdk35RPimkCV3pdmwq6y+0q0t2sbyu7i903QQ=; b=bEDNgkxG7zj8yC1Z+lerhIf+thLhGwHj/5ctjCL73pJcezDeybB4lOtmbBaTMSlvK7 ZGZ7Z/IKWtNDu//rAi6bWCWkv6CNWQtdBG8K/eUHT4ZzG6s3xxxn2Ip3FXtaE6xCtRpH lPT5nc51XfTZQRMsORVkkJxIFcQY5B9dz2jbrYAmwm3dz6UEnlEOngBhqZWVoBs1Ip+P hLHNLlVYe0XjzLP3DS+y9mzmLwnS0mwEst3q9q3glTBwC1P9kUcsedBaTrbUNmvB1XG0 3gjhxzmm2ixV04ymeAYNwEL2WGXtj4XdATuCPcxRDOFRyFHCedSpDgGxKTjekxdjFXor ClEQ== X-Forwarded-Encrypted: i=1; AJvYcCUoqxcBtuECwVqRWtohDsVdrrZcj41Pa6V0ijvsnX0badd9GGxgK2iiPHfVfNlMc3dof7MYHEUj7104doyOC9OCJNaHngxsNCMgvfWE X-Gm-Message-State: AOJu0Yzd4wFktZsp8hrY+nsvw1zftpd1u/lmJQr2fL0HEUeua5Rr4j7g OsZloSrDvtD9ROYpRC8IncPvMhbXyjx8uqNDcOlzx2G9Gzks4JWhM8jwKfNjTcCaxxKycErsVfB igw== X-Received: from drosen.mtv.corp.google.com ([2620:15c:211:201:fcce:d6ab:804c:b94b]) (user=drosen job=sendgmr) by 2002:a0d:d9c8:0:b0:613:eb1a:6407 with SMTP id b191-20020a0dd9c8000000b00613eb1a6407mr266377ywe.9.1711677294719; Thu, 28 Mar 2024 18:54:54 -0700 (PDT) Date: Thu, 28 Mar 2024 18:53:39 -0700 In-Reply-To: <20240329015351.624249-1-drosen@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240329015351.624249-1-drosen@google.com> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240329015351.624249-25-drosen@google.com> Subject: [RFC PATCH v4 24/36] fuse-bpf: Add fuse-bpf constants 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 , Eduard Zingerman , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jonathan Corbet , Joanne Koong , Mykola Lysenko , Christian Brauner , kernel-team@android.com, Daniel Rosenberg Content-Type: text/plain; charset="UTF-8" This adds constants that fuse_op programs will rely on for communicating what action fuse should take next. Signed-off-by: Daniel Rosenberg --- include/uapi/linux/bpf.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 85ec7fc799d7..46c1a3e3166d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -7461,4 +7461,16 @@ struct bpf_iter_num { __u64 __opaque[1]; } __attribute__((aligned(8))); +/* Return Codes for Fuse BPF struct_op programs */ +#define BPF_FUSE_CONTINUE 0 +#define BPF_FUSE_USER 1 +#define BPF_FUSE_USER_PREFILTER 2 +#define BPF_FUSE_POSTFILTER 3 +#define BPF_FUSE_USER_POSTFILTER 4 + +/* Op Code Filter values for BPF Programs */ +#define FUSE_OPCODE_FILTER 0x0ffff +#define FUSE_PREFILTER 0x10000 +#define FUSE_POSTFILTER 0x20000 + #endif /* _UAPI__LINUX_BPF_H__ */ -- 2.44.0.478.gd926399ef9-goog