bpf/arena: Add kfunc for reserving arena memory
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 2 repliesApplied 2/2
- v3 posting 3/32 patches 3 repliesSuperseded
- v3 posting 2/32 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 posting 1/3 | 0 of 2 patches | 0 replies | Superseded | |
| v2 | 2 patches | 1 reply | Superseded | |
| v1 | 2 patches | 7 replies | Superseded |
Patches in v4 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf/arena: add bpf_arena_reserve_pages kfunckernel/ | +43 | 1 reply | Applied |
| 2/2 | selftests/bpf: add selftests for bpf_arena_reserve_pagestools/ tools/ tools/ | +207 | 1 reply | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Yonghong Song | Kumar Kartikeya Dwivedi |
|---|---|---|
| 1/2 | A-b | A-b |
| 2/2 | A-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] bpf/arena: Add kfunc for reserving arena memory
Add a new kfunc for BPF arenas that reserves a region of the mapping to prevent it from being mapped. These regions serve as guards against out-of-bounds accesses and are useful for debugging arena-related code.
CHANGELOG
=========
Quoted 1 line
From v3 ([email protected])
------------------------------------------------------
- Added Acked-by tags by Yonghong.
- Replace hardcoded error numbers in selftests (Yonghong).
- Fixed selftest for partially freeing a reserved region (Yonghong).
Quoted 1 line
From v2 ([email protected])
------------------------------------------------------
- Removed -EALREADY and replaced with -EINVAL to bring error handling in line with the rest of the BPF code (Alexei).
Quoted 1 line
From v1 ([email protected])
------------------------------------------------------
- Removed the additional guard range tree. Adjusted tests accordingly. Reserved regions now behave like allocated regions, and can be unreserved using bpf_arena_free_pages(). They can also be allocated from userspace through minor faults. It is up to the user to prevent erroneous frees and/or use the BPF_F_SEGV_ON_FAULT flag to catch stray userspace accesses (Alexei).
- Changed terminology from guard pages to reserved pages (Alexei, Kartikeya).
Emil Tsalapatis (2):
bpf/arena: add bpf_arena_reserve_pages kfunc selftests/bpf: add selftests for bpf_arena_reserve_pages
kernel/bpf/arena.c | 43 +++++++ .../testing/selftests/bpf/bpf_arena_common.h | 3 + .../selftests/bpf/progs/verifier_arena.c | 106 ++++++++++++++++++ .../bpf/progs/verifier_arena_large.c | 98 ++++++++++++++++ 4 files changed, 250 insertions(+)
Signature · 1 line
2.49.0