-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tcpv4tracer: get the kernel TGID instead of the PID
bfp_get_current_pid_tgid() returns a u64 containing "current->tgid << 32 | current->pid". We were storing the return value in a u32, which means we got "current->pid". In kernel terms, the PID is actually what userspace calls a thread ID. What we actually want is what the userspace calls PID, and that's the kernel's TGID. Store the return value of bfp_get_current_pid_tgid() in a u64 and store it right-shifted 32 bits so we get the actual PID (TGID).
- Loading branch information
Showing
1 changed file
with
11 additions
and
10 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