-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Limit uprobes in shared libraries to a single process when -p
is given
#2817
Labels
enhancement
New feature or request, changes on existing features
Comments
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 16, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
Working on this one here: #2830 |
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 16, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 17, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
3 tasks
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 17, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 19, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 20, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 21, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 24, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
jordalgo
pushed a commit
to jordalgo/bpftrace
that referenced
this issue
Nov 25, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](bpftrace#2817)
danobi
pushed a commit
that referenced
this issue
Nov 29, 2023
This adds support for specifying the pid even when targeting a uprobe/uretprobe in a library shared by multiple pids. Example: ``` sudo bpftrace -p 1899508 -e 'uprobe:libc:getaddrinfo { print((comm, pid)); } ``` [Issue 2817](#2817)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When attaching to uprobes in shared libraries, the
-p
option is ignored, i.e. library functions called from all processes are hit. Limiting to the calls from the given process would make more sense, e.g. thegethostlatency.bt
tool (which attaches to several libc functions) could be used per-process:At the moment, the above command will show host name lookup times for all processes, not just the firefox process. See #2813 for details (the reproducer from there can be used on non-NixOs systems, too).
Describe the solution you'd like
The
bpf_attach_uprobe
function from BCC that we use has apid
parameter. At the moment, we're only using the parameter for theBEGIN
andEND
probes, this could be expanded to also pass the value from-p
. We're already doing something similar for USDT probes.The text was updated successfully, but these errors were encountered: