From: sashiko-bot@kernel.org
To: "Andrey Grodzovsky" <andrey.grodzovsky@crowdstrike.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 5/8] libbpf: Version bpf_program__set_autoattach() ABI change
Date: Wed, 23 Sep 2026 23:41:27 +0000 [thread overview]
Message-ID: <20260923234127.EDD341F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923232939.1886328-6-andrey.grodzovsky@crowdstrike.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] libbpf: API/ABI pollution with internal symbol versioning aliases
--
commit d36af029b0efcdd76647414b7d862ed1b5af5ff2
Author: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>
libbpf: Version bpf_program__set_autoattach() ABI change
This commit splits bpf_program__set_autoattach() via ELF symbol versioning to
change its return type from void to int. It introduces
bpf_program__set_autoattach_deprecated for the original behavior and
bpf_program__set_autoattach_v1_8_0 for the new behavior.
> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
> index faea42f758479..d172c137cc376 100644
> --- a/tools/lib/bpf/libbpf.h
> +++ b/tools/lib/bpf/libbpf.h
[ ... ]
> @@ -393,6 +393,12 @@ LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
> LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
> LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog);
> LIBBPF_API int bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach);
> +/* this "specialization" should go away once the deprecation window for
> + * bpf_program__set_autoattach_deprecated() closes
> + */
> +LIBBPF_API int bpf_program__set_autoattach_v1_8_0(struct bpf_program *prog, bool autoattach);
> +LIBBPF_DEPRECATED_SINCE(1, 8, "use int-returning bpf_program__set_autoattach() instead")
> +LIBBPF_API void bpf_program__set_autoattach_deprecated(struct bpf_program *prog, bool autoattach);
[Severity: High]
Does exposing these internal versioning aliases in the public header pollute
the public API?
Since bpf_program__set_autoattach_v1_8_0 is not in the export map, won't any
direct calls to it by users cause linker errors?
> diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
> index 8def5474885a8..999e791d98870 100644
> --- a/tools/lib/bpf/libbpf.map
> +++ b/tools/lib/bpf/libbpf.map
[ ... ]
> @@ -465,6 +465,8 @@ LIBBPF_1.8.0 {
> bpf_program__clone;
> bpf_program__load;
> bpf_program__load_strategy;
> + bpf_program__set_autoattach;
> + bpf_program__set_autoattach_deprecated;
[Severity: High]
Is it intended to export bpf_program__set_autoattach_deprecated in the
LIBBPF_1.8.0 ABI node?
This seems to make it a newly added, globally-visible ABI symbol instead of
an internal symver target, which permanently pollutes the libbpf.so stable
ABI.
> bpf_program__set_load_strategy;
> btf__find_by_name_kind_own;
> btf__new_empty_opts;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923232939.1886328-1-andrey.grodzovsky@crowdstrike.com?part=5
next prev parent reply other threads:[~2026-09-23 23:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 23:29 [PATCH bpf-next v5 0/8] libbpf: BPF program manual loading Andrey Grodzovsky
2026-09-23 23:29 ` [PATCH bpf-next v5 1/8] libbpf: BPF program load strategy enum Andrey Grodzovsky
2026-09-24 0:18 ` bot+bpf-ci
2026-09-23 23:29 ` [PATCH bpf-next v5 2/8] libbpf: BPF programs manual loading and attaching Andrey Grodzovsky
2026-09-23 23:43 ` sashiko-bot
2026-09-24 0:32 ` bot+bpf-ci
2026-09-28 1:40 ` Andrey Grodzovsky
2026-09-30 15:50 ` Andrii Nakryiko
2026-09-24 23:18 ` Andrii Nakryiko
2026-09-26 16:56 ` Andrey Grodzovsky
2026-09-23 23:29 ` [PATCH bpf-next v5 3/8] libbpf: Support declarative manual load via SEC("!...") prefix Andrey Grodzovsky
2026-09-24 23:18 ` Andrii Nakryiko
2026-09-23 23:29 ` [PATCH bpf-next v5 4/8] libbpf: Reject gen_loader for objects with already-manual programs Andrey Grodzovsky
2026-09-24 23:18 ` Andrii Nakryiko
2026-09-26 17:49 ` Andrey Grodzovsky
2026-09-23 23:29 ` [PATCH bpf-next v5 5/8] libbpf: Version bpf_program__set_autoattach() ABI change Andrey Grodzovsky
2026-09-23 23:41 ` sashiko-bot [this message]
2026-09-24 0:32 ` bot+bpf-ci
2026-09-24 23:19 ` Andrii Nakryiko
2026-09-26 18:04 ` Andrey Grodzovsky
2026-09-30 15:50 ` Andrii Nakryiko
2026-09-23 23:29 ` [PATCH bpf-next v5 6/8] selftests/bpf: Cover BPF program load strategy transitions Andrey Grodzovsky
2026-09-24 0:18 ` bot+bpf-ci
2026-09-23 23:29 ` [PATCH bpf-next v5 7/8] selftests/bpf: Cover BPF program manual loading Andrey Grodzovsky
2026-09-24 0:32 ` bot+bpf-ci
2026-09-23 23:29 ` [PATCH bpf-next v5 8/8] selftests/bpf: Convert veristat to BPF_PROG_LOAD_STRATEGY_MANUAL Andrey Grodzovsky
2026-09-24 0:32 ` bot+bpf-ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923234127.EDD341F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andrey.grodzovsky@crowdstrike.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.