title | description |
---|---|
KFunc 'bpf_get_file_xattr' |
This page documents the 'bpf_get_file_xattr' eBPF kfunc, including its defintion, usage, program types that can use it, and examples. |
Get xattr of a file
Get xattr name__str
of file
and store the output in value_ptr
.
For security reasons, only name__str
with prefix "user." is allowed.
Return
0 on success, a negative value on error.
#!c int bpf_get_file_xattr(struct file *file, const char *name__str, struct bpf_dynptr_kern *value_ptr)
!!! note This function may sleep, and therefore can only be used from sleepable programs.
!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome
The following program types can make use of this kfunc:
!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome