All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Xu <dxu@dxuuu.xyz>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: linux-input@vger.kernel.org, coreteam@netfilter.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, fsverity@lists.linux.dev,
	 bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	 cgroups@vger.kernel.org, alexei.starovoitov@gmail.com,
	quentin@isovalent.com,  alan.maguire@oracle.com,
	memxor@gmail.com
Subject: Re: [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section
Date: Sat, 13 Jan 2024 09:17:44 -0700	[thread overview]
Message-ID: <nhpt647n2djmthtdkqzrfbpeuqkhfy567rt7qyqtymxejncbgr@4tpiyxy2sbcm> (raw)
In-Reply-To: <ZaKW1AghwUnVz_c4@krava>

Hi Jiri,

On Sat, Jan 13, 2024 at 02:57:40PM +0100, Jiri Olsa wrote:
> On Fri, Jan 12, 2024 at 01:03:59PM -0700, Daniel Xu wrote:
> > On Fri, Jan 12, 2024 at 05:20:39PM +0100, Jiri Olsa wrote:
> > > On Sat, Jan 06, 2024 at 11:24:07AM -0700, Daniel Xu wrote:
> > > > === Description ===
> > > > 
> > > > This is a bpf-treewide change that annotates all kfuncs as such inside
> > > > .BTF_ids. This annotation eventually allows us to automatically generate
> > > > kfunc prototypes from bpftool.
> > > > 
> > > > We store this metadata inside a yet-unused flags field inside struct
> > > > btf_id_set8 (thanks Kumar!). pahole will be taught where to look.
> > > > 
> > > > More details about the full chain of events are available in commit 3's
> > > > description.
> > > > 
> > > > The accompanying pahole changes (still needs some cleanup) can be viewed
> > > > here on this "frozen" branch [0].
> > > 
> > > so the plan is to have bpftool support to generate header file
> > > with detected kfuncs?
> > 
> > Yep, that's the major use case. But I see other use cases as well like
> 
> ok, any chance you could already include it in the patchset?
> would be a great way to test this.. maybe we could change
> selftests to use that

I haven't start working on that code yet, but I can.

Here is my plan FWIW:

1. Bump minimum required pahole version up. Or feature probe for
   kfunc decl tag support. Whatever is the standard practice here.

2. Teach bpftool to dump kfunc prototypes, guarded behind a flag.

3. Flip bpftool flag on in selftest build and remove all manual kfunc
   prototypes atomically in 1 commit.

I thought it'd be nicer to do it incrementally given all the moving
pieces. But if we want to land it all at once that is ok by me too.

Thanks,
Daniel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Xu <dxu@dxuuu.xyz>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: linux-input@vger.kernel.org, coreteam@netfilter.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, fsverity@lists.linux.dev,
	 bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	 cgroups@vger.kernel.org, alexei.starovoitov@gmail.com,
	quentin@isovalent.com,  alan.maguire@oracle.com,
	memxor@gmail.com
Subject: Re: [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section
Date: Sat, 13 Jan 2024 09:17:44 -0700	[thread overview]
Message-ID: <nhpt647n2djmthtdkqzrfbpeuqkhfy567rt7qyqtymxejncbgr@4tpiyxy2sbcm> (raw)
In-Reply-To: <ZaKW1AghwUnVz_c4@krava>

Hi Jiri,

On Sat, Jan 13, 2024 at 02:57:40PM +0100, Jiri Olsa wrote:
> On Fri, Jan 12, 2024 at 01:03:59PM -0700, Daniel Xu wrote:
> > On Fri, Jan 12, 2024 at 05:20:39PM +0100, Jiri Olsa wrote:
> > > On Sat, Jan 06, 2024 at 11:24:07AM -0700, Daniel Xu wrote:
> > > > === Description ===
> > > > 
> > > > This is a bpf-treewide change that annotates all kfuncs as such inside
> > > > .BTF_ids. This annotation eventually allows us to automatically generate
> > > > kfunc prototypes from bpftool.
> > > > 
> > > > We store this metadata inside a yet-unused flags field inside struct
> > > > btf_id_set8 (thanks Kumar!). pahole will be taught where to look.
> > > > 
> > > > More details about the full chain of events are available in commit 3's
> > > > description.
> > > > 
> > > > The accompanying pahole changes (still needs some cleanup) can be viewed
> > > > here on this "frozen" branch [0].
> > > 
> > > so the plan is to have bpftool support to generate header file
> > > with detected kfuncs?
> > 
> > Yep, that's the major use case. But I see other use cases as well like
> 
> ok, any chance you could already include it in the patchset?
> would be a great way to test this.. maybe we could change
> selftests to use that

I haven't start working on that code yet, but I can.

Here is my plan FWIW:

1. Bump minimum required pahole version up. Or feature probe for
   kfunc decl tag support. Whatever is the standard practice here.

2. Teach bpftool to dump kfunc prototypes, guarded behind a flag.

3. Flip bpftool flag on in selftest build and remove all manual kfunc
   prototypes atomically in 1 commit.

I thought it'd be nicer to do it incrementally given all the moving
pieces. But if we want to land it all at once that is ok by me too.

Thanks,
Daniel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-01-13 16:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06 18:24 [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section Daniel Xu
2024-01-06 18:24 ` Daniel Xu
2024-01-06 18:24 ` [PATCH bpf-next v3 1/3] bpf: btf: Support flags for BTF_SET8 sets Daniel Xu
2024-01-06 18:24 ` [PATCH bpf-next v3 2/3] bpf: btf: Add BTF_KFUNCS_START/END macro pair Daniel Xu
2024-01-08  9:14   ` Lorenz Bauer
2024-01-08 17:59     ` Daniel Xu
2024-01-11  1:27       ` Daniel Xu
2024-01-06 18:24 ` [PATCH bpf-next v3 3/3] bpf: treewide: Annotate BPF kfuncs in BTF Daniel Xu
2024-01-08  9:15 ` [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section Lorenz Bauer
2024-01-08  9:15   ` Lorenz Bauer
2024-01-08 17:52   ` Daniel Xu
2024-01-08 17:52     ` Daniel Xu
2024-01-12 16:20 ` Jiri Olsa
2024-01-12 16:20   ` Jiri Olsa
2024-01-12 20:03   ` Daniel Xu
2024-01-12 20:03     ` Daniel Xu
2024-01-13 13:57     ` Jiri Olsa
2024-01-13 13:57       ` Jiri Olsa
2024-01-13 16:17       ` Daniel Xu [this message]
2024-01-13 16:17         ` Daniel Xu
2024-01-13 19:49         ` Jiri Olsa
2024-01-13 19:49           ` Jiri Olsa

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=nhpt647n2djmthtdkqzrfbpeuqkhfy567rt7qyqtymxejncbgr@4tpiyxy2sbcm \
    --to=dxu@dxuuu.xyz \
    --cc=alan.maguire@oracle.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=coreteam@netfilter.org \
    --cc=fsverity@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=olsajiri@gmail.com \
    --cc=quentin@isovalent.com \
    /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.