> libbpf: Separate interfaces shared with in-tree tools TL;DR: Design question: Andrii Nakryiko objected earlier to the new libbpf_tools.h header and preferred guarding the u32 poison pragmas in libbpf_internal.h; this version doesn't address that. > diff --git a/tools/lib/bpf/libbpf_tools.h b/tools/lib/bpf/libbpf_tools.h > new file mode 100644 > index 000000000000..5c8d6d0d2fdd > --- /dev/null > +++ b/tools/lib/bpf/libbpf_tools.h > @@ -0,0 +1,184 @@ > +/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ > +#ifndef __LIBBPF_TOOLS_H > +#define __LIBBPF_TOOLS_H Andrii Nakryiko objected to introducing libbpf_tools.h in the v2 and v3 discussions. He prefers keeping these declarations in libbpf_internal.h and guarding the u32 poison pragmas with an #ifdef that resolve_btfids can disable: I don't like libbpf_tools.h approach, if GCC poison is a problem I'd rather guard that. The poisoning is the root cause in the commit message, and this version still adds the new header without a respin addressing that. Should the poison pragmas in libbpf_internal.h be guarded instead of splitting out libbpf_tools.h? --- 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/45506767613