From: Jiri Olsa <jolsa@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andriin@fb.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Yonghong Song <yhs@fb.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>
Subject: Re: [PATCHv6 bpf] bpf: Move iterator functions into special init section
Date: Wed, 11 Nov 2020 12:51:00 +0100 [thread overview]
Message-ID: <20201111115100.GH387652@krava> (raw)
In-Reply-To: <2a71a0b4-b5de-e9fb-bacc-3636e16245c5@iogearbox.net>
On Wed, Nov 11, 2020 at 12:26:29PM +0100, Daniel Borkmann wrote:
> On 11/10/20 4:40 PM, Jiri Olsa wrote:
> > With upcoming changes to pahole, that change the way how and
> > which kernel functions are stored in BTF data, we need a way
> > to recognize iterator functions.
> >
> > Iterator functions need to be in BTF data, but have no real
> > body and are currently placed in .init.text section, so they
> > are freed after kernel init and are filtered out of BTF data
> > because of that.
> >
> > The solution is to place these functions under new section:
> > .init.bpf.preserve_type
> >
> > And add 2 new symbols to mark that area:
> > __init_bpf_preserve_type_begin
> > __init_bpf_preserve_type_end
> >
> > The code in pahole responsible for picking up the functions will
> > be able to recognize functions from this section and add them to
> > the BTF data and filter out all other .init.text functions.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Suggested-by: Yonghong Song <yhs@fb.com>
> > Signed-off-by: Jiri Olsa <jolsa@redhat.com>
>
> LGTM, applied, thanks! Also added a reference to the pahole commit
> to the commit log so that this info doesn't get lost in the void
> plus carried over prior Acks given nothing changed logically in the
> patch.
>
> P.s.: I've been wondering whether we also need to align the begin/end
> symbols via ALIGN_FUNCTION() in case ld might realign to a different
> boundary on later passes but this seems neither the case for .init.text
> right now, likely since it doesn't matter for kallsyms data in our
> particular case.
>
I'll check but I think it's not a problem as you said
thanks,
jirka
next prev parent reply other threads:[~2020-11-11 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 15:40 [PATCHv6 bpf] bpf: Move iterator functions into special init section Jiri Olsa
2020-11-11 11:26 ` Daniel Borkmann
2020-11-11 11:51 ` Jiri Olsa [this message]
2020-11-11 12:37 ` Arnaldo Carvalho de Melo
2020-11-11 12:38 ` Arnaldo Carvalho de Melo
2020-11-11 20:09 ` Alexei Starovoitov
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=20201111115100.GH387652@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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.