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

link: implement uprobe/uretprobe #279

Merged
merged 1 commit into from
Apr 21, 2021
Merged

link: implement uprobe/uretprobe #279

merged 1 commit into from
Apr 21, 2021

Conversation

mmat11
Copy link
Contributor

@mmat11 mmat11 commented Apr 10, 2021

Closes #277

TODO

@ti-mo ti-mo self-assigned this Apr 12, 2021
internal/elf.go Outdated Show resolved Hide resolved
link/perf_event.go Outdated Show resolved Hide resolved
link/perf_event.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
internal/elf.go Outdated Show resolved Hide resolved
link/perf_event.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/perf_event.go Outdated Show resolved Hide resolved
link/perf_event.go Outdated Show resolved Hide resolved
@mmat11 mmat11 force-pushed the link-uprobe branch 2 times, most recently from 8f674ba to 7db6425 Compare April 15, 2021 21:49
@mmat11
Copy link
Contributor Author

mmat11 commented Apr 15, 2021

@ti-mo
Copy link
Collaborator

ti-mo commented Apr 16, 2021

uprobetracer.txt was renamed to uprobetracer.rst in 4.17, so this is expected. The commit f3f096cfedf8 that introduced /uprobe_events landed in kernel 3.5, so kernel support should not be an issue. This test does pass on our 4.14 CI kernel. I think something must've changed in the config defaults between 4.9 and 4.14, since we don't enable uprobes explicitly in our CI kernels.

It's probably okay to skip the test if tracefsProbe() returns ENOENT there.

@mmat11
Copy link
Contributor Author

mmat11 commented Apr 16, 2021

@ti-mo
Copy link
Collaborator

ti-mo commented Apr 16, 2021

@mmat11 Tracking this in cilium/ci-kernels#11, feel free to add a conditional skip.

link/executable.go Outdated Show resolved Hide resolved
link/executable.go Outdated Show resolved Hide resolved
link/executable.go Outdated Show resolved Hide resolved
@lmb
Copy link
Collaborator

lmb commented Apr 16, 2021

Some last minute drive by comments, looks great!

@lmb
Copy link
Collaborator

lmb commented Apr 16, 2021

@mmat11 Tracking this in cilium/ci-kernels#11, feel free to add a conditional skip.

BRANCH=uprobes ./run-tests.sh 5.10 should work now.

@mmat11 mmat11 force-pushed the link-uprobe branch 3 times, most recently from 1936319 to 368856c Compare April 19, 2021 12:19
@mmat11 mmat11 marked this pull request as ready for review April 19, 2021 12:20
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on the refactor! Left a few readability comments, but solid overall. 👌

link/uprobe.go Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/kprobe.go Show resolved Hide resolved
link/kprobe.go Show resolved Hide resolved
link/kprobe.go Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Outdated Show resolved Hide resolved
link/uprobe.go Show resolved Hide resolved
Signed-off-by: Mattia Meleleo <melmat@tuta.io>
@ti-mo ti-mo merged commit 89b0b27 into cilium:master Apr 21, 2021
@mmat11 mmat11 deleted the link-uprobe branch November 1, 2022 15:50
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

Successfully merging this pull request may close these issues.

API for attaching eBPF programs to uprobe perf events
3 participants