Open Roeegg2 opened 2 weeks ago
If it's OK I would love to implement that :)
Sure, go ahead!
Apparently since around 2019 eBPF programs can jump backwards in code too, so all of the branch instructions are invalid now too... (offset is interpreted as signed value instead of unsigned) I suspect there are other similar major changes too. Should we add an option for different major eBPF versions? So we can still support older programs.
Quickly skimmed the kernel ISA and the RFC ISA. They seem to match. So you can change the bpf_op_mem::disp
to be a 64bit field and cast it to what the instruction uses.
Feature
language
Describe the feature you'd like Update the BPF architecture to the current specification
Additional context
JUMP32
instruction classSDIV
,SMOD
,MOVSX
instructionsATOMIC
instruction modifierXCHG
andCMPXCHG
instructionsI think that's everything that needs to be updated, but if you do find something I'm missing, please let me know.