User space-side features
* bpf_map__set_exclusive_program() and bpf_map__exclusive_program() APIs for exclusive map creation;
* bpf_program__assoc_struct_ops() and bpf_prog_assoc_struct_ops() APIs to associate a non-struct_ops BPF program with a struct_ops map;
* btf__permute() API to rearrange BTF types in-place according to a provided mapping;
* BTF type lookup optimization: binary search for btf__find_by_name() and btf__find_by_name_kind();
* btf__add_btf() now accepts split BTF sources;
* fsession support (SEC("fsession+") / SEC("fsession.s+"));
* BPF_F_CPU and BPF_F_ALL_CPUS flags support for per-CPU map operations;
* arena globals are moved to the end of the arena mmap region if kernel supports it;
* support for LLVM-generated indirect jump tables (BPF ISA v4) via .jumptables ELF section and BPF_MAP_TYPE_INSN_ARRAY maps;
* avoid expensive kallsyms parsing when kprobe.session target is an exact function match;
* new dont_enable option in struct bpf_perf_event_opts to suppress perf event auto-enablement;
BPF-side features
* USDT SIB (Scale-Index-Base) addressing support;
* dynptr helper signatures (bpf_dynptr_from_mem, bpf_dynptr_read, bpf_dynptr_write, bpf_dynptr_data) widened from 32-bit to 64-bit size/offset parameters;
Bug fixes
* As usual, a number of bug fixes included, see full commit log for details.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.
I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
A valid ELF file may contain a SHT_NOBITS .BTF section. This case is not
handled correctly in btf_parse_elf, which leads to a segfault.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog:
===========
- remove unnecessary struct_ops prog validity check
- handle yet another corner case of nulling out struct_ops program
- fix libbpf_strerror_r() handling unknown errors
- libbpf: improve early detection of doomed-to-fail BPF program loading
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
There is is no build time issues with libbpf for these
architectures so we can add them to COMPATIBLE_HOST
Signed-off-by: Denys Zagorui <dzagorui@cisco.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
using libbpf-native provided headers for pahole-native or other application.
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This dependency introduces a cycle with pahole:
```
kernel --> pahole --> libbpf
^ /
\ /
`------------------<
```
pahole is a build time dependency of the kernel which is required to
generate BTF symbols. The dependency on the kernel configuration is nice
to have but makes using pahole during kernel compile time impossible.
Furthermore this dependency doesn't make sense when building libbpf
purely to ship it via a SDK.
Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
its checking for .config values which means we need to stage kernel
sources before executing do_compile
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Matteo Croce <mcroce@microsoft.com>
The libbpf makefile uses pkg-config to get the libelf build flags and
file paths.
Inherit pkgconfig so the install target can copy the binaries in the
sysroot, which are needed by other packages, like bcc.
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>