From: Daniel Borkmann <daniel@iogearbox.net>
To: Jiri Olsa <jolsa@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andriin@fb.com>
Cc: 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:26:29 +0100 [thread overview]
Message-ID: <2a71a0b4-b5de-e9fb-bacc-3636e16245c5@iogearbox.net> (raw)
In-Reply-To: <20201110154017.482352-1-jolsa@kernel.org>
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.
next prev parent reply other threads:[~2020-11-11 11:26 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 [this message]
2020-11-11 11:51 ` Jiri Olsa
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=2a71a0b4-b5de-e9fb-bacc-3636e16245c5@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=acme@kernel.org \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox