Skip to content

bpf: Fix fill_link_info and add selftest

Yafang Shao bpf 6 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. v6 Latest2 patches 0 repliesApplied 2/2
  2. v52 patches 4 repliesSuperseded
  3. v42 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches5 repliesSuperseded
v22 patches4 repliesSuperseded
v12 patches1 replySuperseded

Changes in v6 from the cover letter

- Fix BPF CI failure on aarch64

Patches in v6 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe()kernel/bpf/syscall.c+2 -20 repliesApplied
2/2selftests/bpf: Add selftest for fill_link_infotools/testing/selftests/bpf/DENYLIST.aarch64 tools/testing/selftests/bpf/prog_tests/fill_link_info.c tools/testing/selftests/bpf/progs/test_fill_link_info.c+387 -00 repliesApplied

Reviews trailers per patch

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

PatchYonghong SongJiri Olsa
1/2A-b A-b
2/2A-b A-b

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

Read the v6 thread

Cover letter [PATCH v6 bpf-next 0/2] bpf: Fix fill_link_info and add selftest

Patch #1: Fix an error in fill_link_info reported by Dan Patch #2: Add selftest for #1

v5->v6:
- Fix BPF CI failure on aarch64

v4->v5:
- Comments from Yonghong
- Replace 'offset' with '0'
- Set err=-1 for default case
- Only check return value of verify_kmulti_link_info
- Comments from Jiri
- Avoid retprobe argument
- Use bpf_fentry_test* instead
- Rename verify_kmulti_user_buffer
- Define some variables as global value to simplify the code

v3->v4:
- Comments from Yonghong
- re-word the kptr comment
- Avoid unnecessary switch statement
- No need to check the return value of bpf_link__fd()
- offset is always 0
- Return directly when test_fill_link_info__open_and_load() fails
- Cleanup skel when load_kallsyms_refresh() fails

v2->v3:
- Comments from Jiri
- Verify wrong arguments as soon as possible
- Use CONFIG_X86_KERNEL_IBT
- No need to make the test serial
- Add test case for kprobe_multi

v1->v2:
- Fix BPF CI failure due to the enabled ENDBDR

Yafang Shao (2):
bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe() selftests/bpf: Add selftest for fill_link_info

 kernel/bpf/syscall.c                               |   4 +-
 tools/testing/selftests/bpf/DENYLIST.aarch64       |   3 +
 .../selftests/bpf/prog_tests/fill_link_info.c      | 342 +++++++++++++++++++++
 .../selftests/bpf/progs/test_fill_link_info.c      |  42 +++
 4 files changed, 389 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/fill_link_info.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_fill_link_info.c
Signature · 1 line
1.8.3.1