Re: [PATCH] libbpf: resolve versioned kfuncs by exact name before essential-name lookup

From: bot+bpf-ci

Date: Thu Mar 26 2026 - 17:18:12 EST


> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 1eaa7527d4da..85268406c0f5 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -8630,6 +8630,40 @@ static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj,
>
> local_func_proto_id = ext->ksym.type_id;
>
> + /*
> + * For kfuncs with a flavor suffix (e.g. "func___v2"), first try the
> + * exact name.

[ ... ]

> + if (ext->essent_name) {

This commit fixes a bug introduced by the patch that added
triple-underscore flavor support for kfunc relocation. Should it
include a Fixes: tag?

Suggested:
Fixes: 5964a223f5e4 ("libbpf: Support triple-underscore flavors for kfunc relocation")

> + struct module_btf *exact_mod_btf = NULL;

[ ... ]

> + }
> +


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23617578044