Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.33 KB

bpf_get_file_xattr.md

File metadata and controls

47 lines (30 loc) · 1.33 KB
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.

KFunc bpf_get_file_xattr

:octicons-tag-24: v6.8

Get xattr of a file

Definition

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.

Usage

!!! example "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

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome