Prevent some UB in probes
While compiling BPF programs, raise an error if both two conditions are
satisfied
- alignment of a value of a BPF map is greater than 8 bytes
- a BPF program calls
get
orget_mut
method of the BPF map
Creating misaligned references by itself causes undefined behavior in Rust
language. The Linux kernel does not keep the alignment of value other than 8
byte alignment. Calling get
or get_mut
method of BPF maps creates
references of values stored at BPF maps. Thus, calling get
or get_mut
creates misaligned references if the alignment of the value is greater than 8
bytes.
RedBPF prevents this situation.
Support ARM64(aarch64) architecture
Build tests for ARM64 architecture are prepared and they are executed to
check new commits are compiled correctly on both ARM64 and X86_64.
Support DevMap for XDP BPF programs
DevMap can be used when redirecting packets to another interface in XDP.
Support BTF for tc
utility
Now BPF programs for tc
can make use of BPF helpers that requires BTF. For
example, bpf_spin_lock
helper function.
Bump up bindgen to 0.59.2
Now fields of which name is try
in C can be converted to Rust
language. Some of the Linux kernel structures contain fields of which name is
try
.
Add some safe wrappers of BPF helpers that never fail
Update BPF program template
Contributors
Thank you very much for your contribution.