cilium / ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Home Page:https://ebpf-go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

btf: support CO-RE relocation of ISAv4 instructions

lmb opened this issue · 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?

As far as I can find the only change to libbpf for ISAv4 is libbpf/libbpf@3d0e1c5

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.

We'll need to adjust at least

case asm.LdXClass, asm.StClass, asm.StXClass:
to allow the new class.