Skip to content

BPF FS mount options parsing follow ups

Andrii Nakryiko bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied 2/2
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: support symbolic BPF FS delegation mount optionskernel/bpf/inode.c+211 -380 repliesApplied
2/2selftests/bpf: utilize string values for delegate_xxx mount optionstools/testing/selftests/bpf/prog_tests/token.c+32 -200 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJohn Fastabend
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/2] BPF FS mount options parsing follow ups

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(-)
Signature · 1 line
2.34.1