Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

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

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: e12873e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=999812
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 93a83d0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=999812
version: 1

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]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 60ef541
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=999812
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=999812 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants