BPF List
 help / color / mirror / Atom feed
* Is fentry/fexit support possible with an external BTF?
@ 2023-01-24  0:21 Jason Ling
  2023-01-24 18:26 ` Kui-Feng Lee
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Ling @ 2023-01-24  0:21 UTC (permalink / raw)
  To: bpf

Some context:

The devices I am interested in have a small kernel partition (~16MB).
Building the kernel with CONFIG_DEBUG_INFO_BTF=y increases the kernel
size by about ~1.7M.
So I've tried to use an external BTF (generating my own vmlinux BTF
and placing it on a more spacious partition) but it seems like my
eBPFs that attach to fexit hooks now fail loading. According to some
comments in libbpf this seems to be expected.

e.g an eBPF program that looks like this

SEC("fexit/ksys_unshare")
int BPF_PROG(handle_exit, unsigned long unshare_flags, int rv) {
}

fails the loading process.


My guess is that there is additional debug/BTF information beyond what
is available in vmlinux BTF that gets linked into vmlinuz and without
this information the attaching to certain hooks fail.

So my question is:

is there a way to achieve my goal of using a kernel that has been
built with CONFIG_DEBUG_INFO_BTF=n and still be able to use
fentry/fexit type hooks?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-24 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24  0:21 Is fentry/fexit support possible with an external BTF? Jason Ling
2023-01-24 18:26 ` Kui-Feng Lee
2023-01-24 23:15   ` Alan Maguire
2023-01-24 23:17     ` Jason Ling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox