Skip to content

Conversation

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

Pull request for series with
subject: bpf: Add kfuncs and selftests for detecting execution context and selftests
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1014468

mrpre added 2 commits October 22, 2025 04:38
This path introduces several kfuncs to help BPF programs determine their
current execution context. When hooking functions for statistics, we often
need to use current->comm to get the process name.

However, these hooked functions can be called from either process context
or interrupt context. When called from interrupt context, the current we
obtain may refer to the process that was interrupted, which may not be
what we need.

These new kfuncs expose APIs that allow users to determine the actual
execution context.

Signed-off-by: Jiayuan Chen <[email protected]>
Add selftests for the newly introduced context detection kfuncs.

The tests verify that each kfunc correctly identifies its respective
execution context by triggering different contexts

Signed-off-by: Jiayuan Chen <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

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

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

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1014468 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