bpf: Handle MEM_RCU type properly
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
- v2 Latest3 patches 0 repliesApplied 3/3
- v11 patch 5 repliesSuperseded
Changes in v2 from the cover letter
- rcu ptr could be NULL.
- non_null_rcu_ptr->rcu_field can be marked as MEM_RCU as well.
- Adjust the code to avoid existing error message change.
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf: Handle MEM_RCU type properlyinclude/ include/ kernel/ +1 more | +48 | 0 replies | Applied |
| 2/3 | selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semanticstools/ | +45 | 0 replies | Applied |
| 3/3 | docs/bpf: Add KF_RCU documentationDocumentation/ | +9 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH bpf-next v2 0/3] bpf: Handle MEM_RCU type properly
Patch set [1] added rcu support for bpf programs. In [1], a rcu pointer is considered to be trusted and not null. This is actually not true in some cases. The rcu pointer could be null, and for non-null rcu pointer, it may have reference count of 0. This small patch set fixed this problem. Patch 1 is the kernel fix. Patch 2 adjusted selftests properly. Patch 3 added documentation for newly-introduced KF_RCU flag.
[1] https://lore.kernel.org/all/[email protected]/
Changelogs:
v1 -> v2:
- rcu ptr could be NULL.
- non_null_rcu_ptr->rcu_field can be marked as MEM_RCU as well.
- Adjust the code to avoid existing error message change.
Yonghong Song (3):
bpf: Handle MEM_RCU type properly
selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semantics docs/bpf: Add KF_RCU documentation
Documentation/bpf/kfuncs.rst | 9 +++ include/linux/bpf_verifier.h | 2 +- include/linux/btf.h | 1 + kernel/bpf/helpers.c | 14 +++++ kernel/bpf/verifier.c | 45 ++++++++++----- .../selftests/bpf/progs/rcu_read_lock.c | 55 +++++++++++++++---- 6 files changed, 102 insertions(+), 24 deletions(-)
Signature · 1 line
2.30.2