You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpf: Move iterator functions into special init section
With upcoming changes to pahole [0], 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.
[0] 5a22c2de79fb ("btf_encoder: Change functions check due to broken dwarf")
Suggested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201110154017.482352-1-jolsa@kernel.org
0 commit comments