Skip to content

Update a struct_ops link through a pinned path

Kui-Feng Lee bpf 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Fix a link time error for the case that CONFIG_BPF_JIT is not enabled. (Reported by kernel test robot)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: enable the "open" operator on a pinned path of a struct_osp link.include/linux/bpf.h kernel/bpf/bpf_struct_ops.c kernel/bpf/inode.c +1 more+39 -41 reply
2/2selftests/bpf: open a pinned path of a struct_ops link.tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c+62 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEduard Zingerman
SeriesR-b
1/2
2/2

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 bpf-next v2 0/2] Update a struct_ops link through a pinned path

Applications already have the ability to update a struct_ops link with another struct_ops map. However, they were unable to open pinned paths of the links. This implies that updating a link through its pinned paths was not feasible. By allowing the "open" operator on pinned paths, applications can pin a struct_ops link and update the link through the pinned path later.

---
Changes from v1:

- Fix a link time error for the case that CONFIG_BPF_JIT is not enabled. (Reported by kernel test robot)

v1: https://lore.kernel.org/all/[email protected]/

Kui-Feng Lee (2):
bpf: enable the "open" operator on a pinned path of a struct_osp link. selftests/bpf: open a pinned path of a struct_ops link.

 include/linux/bpf.h                           |  6 ++
 kernel/bpf/bpf_struct_ops.c                   | 10 ++++
 kernel/bpf/inode.c                            | 11 +++-
 kernel/bpf/syscall.c                          | 16 +++++-
 .../selftests/bpf/bpf_testmod/bpf_testmod.c   |  6 ++
 .../bpf/prog_tests/test_struct_ops_module.c   | 56 +++++++++++++++++++
 6 files changed, 101 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1