Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

RedBPF v2.3.0

Latest
Compare
Choose a tag to compare
@rhdxmr rhdxmr released this 09 Jan 05:52
· 101 commits to main since this release
v2.3.0
845fffa

Prevent some UB in probes

While compiling BPF programs, raise an error if both two conditions are
satisfied

  1. alignment of a value of a BPF map is greater than 8 bytes
  2. a BPF program calls get or get_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.