Thread (11 messages) flat view 11 messages, 5 authors, 2020-08-12

Re: eBPF CO-RE cross-compilation for 32-bit ARM platforms

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2020-08-07 19:00:36
Also in: bpf

On Fri, Aug 07, 2020 at 07:23:53PM +0200, Jean-Philippe Brucker wrote:
On Fri, Aug 07, 2020 at 04:20:58PM +0200, Jakov Petrina wrote:
quoted
Hi everyone,

recently we have begun extensive research into eBPF and related
technologies. Seeking an easier development process, we have switched over
to using the eBPF CO-RE [0] approach internally which has enabled us to
simplify most aspects of eBPF development, especially those related to
cross-compilation.
For those of us not familiar with what CO-RE is, this doesn't help.
I assume the [0] was a reference to something that explained it,
but that isn't included.
quoted
However, as part of these efforts we have stumbled upon several problems
that we feel would benefit from a community discussion where we may share
our solutions and discuss alternatives moving forward.

As a reference point, we have started researching and modifying several eBPF
CO-RE samples that have been developed or migrated from existing `bcc`
tooling. Most notable examples are those present in `bcc`'s `libbpf-tools`
directory [1]. Some of these samples have just recently been converted to
respective eBPF CO-RE variants, of which the `tcpconnect` tracing sample has
proven to be very interesting.

First showstopper for cross-compiling aforementioned example on the ARM
32-bit platform has been with regards to generation of the required
`vmlinux.h` kernel header from the BTF information. More specifically, our
initial approach to have e.g. a compilation target dependency which would
invoke `bpftool` at configure time was not appropriate due to several
issues: a) CO-RE requires host kernel to have been compiled in such a way to
expose BTF information which may not available, and b) the generated
What is "BTF information"?  Google suggests it's something to do with
the British Thyroid Foundation.

Please don't use three letter abbreviations unless they are widely
understood, or if you wish to, please ensure that you explain them.
TLAs otherwise are an exclusion mechanism.
quoted
`vmlinux.h` was actually architecture-specific.
What is this "vmlinux.h" ?  It isn't something that the kernel provides
afaics.  It doesn't seem to be present on my existing x86 Debian system.
I've seen it on Fedora systems in the dim and distant past.

Where do you think it comes from?  Where are you finding it?
-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help