BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpf: Fix updating attached freplace prog to PROG_ARRAY map
@ 2024-07-25  0:32 Leon Hwang
  2024-07-25  0:32 ` [PATCH bpf-next 1/2] " Leon Hwang
  2024-07-25  0:32 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcase for " Leon Hwang
  0 siblings, 2 replies; 11+ messages in thread
From: Leon Hwang @ 2024-07-25  0:32 UTC (permalink / raw)
  To: bpf
  Cc: ast, daniel, andrii, toke, martin.lau, eddyz87, yonghong.song,
	wutengda, leon.hwang, kernel-patches-bot

The commit f7866c3587337731 ("bpf: Fix null pointer dereference in
resolve_prog_type() for BPF_PROG_TYPE_EXT") fixed a NULL pointer panic, but
does not support my case[0] that I want to update attached freplace prog to
PROG_ARRAY map.

This patchset fixes it to support updating attached freplace prog to
PROG_ARRAY map.

[0] https://lore.kernel.org/bpf/20240602122421.50892-1-hffilwlqm@gmail.com/

RFC PATCH -> v1:
 * Respin the PATCH with updating its 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      | 76 ++++++++++++++++++-
 .../selftests/bpf/progs/tailcall_freplace.c   | 33 ++++++++
 .../testing/selftests/bpf/progs/tc_bpf2bpf.c  | 23 ++++++
 4 files changed, 133 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

-- 
2.44.0


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

end of thread, other threads:[~2024-07-26  7:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25  0:32 [PATCH bpf-next 0/2] bpf: Fix updating attached freplace prog to PROG_ARRAY map Leon Hwang
2024-07-25  0:32 ` [PATCH bpf-next 1/2] " Leon Hwang
2024-07-25 20:58   ` Yonghong Song
2024-07-26  3:27     ` leon.hwang
2024-07-26  6:15       ` Yonghong Song
2024-07-26  7:31         ` Leon Hwang
2024-07-25  0:32 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcase for " Leon Hwang
2024-07-25 21:11   ` Yonghong Song
2024-07-26  3:33     ` leon.hwang
2024-07-26  6:16   ` Yonghong Song
2024-07-26  7:33     ` Leon Hwang

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