Re: [PATCH bpf-next v2 3/3] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-06 Thread Jiri Olsa
On Fri, Jan 05, 2024 at 09:55:43AM -0700, Daniel Xu wrote: > On Fri, Jan 05, 2024 at 04:11:33PM +0100, Jiri Olsa wrote: > > On Thu, Jan 04, 2024 at 07:45:49PM -0700, Daniel Xu wrote: > > > > SNIP > > > > > diff --git a/fs/verity/measure.c b/fs/verity/measure.c > > > index bf7a5f4cccaf..3969d54158

Re: [PATCH bpf-next v2 3/3] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-05 Thread Daniel Xu
On Fri, Jan 05, 2024 at 04:11:33PM +0100, Jiri Olsa wrote: > On Thu, Jan 04, 2024 at 07:45:49PM -0700, Daniel Xu wrote: > > SNIP > > > diff --git a/fs/verity/measure.c b/fs/verity/measure.c > > index bf7a5f4cccaf..3969d54158d1 100644 > > --- a/fs/verity/measure.c > > +++ b/fs/verity/measure.c > >

Re: [PATCH bpf-next v2 3/3] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-05 Thread Jiri Olsa
On Thu, Jan 04, 2024 at 07:45:49PM -0700, Daniel Xu wrote: SNIP > diff --git a/fs/verity/measure.c b/fs/verity/measure.c > index bf7a5f4cccaf..3969d54158d1 100644 > --- a/fs/verity/measure.c > +++ b/fs/verity/measure.c > @@ -159,9 +159,9 @@ __bpf_kfunc int bpf_get_fsverity_digest(struct file > *

[PATCH bpf-next v2 3/3] bpf: treewide: Annotate BPF kfuncs in BTF

2024-01-04 Thread Daniel Xu
This commit marks kfuncs as such inside the .BTF_ids section. The upshot of these annotations is that we'll be able to automatically generate kfunc prototypes for downstream users. The process is as follows: 1. In source, use BTF_KFUNCS_START/END macro pair to mark kfuncs 2. During build, pahole i