Skip to content

Libbpf eBPF macro bpf_core_read_user

v0.4.0

The bpf_core_read_user macro abstracts away bpf_probe_read_user call and captures offset relocation.

Definition

#define bpf_core_read_user(dst, sz, src)                    \
    bpf_probe_read_user(dst, sz, (const void *)__builtin_preserve_access_index(src))

Usage

The bpf_core_read_user is the userspace variant of bpf_core_read. It wraps the bpf_probe_read_user helper function instead of bpf_probe_read.

Please refer to the bpf_core_read documentation for more details on usage of it and its variants like this macros.

Example

Docs could be improved

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