BPF List
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/2] BPF FS mount options parsing follow ups
@ 2023-12-14 22:50 Andrii Nakryiko
  2023-12-14 22:50 ` [PATCH v2 bpf-next 1/2] bpf: support symbolic BPF FS delegation mount options Andrii Nakryiko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andrii Nakryiko @ 2023-12-14 22:50 UTC (permalink / raw)
  To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team

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 implementation relies on BTF information to find all supported symbolic
names. If kernel wasn't built with BTF, BPF FS will still support "any" and
hex-based mask.

  [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=805707&state=*

v1->v2:
  - strip BPF_, BPF_MAP_TYPE_, and BPF_PROG_TYPE_ prefixes,
    do case-insensitive comparison, normalize to lower case (Alexei).

Andrii Nakryiko (2):
  bpf: support symbolic BPF FS delegation mount options
  selftests/bpf: utilize string values for delegate_xxx mount options

 kernel/bpf/inode.c                            | 249 +++++++++++++++---
 .../testing/selftests/bpf/prog_tests/token.c  |  52 ++--
 2 files changed, 243 insertions(+), 58 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-15  1:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 22:50 [PATCH v2 bpf-next 0/2] BPF FS mount options parsing follow ups Andrii Nakryiko
2023-12-14 22:50 ` [PATCH v2 bpf-next 1/2] bpf: support symbolic BPF FS delegation mount options Andrii Nakryiko
2023-12-14 22:50 ` [PATCH v2 bpf-next 2/2] selftests/bpf: utilize string values for delegate_xxx " Andrii Nakryiko
2023-12-14 22:56 ` [PATCH v2 bpf-next 0/2] BPF FS mount options parsing follow ups Andrii Nakryiko
2023-12-14 22:58   ` Andrii Nakryiko
2023-12-15  1:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox