public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Tao Chen <chen.dylane@gmail.com>,
	ast@kernel.org, daniel@iogearbox.net,  andrii@kernel.org,
	haoluo@google.com, jolsa@kernel.org, qmo@kernel.org,
	 bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND bpf-next v7 0/4] Add prog_kfunc feature probe
Date: Thu, 20 Feb 2025 17:11:54 -0800	[thread overview]
Message-ID: <1fb198103e72d88c45caf6ef2dd8ebeb258ad48e.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzYsGnhmnhkHdUPN8yBfbv57R9h4N2R8RcqdjhmHWvJVkg@mail.gmail.com>

On Thu, 2025-02-20 at 17:07 -0800, Andrii Nakryiko wrote:
> On Tue, Feb 18, 2025 at 2:51 PM Eduard Zingerman <eddyz87@gmail.com> wrote:
> > 
> > On Mon, 2025-02-17 at 13:21 +0800, Tao Chen wrote:

[...]

> > I tried the test enumerating all kfuncs in BTF and doing
> > libbpf_probe_bpf_kfunc for BPF_PROG_TYPE_{KPROBE,XDP}.
> > (Source code at the end of the email).
> > 
> > The set of kfuncs returned for XDP looks correct.
> > The set of kfuncs returned for KPROBE contains a few incorrect entries:
> > - bpf_xdp_metadata_rx_hash
> > - bpf_xdp_metadata_rx_timestamp
> > - bpf_xdp_metadata_rx_vlan_tag
> > 
> > This is because of a different string reported by verifier for these
> > three functions.
> > 
> > Ideally, I'd write some script looking for
> > register_btf_kfunc_id_set(BPF_PROG_TYPE_***, kfunc_set)
> > calls in the kernel source code and extracting the prog type /
> > functions in the set, and comparing results of this script with
> > output of the test below for all program types.
> > But up to you if you'd like to do such rigorous verification or not.
> > 
> > Otherwise patch-set looks good to me, for all patch-set:
> > 
> > Reviewed-by: Eduard Zingerman <eddyz87@gmail.com>
> 
> Shouldn't we fix the issue with those bpf_xdp_metadata_* kfuncs? Do

I assume Tao would post a v8 with the fix.

> you have details on what different string verifier reports?

The string is "metadata kfuncs require device-bound program\n".

[...]


  reply	other threads:[~2025-02-21  1:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 15:39 [PATCH RESEND bpf-next v7 0/4] Add prog_kfunc feature probe Tao Chen
2025-02-12 15:39 ` [PATCH bpf-next v7 1/4] libbpf: Extract prog load type check from libbpf_probe_bpf_helper Tao Chen
2025-02-12 15:39 ` [PATCH bpf-next v7 2/4] libbpf: Init fd_array when prog probe load Tao Chen
2025-02-12 15:39 ` [PATCH bpf-next v7 3/4] libbpf: Add libbpf_probe_bpf_kfunc API Tao Chen
2025-02-12 15:39 ` [PATCH bpf-next v7 4/4] selftests/bpf: Add libbpf_probe_bpf_kfunc API selftests Tao Chen
2025-02-17  5:21 ` [PATCH RESEND bpf-next v7 0/4] Add prog_kfunc feature probe Tao Chen
2025-02-18 22:51   ` Eduard Zingerman
2025-02-20 18:09     ` Tao Chen
2025-02-20 18:43       ` Eduard Zingerman
2025-02-21 10:03         ` Tao Chen
2025-02-21  1:07     ` Andrii Nakryiko
2025-02-21  1:11       ` Eduard Zingerman [this message]
2025-02-21 10:03         ` Tao Chen

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=1fb198103e72d88c45caf6ef2dd8ebeb258ad48e.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chen.dylane@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qmo@kernel.org \
    /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