iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
829 stars 136 forks source link

Truncate all ALU32 except for byte swap #454

Closed Alan-Jowett closed 6 months ago

Alan-Jowett commented 6 months ago

Resolves: #452

This pull request primarily focuses on modifications to the ubpf_vm package, specifically the translate function in ubpf_jit_x86_64.c and the ubpf_exec function in ubpf_vm.c. The changes are centered around the handling of ALU32 instructions. In both functions, additional code has been added to check if an instruction is an ALU32 instruction and perform certain operations if it is.

Here are the key changes: