github libbpf/libbpf v0.1.0
libbpf v0.1.0

latest releases: v1.4.1, v0.8.3, v0.8.2...
3 years ago

New features/APIs:

  • __ksym extern variables support for getting kernel symbol addresses;
  • BPF XDP link support;
  • bpf_program__set_autoload() to disable loading and verifying specific BPF programs;
  • support for attaching map elements BPF iterator programs;
  • new getters/setters for more control over BPF map definitions;
  • all destructor-like APIs (e.g., perf_buffer__free() and bpf_object__close()) now accept pointers returned on error (in addition to NULL and valid pointers) and ignore them, no need to guard destructors with extra checks now;
  • bpf_link__detach() for force-detaching link, while it's still alive;
  • btf__parse_raw() and btf__parse() APIs for more convenient and flexible BTF parsing.

New BPF program types supported:

  • cgroup/sock_release (BPF_CGROUP_INET_SOCK_RELEASE);
  • cgroup/sock_create is an alias for cgroup/sock now;
  • xdp_cpumap;
  • sk_lookup.

BPF-side APIs:

  • most BPF helpers now return long for better code generation;
  • bpf_endian.h now can be included along the vmlinux.h;
  • bpf_get_task_stack();
  • bpf_skc_to_tcp6_sock(), bpf_skc_to_udp6_sock();
  • bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock();
  • PT_REGS macros fixes for MIPS architecture.

Bug fixes:

  • CO-RE relocations in .text section (in sub-programs) are now performed properly;
  • vmlinux BTF is not loaded unnecessarily twice;
  • perf_buffer__new() can be used on old kernels down to at least 4.9 version;
  • libbpf's internal hashmap fixes for 32-bit architectures;
  • few BTF sanitization bugs and memory leaks fixed;
  • btf_dump handling of GCC built-in types for Arm NEON fixed;
  • BTF-defined map-in-map initialization fixed for 32-bit architectures;
  • various BTF fixes for 32-bit architectures.

Don't miss a new libbpf release

NewReleases is sending notifications on new releases.