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

Android bpf_probe_read_kernel Failed #3094

Closed
Youlor opened this issue Sep 12, 2020 · 2 comments
Closed

Android bpf_probe_read_kernel Failed #3094

Youlor opened this issue Sep 12, 2020 · 2 comments

Comments

@Youlor
Copy link

Youlor commented Sep 12, 2020

Env:
Android10, arm64, kernel4.9.210, bcc 0.16.0

cmd:
python3 trace 'compat_sys_execve "%s", arg1' -v`

output:
arg1 is empty string, and I found bpf_probe_read_kernel return -14

How to solved it? Thank you!

@Youlor Youlor closed this as completed Sep 13, 2020
@Youlor Youlor reopened this Sep 13, 2020
@nagmat1
Copy link

nagmat1 commented Sep 13, 2020

It seems to be you are encountering page fault. It returns -14 because of page fault while reading the content. Bpf_probe_read() helper disables page_fault during reading. Try to use kretprobe, since in kprobe get the necessary info and in kretprobe, you do actual reading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants