ebpf icon indicating copy to clipboard operation
ebpf copied to clipboard

btf: support CO-RE relocation of ISAv4 instructions

Open lmb opened this issue 1 year ago • 2 comments

#1193 added support for new instructions. We need to extend COREFixup.Apply to recognise the new load / store modes.

### Tasks
- [ ] Check what libbpf does. Did the upstream patch sets make any changes to CO-RE logic?
- [ ] Implement the same in `COREFixup.Apply`

lmb avatar Nov 08 '23 10:11 lmb

Check what libbpf does. Did the upstream patch sets make any changes to CO-RE logic?

As far as I can find the only change to libbpf for ISAv4 is https://github.com/libbpf/libbpf/commit/3d0e1c5a3a3157df9f1a6cc72d0b1d80b621ed75

No changes to the core logic around that same time https://github.com/libbpf/libbpf/commits/master/src/relo_core.c

And the BPF_MEMSX constant isn't used libbpf anywhere, so it seems like no action is required.

dylandreimerink avatar Nov 08 '23 19:11 dylandreimerink

We'll need to adjust at least https://github.com/cilium/ebpf/blob/36f6316fb1690571ea9b722c4d227e1ba2d50f68/btf/core.go#L51 to allow the new class.

lmb avatar Nov 09 '23 10:11 lmb