From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>,
<paul@paul-moore.com>, <brauner@kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>,
<linux-security-module@vger.kernel.org>, <keescook@chromium.org>,
<kernel-team@meta.com>, <sargun@sargun.me>
Subject: [PATCH RFC bpf-next 0/3] BPF FS mount options parsing follow ups
Date: Thu, 7 Dec 2023 14:27:52 -0800 [thread overview]
Message-ID: <20231207222755.3920286-1-andrii@kernel.org> (raw)
Original BPF token patch set ([0]) added delegate_xxx mount options which
supported only special "any" value and hexadecimal bitmask. This patch set
attempts to make specifying and inspecting these mount options more
human-friendly by supporting string constants matching corresponding bpf_cmd,
bpf_map_type, bpf_prog_type, and bpf_attach_type enumerators.
This is an RFC patch set and I've only converted bpf_cmd enum to be generated
through reusable mapper macro. If the consensus is that this approach is the
way to go, adding similar support for three remaining enums is just a matter
of mundane mechanical conversion in UAPI header. Kernel-side logic for all
delegate_xxx mount options is completely generic already as implemented in
patch #1.
[0] https://patchwork.kernel.org/project/netdevbpf/list/?series=805707&state=*
Andrii Nakryiko (3):
bpf: add mapper macro for bpf_cmd enum
bpf: extend parsing logic for BPF FS delegate_cmds mount option
selftests/bpf: utilize string values for delegate_xxx mount options
include/uapi/linux/bpf.h | 81 +++++------
kernel/bpf/inode.c | 127 +++++++++++++-----
tools/include/uapi/linux/bpf.h | 81 +++++------
.../testing/selftests/bpf/prog_tests/token.c | 43 +++---
4 files changed, 208 insertions(+), 124 deletions(-)
--
2.34.1
next reply other threads:[~2023-12-07 22:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 22:27 Andrii Nakryiko [this message]
2023-12-07 22:27 ` [PATCH RFC bpf-next 1/3] bpf: add mapper macro for bpf_cmd enum Andrii Nakryiko
2023-12-12 2:40 ` Alexei Starovoitov
2023-12-12 4:01 ` Andrii Nakryiko
2023-12-12 4:06 ` Alexei Starovoitov
2023-12-13 1:37 ` Martin KaFai Lau
2023-12-13 17:26 ` Andrii Nakryiko
2023-12-07 22:27 ` [PATCH RFC bpf-next 2/3] bpf: extend parsing logic for BPF FS delegate_cmds mount option Andrii Nakryiko
2023-12-07 22:27 ` [PATCH RFC bpf-next 3/3] selftests/bpf: utilize string values for delegate_xxx mount options Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231207222755.3920286-1-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=keescook@chromium.org \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=sargun@sargun.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).