-
Notifications
You must be signed in to change notification settings - Fork 151
bpf: Nested rcu critical sections #10315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: 4722981 |
4a6b8b7 to
1efb39d
Compare
|
Upstream branch: 7dc211c |
16405eb to
a71e02b
Compare
1efb39d to
5b97b4a
Compare
|
Upstream branch: ec12ab2 |
a71e02b to
10bf1c8
Compare
5b97b4a to
7b6b51d
Compare
|
Upstream branch: d6ec090 |
10bf1c8 to
7811cf1
Compare
7b6b51d to
2412df8
Compare
|
Upstream branch: d6ec090 |
7811cf1 to
e8530c2
Compare
2412df8 to
bfb0726
Compare
|
Upstream branch: d088da9 |
e8530c2 to
512f337
Compare
bfb0726 to
b0a5b86
Compare
|
Upstream branch: e0940c6 |
512f337 to
48aad25
Compare
b0a5b86 to
44cbecf
Compare
|
Upstream branch: 792f258 |
Currently, nested rcu critical sections are rejected by the verifier and rcu_lock state is managed by a boolean variable. Add support for nested rcu critical sections by make active_rcu_locks a counter similar to active_preempt_locks. bpf_rcu_read_lock() increments this counter and bpf_rcu_read_unlock() decrements it, MEM_RCU -> PTR_UNTRUSTED transition happens when active_rcu_locks drops to 0. Signed-off-by: Puranjay Mohan <[email protected]>
As verifier now supports nested rcu critical sections, add new test cases to make sure unbalanced usage of rcu_read_lock()/unlock() is rejected. Signed-off-by: Puranjay Mohan <[email protected]>
48aad25 to
744e635
Compare
Pull request for series with
subject: bpf: Nested rcu critical sections
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1024478