-
Notifications
You must be signed in to change notification settings - Fork 145
Stacktrace test ci #9914
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
Closed
olsajiri
wants to merge
9
commits into
kernel-patches:bpf-next_base
from
olsajiri:stacktrace_test_ci
Closed
Stacktrace test ci #9914
olsajiri
wants to merge
9
commits into
kernel-patches:bpf-next_base
from
olsajiri:stacktrace_test_ci
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When using bpf_program__attach_kprobe_multi_opts on ARM64 to hook a BPF program that contains the bpf_get_stackid function, the BPF program fails to obtain the stack trace and returns -EFAULT. This is because ftrace_partial_regs omits the configuration of the pstate register, leaving pstate at the default value of 0. When get_perf_callchain executes, it uses user_mode(regs) to determine whether it is in kernel mode. This leads to a misjudgment that the code is in user mode, so perf_callchain_kernel is not executed and the function returns directly. As a result, trace->nr becomes 0, and finally -EFAULT is returned. Therefore, the assignment of the pstate register is added here. Fixes: b9b55c8 ("tracing: Add ftrace_partial_regs() for converting ftrace_regs to pt_regs") Closes: https://lore.kernel.org/bpf/[email protected]/ Signed-off-by: Feng Yang <[email protected]>
This reverts commit 83f44ae. Acked-by: Song Liu <[email protected]> Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
…p_tp Signed-off-by: Jiri Olsa <[email protected]>
37d5560
to
fe5c502
Compare
5558007
to
55c7461
Compare
4c21ee1
to
e08c683
Compare
034e8d9
to
bd1a434
Compare
Adding stacktrace test for kprobe[_multi] probes. Signed-off-by: Jiri Olsa <[email protected]> --- test for arm fix posted separately in here: https://lore.kernel.org/bpf/[email protected]/
Signed-off-by: Jiri Olsa <[email protected]>
Adding stacktrace test for uprobe[_multi] probes. Signed-off-by: Jiri Olsa <[email protected]>
e08c683
to
ec923f3
Compare
c0ceb80
to
62280db
Compare
c85a7ce
to
a4b455f
Compare
a4b455f
to
4038f13
Compare
Automatically cleaning up stale PR; feel free to reopen if needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.