Add user-space and non-CO-RE variants of BPF_CORE_READ()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libbpf: add user-space variants of BPF_CORE_READ() family of macrostools/ | +59 | 0 replies | |
| 2/3 | libbpf: add non-CO-RE variants of BPF_CORE_READ() macro familytools/ | +38 | 0 replies | |
| 3/3 | selftests/bpf: add tests for user- and non-CO-RE BPF_CORE_READ() variantstools/ tools/ | +115 | 8 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH bpf-next 0/3] Add user-space and non-CO-RE variants of BPF_CORE_READ()
Add two sets of BPF_CORE_READ()-like macros. One is for reading kernel data from user address space (e.g., UAPI data structs for syscalls). Another one is non-CO-RE variants, which don't emit CO-RE relocations and thus won't fail on kernels without BTF. The latter one still provides much shorter way to write reads that needs to chase few pointers.
Andrii Nakryiko (3):
libbpf: add user-space variants of BPF_CORE_READ() family of macros
libbpf: add non-CO-RE variants of BPF_CORE_READ() macro family selftests/bpf: add tests for user- and non-CO-RE BPF_CORE_READ()
variants
tools/lib/bpf/bpf_core_read.h | 136 +++++++++++++----- .../bpf/prog_tests/core_read_macros.c | 64 +++++++++ .../bpf/progs/test_core_read_macros.c | 51 +++++++ 3 files changed, 212 insertions(+), 39 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/core_read_macros.c create mode 100644 tools/testing/selftests/bpf/progs/test_core_read_macros.c
Signature · 1 line
2.24.1