Skip to content

KFunc bpf_get_file_xattr

v6.8

Get extended attributed of a file

Definition

Get extended attributed 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.

int bpf_get_file_xattr(struct file *file, const char *name__str, struct bpf_dynptr *value_p)

Note

This function may sleep, and therefore can only be used from sleepable programs.

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

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