Skip to content
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: Return error for missed kprobe multi bpf program execution #8322

Open
wants to merge 2 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf: Return error for missed kprobe multi bpf program execution
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=922649

@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 859a7db
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922649
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

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

When kprobe multi bpf program can't be executed due to recursion check,
we currently return 0 (success) to fprobe layer where it's ignored for
standard kprobe multi probes.

For kprobe session the success return value will make fprobe layer to
install return probe and try to execute it as well.

But the return session probe should not get executed, because the entry
part did not run. FWIW the return probe bpf program most likely won't get
executed, because its recursion check will likely fail as well, but we
don't need to run it in the first place.. also we can make this clear
and obvious.

It also affects missed counts for kprobe session program execution, which
are now doubled (extra count for not executed return probe).

Signed-off-by: Jiri Olsa <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Adding kprobe.session probe to bpf_kfunc_common_test that misses bpf
program execution due to recursion check and making sure it increases
the program missed count properly.

Signed-off-by: Jiri Olsa <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

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

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.

1 participant