Re: [PATCH bpf-next v3 6/6] docs, resolve_btfids: Document kfunc BTF annotation emission

[email protected]
Newsgroups org.kernel.vger.bpf
Message-ID <2fb3b453d9246c8844beadaba758fa6f5ce1a7131dd12886658d3032e40179e7@mail.kernel.org>
> diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst
> index cbde86d082cce..021be6d93dfb0 100644
> --- a/Documentation/bpf/kfuncs.rst
> +++ b/Documentation/bpf/kfuncs.rst
> @@ -472,6 +472,13 @@ type. An example is shown below::
>          }
>          late_initcall(init_subsystem);
>
> +At kernel build time the ``resolve_btfids`` tool finds all kfuncs declared with
> +``BTF_KFUNCS_START()`` and emits their BTF annotations into the kernel's BTF.
> +For each kfunc it emits a ``bpf_kfunc`` BTF decl tag, a ``bpf_fastcall`` decl
> +tag when the kfunc is flagged ``KF_FASTCALL``, and the ``address_space(1)`` type
> +attribute on the return value and/or arguments flagged ``KF_ARENA_RET``,
> +``KF_ARENA_ARG1`` or ``KF_ARENA_ARG2`` (see section 2.8).
                                             ^^^^^^^^^^^^^^^

Should this use an RST :ref: link instead of a hard-coded section number?
The arena section currently has no label. If a 2.x subsection is inserted
or reordered later, the reference would silently break, and the rendered
HTML gives no clickable link. All other cross-references in kfuncs.rst use
RST labels and :ref: (lines 16, 27, 51, 415, 609, 625, 807).

[ ... ]


---
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/31144437704
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.