diff options
author | Kumar Kartikeya Dwivedi <[email protected]> | 2024-02-05 05:56:45 +0000 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2024-02-05 20:00:14 -0800 |
commit | 6fceea0fa59f6786a2847a4cae409117624e8b58 (patch) | |
tree | 0756fa0cce159ca3d2eb887f3b4c53fab2e823c5 /scripts/gdb/linux/vmalloc.py | |
parent | 8244ab509f89d63941d5ee207967c5a3e00bb493 (diff) |
bpf: Transfer RCU lock state between subprog calls
Allow transferring an imbalanced RCU lock state between subprog calls
during verification. This allows patterns where a subprog call returns
with an RCU lock held, or a subprog call releases an RCU lock held by
the caller. Currently, the verifier would end up complaining if the RCU
lock is not released when processing an exit from a subprog, which is
non-ideal if its execution is supposed to be enclosed in an RCU read
section of the caller.
Instead, simply only check whether we are processing exit for frame#0
and do not complain on an active RCU lock otherwise. We only need to
update the check when processing BPF_EXIT insn, as copy_verifier_state
is already set up to do the right thing.
Suggested-by: David Vernet <[email protected]>
Tested-by: Yafang Shao <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
Acked-by: David Vernet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions