From: Leon Hwang <hffilwlqm@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Leon Hwang <leon.hwang@linux.dev>
Cc: bpf <bpf@vger.kernel.org>, "Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Martin KaFai Lau" <martin.lau@kernel.org>,
"Eddy Z" <eddyz87@gmail.com>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Tengda Wu" <wutengda@huaweicloud.com>,
kernel-patches-bot@fb.com
Subject: Re: [PATCH bpf-next v3 1/2] bpf: Fix updating attached freplace prog to prog_array map
Date: Thu, 22 Aug 2024 11:01:15 +0800 [thread overview]
Message-ID: <8730a5f8-cb17-4c31-b62d-5faf529d7d89@gmail.com> (raw)
In-Reply-To: <CAADnVQK-f=dCsN4E2goj6YjDkTD4PhZK=VTZygaUsK9JPD=Wag@mail.gmail.com>
On 13/8/24 06:34, Alexei Starovoitov wrote:
> On Sun, Jul 28, 2024 at 4:47 AM Leon Hwang <leon.hwang@linux.dev> wrote:
>>
>> Fixes: f7866c358733 ("bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT")
>> Cc: Toke Høiland-Jørgensen <toke@redhat.com>
>> Cc: Martin KaFai Lau <martin.lau@kernel.org>
>> Acked-by: Yonghong Song <yonghong.song@linux.dev>
>> Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
>> ---
>> include/linux/bpf_verifier.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
>> index 5cea15c81b8a8..bfd093ac333f2 100644
>> --- a/include/linux/bpf_verifier.h
>> +++ b/include/linux/bpf_verifier.h
>> @@ -874,8 +874,8 @@ static inline u32 type_flag(u32 type)
>> /* only use after check_attach_btf_id() */
>> static inline enum bpf_prog_type resolve_prog_type(const struct bpf_prog *prog)
>> {
>> - return (prog->type == BPF_PROG_TYPE_EXT && prog->aux->dst_prog) ?
>> - prog->aux->dst_prog->type : prog->type;
>> + return (prog->type == BPF_PROG_TYPE_EXT && prog->aux->saved_dst_prog_type) ?
>> + prog->aux->saved_dst_prog_type : prog->type;
>
> Sorry for the delay.
> The fix lgtm.
>
> I reworded the commit log, since it's too verbose and applied to bpf tree.
> I will apply selftest to bpf-next when the fix makes it all the way there.
> Otherwise there will be non-trivial conflicts.
>
Hi Alexei,
Could you apply the selftest patch to bpf-next?
I'm waiting for it for my new patches that fix the panic that I
mentioned at
https://lore.kernel.org/bpf/172a5daf-8a3b-44d1-8719-301a6e8d196a@gmail.com/.
Because the new patches should add tailcall selftests based on the
latest ones.
Thanks,
Leon
next prev parent reply other threads:[~2024-08-22 3:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 11:46 [PATCH bpf-next v3 0/2] bpf: Fix updating attached freplace prog to prog_array map Leon Hwang
2024-07-28 11:46 ` [PATCH bpf-next v3 1/2] " Leon Hwang
2024-07-29 2:25 ` Tengda Wu
2024-08-12 22:34 ` Alexei Starovoitov
2024-08-22 3:01 ` Leon Hwang [this message]
2024-08-22 20:36 ` Alexei Starovoitov
2024-07-28 11:46 ` [PATCH bpf-next v3 2/2] selftests/bpf: Add testcase for " 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=8730a5f8-cb17-4c31-b62d-5faf529d7d89@gmail.com \
--to=hffilwlqm@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--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=leon.hwang@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox