All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Hwang <leon.hwang@linux.dev>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	toke@redhat.com, martin.lau@kernel.org, eddyz87@gmail.com,
	yonghong.song@linux.dev, wutengda@huaweicloud.com,
	leon.hwang@linux.dev, kernel-patches-bot@fb.com
Subject: [PATCH bpf-next 0/2] bpf: Fix updating attached freplace prog to PROG_ARRAY map
Date: Thu, 25 Jul 2024 08:32:49 +0800	[thread overview]
Message-ID: <20240725003251.37855-1-leon.hwang@linux.dev> (raw)

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


             reply	other threads:[~2024-07-25  0:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  0:32 Leon Hwang [this message]
2024-07-25  0:32 ` [PATCH bpf-next 1/2] bpf: Fix updating attached freplace prog to PROG_ARRAY map 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240725003251.37855-1-leon.hwang@linux.dev \
    --to=leon.hwang@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-patches-bot@fb.com \
    --cc=martin.lau@kernel.org \
    --cc=toke@redhat.com \
    --cc=wutengda@huaweicloud.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.