Skip to content

bpf: Fix updating attached freplace prog to prog_array map

Leon Hwang bpf 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 8 repliesSuperseded

Changes in v3 from the cover letter

* Address comments from Yonghong:
* Use 12 alphanums for commit ID.
* Keep commit subject in the same line.
* Remove some unnecessary empty lines.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Fix updating attached freplace prog to prog_array mapinclude/linux/bpf_verifier.h+2 -24 replies
2/2selftests/bpf: Add testcase for updating attached freplace prog to prog_array maptools/testing/selftests/bpf/prog_tests/tailcalls.c tools/testing/selftests/bpf/progs/tailcall_freplace.c tools/testing/selftests/bpf/progs/tc_bpf2bpf.c+109 -10 replies

Reviews trailers per patch

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

PatchYonghong Song
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 v3 thread

Cover letter [PATCH bpf-next v3 0/2] bpf: Fix updating attached freplace prog to prog_array map

The commit f7866c358733 ("bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT") fixed a NULL pointer dereference panic, but didn't fix the issue that
fails to update attached freplace prog to prog_array map.

This patch fixes the issue.

v2 -> v3:
* Address comments from Yonghong:
* Use 12 alphanums for commit ID.
* Keep commit subject in the same line.
* Remove some unnecessary empty lines.

v1 -> v2:
* Address comments from Yonghong:
* Check then return prog->aux->saved_dst_prog_type.
* Remove ASSERT_GE() that checks prog_fd and map_fd.
* Remove #include "bpf_legacy.h".
* Fix some code style issues.

RFC PATCH -> v1:
* Respin the PATCH with updated message.

Leon Hwang (2):
bpf: Fix updating attached freplace prog to prog_array map selftests/bpf: Add testcase for updating attached freplace prog to
prog_array map

 include/linux/bpf_verifier.h                  |  4 +-
 .../selftests/bpf/prog_tests/tailcalls.c      | 65 ++++++++++++++++++-
 .../selftests/bpf/progs/tailcall_freplace.c   | 23 +++++++
 .../testing/selftests/bpf/progs/tc_bpf2bpf.c  | 22 +++++++
 4 files changed, 111 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/tailcall_freplace.c
 create mode 100644 tools/testing/selftests/bpf/progs/tc_bpf2bpf.c
Signature · 1 line
2.44.0