From: Martin KaFai Lau <martin.lau@linux.dev>
To: Nirbhay Sharma <nirbhay.lkd@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bpf: Document cfi_stubs and owner fields in struct bpf_struct_ops
Date: Thu, 20 Nov 2025 11:29:17 -0800 [thread overview]
Message-ID: <f87d1365-a3b6-4307-9d72-91d5f5b2c585@linux.dev> (raw)
In-Reply-To: <20251119062430.997648-2-nirbhay.lkd@gmail.com>
On 11/18/25 10:24 PM, Nirbhay Sharma wrote:
> Add missing kernel-doc documentation for the cfi_stubs and owner
> fields in struct bpf_struct_ops to fix the following warnings:
>
> Warning: include/linux/bpf.h:1931 struct member 'cfi_stubs' not
> described in 'bpf_struct_ops'
> Warning: include/linux/bpf.h:1931 struct member 'owner' not
> described in 'bpf_struct_ops'
>
> The cfi_stubs field was added in commit 2cd3e3772e41 ("x86/cfi,bpf:
> Fix bpf_struct_ops CFI") to provide CFI stub functions for trampolines,
> and the owner field is used for module reference counting.
>
> Signed-off-by: Nirbhay Sharma <nirbhay.lkd@gmail.com>
> ---
> include/linux/bpf.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index d808253f2e94..d39b4b2c8f35 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -1905,10 +1905,16 @@ struct btf_member;
> * reason, if this callback is not defined, the check is skipped as
> * the struct_ops map will have final verification performed in
> * @reg.
> - * @type: BTF type.
> - * @value_type: Value type.
> + * @cfi_stubs: Pointer to a structure of stub functions for CFI. These stubs
> + * provide the correct Control Flow Integrity hashes for the
> + * trampolines generated by BPF struct_ops.
> + * @owner: The module that owns this struct_ops. Used for module reference
> + * counting to ensure the module providing the struct_ops cannot be
> + * unloaded while in use.
> * @name: The name of the struct bpf_struct_ops object.
> * @func_models: Func models
> + * @type: BTF type.
> + * @value_type: Value type.
> * @type_id: BTF type id.
> * @value_id: BTF value id.
Please take this chance to remove all doc after func_models. Meaning
remove type, value_type, type_id, and value_id. They were removed in
commit 4c5763ed996a.
pw-bot: cr
next prev parent reply other threads:[~2025-11-20 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 6:24 [PATCH] bpf: Document cfi_stubs and owner fields in struct bpf_struct_ops Nirbhay Sharma
2025-11-20 19:29 ` Martin KaFai Lau [this message]
2025-11-20 20:46 ` [PATCH v2] " Nirbhay Sharma
2025-11-20 22:10 ` patchwork-bot+netdevbpf
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=f87d1365-a3b6-4307-9d72-91d5f5b2c585@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=david.hunter.linux@gmail.com \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nirbhay.lkd@gmail.com \
--cc=sdf@fomichev.me \
--cc=skhan@linuxfoundation.org \
--cc=song@kernel.org \
--cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox