Thread (6 messages) 6 messages, 5 authors, 2021-02-25

Re: arch_prepare_bpf_trampoline() for arm ?

From: Jean-Philippe Brucker <hidden>
Date: 2021-02-25 08:00:32

On Wed, Feb 24, 2021 at 10:25:38PM +0100, Toke Høiland-Jørgensen wrote:
Daniel Borkmann [off-list ref] writes:
quoted
On 2/24/21 8:54 PM, Luigi Rizzo wrote:
quoted
I prepared a BPF version of kstats[1]
https://github.com/luigirizzo/lr-cstats
that uses fentry/fexit hooks to monitor the execution time
of a kernel function.

I hoped to have it working on ARM64 too, but it looks like
arch_prepare_bpf_trampoline() only exists for x86.

Is there any outstanding patch for this function on ARM64,
or any similar function I could look at to implement it myself ?
Not that I'm currently aware of, arm64 support would definitely be great
to have. From x86 side, the underlying arch dependency was basically on
text_poke_bp() to patch instructions on a live kernel. Haven't checked
recently whether an equivalent exists on arm64 yet, but perhaps Will
might know.
Adding Jean-Philippe; I believe he is/was working on this...?
Yes, I have a very rough prototype here:
https://jpbrucker.net/git/linux/log/?h=bpf/devel

But not a ton of time to work on it at the moment, I don't know when I'll
be able to post something.

Thanks,
Jean
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help