-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: Fast-Path approach for BPF program termination #5911
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
bpf: Fast-Path approach for BPF program termination #5911
Conversation
|
Upstream branch: e12873e |
2d215b0 to
05282f4
Compare
|
Upstream branch: 93a83d0 |
6b8279c to
0dea227
Compare
05282f4 to
e2bfc81
Compare
Introduced the definition of struct bpf_term_aux_states required to support fast-path termination of BPF programs. Added the memory allocation and free logic for newly added term_states feild in struct bpf_prog. Signed-off-by: Raj Sahu <[email protected]> Signed-off-by: Siddharth Chintamaneni <[email protected]>
Create callsites tables and store jit indexes of RET_NULL calls to poke them later with dummy functions. Additional to jit indexes, meta data about helpers/kfuncs/loops is stored. Later this could be extended to remaining potential long running iterator helpers/kfuncs. Signed-off-by: Raj Sahu <[email protected]> Signed-off-by: Siddharth Chintamaneni <[email protected]>
Update softlock detection logic to detect any stalls due to BPF programs. When softlockup is detected, bpf_die will be added to a workqueue on a CPU. With this implementation termination handler will only get triggered when CONFIG_SOFTLOCKUP_DETECTOR is enabled. Inside bpf_die, we perform the text_poke to stub helpers/kfuncs. The current implementation handles termination of long running bpf_loop iterators both inlining and non-inlining case. The limitation of this implementation is that the termination handler atleast need a single CPU to run. Signed-off-by: Raj Sahu <[email protected]> Signed-off-by: Siddharth Chintamaneni <[email protected]>
…sted bpf loops Adds tests checks for loops termination which are nested. 32/1 bpf_termination/bpf_termination:OK 32 bpf_termination:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Raj Sahu <[email protected]> Signed-off-by: Siddharth Chintamaneni <[email protected]>
|
Upstream branch: 60ef541 |
0dea227 to
286cfff
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=999812 expired. Closing PR. |
Pull request for series with
subject: bpf: Fast-Path approach for BPF program termination
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=999812