Skip to content

Commit e0940c6

Browse files
Nirbhay SharmaMartin KaFai Lau
authored andcommitted
bpf: Document cfi_stubs and owner fields in struct bpf_struct_ops
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 2cd3e37 ("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 <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent d088da9 commit e0940c6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/linux/bpf.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,12 +1922,14 @@ struct btf_member;
19221922
* reason, if this callback is not defined, the check is skipped as
19231923
* the struct_ops map will have final verification performed in
19241924
* @reg.
1925-
* @type: BTF type.
1926-
* @value_type: Value type.
1925+
* @cfi_stubs: Pointer to a structure of stub functions for CFI. These stubs
1926+
* provide the correct Control Flow Integrity hashes for the
1927+
* trampolines generated by BPF struct_ops.
1928+
* @owner: The module that owns this struct_ops. Used for module reference
1929+
* counting to ensure the module providing the struct_ops cannot be
1930+
* unloaded while in use.
19271931
* @name: The name of the struct bpf_struct_ops object.
19281932
* @func_models: Func models
1929-
* @type_id: BTF type id.
1930-
* @value_id: BTF value id.
19311933
*/
19321934
struct bpf_struct_ops {
19331935
const struct bpf_verifier_ops *verifier_ops;

0 commit comments

Comments
 (0)