On 3/12/20 7:50 PM, Andrii Nakryiko wrote:
Needs for application BTF being present differs between user-space libbpf needs and kernel needs. Currently, BTF is mandatory only in kernel only when BPF application is using STRUCT_OPS. While libbpf itself relies more heavily on presense of BTF: - for BTF-defined maps; - for Kconfig externs; - for STRUCT_OPS as well. Thus, checks for presence and validness of bpf_object's BPF needs to be performed separately, which is patch does. Fixes: 5327644614a1 ("libbpf: Relax check whether BTF is mandatory") Reported-by: Michal Rostecki <mrostecki@xxxxxxxxxxxx> Cc: Quentin Monnet <quentin@xxxxxxxxxxxxx> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
Applied, thanks!