Re: [RFC PATCH bpf-next v2 2/3] libbpf: Add FEAT_KPROBE_MULTI_LINK feature probe.

From: Leon Hwang

Date: Mon Mar 30 2026 - 11:03:58 EST


On 2026/3/30 19:00, Varun R Mallya wrote:
> diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
> index 4bcb6ca69bb1..633106a687c7 100644
> --- a/tools/lib/bpf/libbpf_internal.h
> +++ b/tools/lib/bpf/libbpf_internal.h
> @@ -388,6 +388,8 @@ enum kern_feature_id {
> FEAT_SYSCALL_WRAPPER,
> /* BPF multi-uprobe link support */
> FEAT_UPROBE_MULTI_LINK,
> + /* BPF multi-kprobe link support */
> + FEAT_KPROBE_MULTI_LINK,

Even though it seems good to put FEAT_KPROBE_MULTI_LINK here, better to
put it at last to keep backwards compatibility?

When users compile application using old libbpf and run it against such
new libbpf.so, will they get incorrect feature support?

Thanks,
Leon

> /* Kernel supports arg:ctx tag (__arg_ctx) for global subprogs natively */
> FEAT_ARG_CTX_TAG,
> /* Kernel supports '?' at the front of datasec names */