forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: fix misuse of bpf_get_current_pid_tgid
bpf_get_current_pid_tgid() returns process ID in the upper 32bits, and thread ID in lower 32 bits (both from userspace's perspective). biosnoop and gethostlatency misuse this function. biosnoop takes the thread ID as process ID which is not expected. gethostlatency uses the process ID as a unique key for BPF map, which may result in event loss or data corruption. This commit fixes these problems. Signed-off-by: Hengqi Chen <[email protected]>
- Loading branch information
1 parent
528be5e
commit b1ebd4f
Showing
3 changed files
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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