Skip to content

Commit a840f3f

Browse files
Nirbhay SharmaKernel Patches Daemon
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]>
1 parent 2412df8 commit a840f3f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/linux/bpf.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,10 +1922,16 @@ 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
1933+
* @type: BTF type.
1934+
* @value_type: Value type.
19291935
* @type_id: BTF type id.
19301936
* @value_id: BTF value id.
19311937
*/

0 commit comments

Comments
 (0)