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

Find process using pid instead of tid #280

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

jschwinger233
Copy link
Member

Previously we use tid to find process, leading to misleading output under some situations.

According to documentation, bpf_get_current_pid_tgid returns current->tgid << 32 | current->pid. Kernel's view of the PID in user space is usually presented as the thread ID, and kernel's tgid in user space is seen as PID.

Previously we use tid to find process, leading to misleading output under some situations.

According to documentation, `bpf_get_current_pid_tgid` returns `current->tgid << 32 | current->pid`. Kernel's view of the pid in user space is usually presented as the thread ID, and kernel's tgid in user space is seen as pid.

Signed-off-by: Zhichuan Liang<gray.liang@isovalent.com>
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

Thanks!

@brb brb merged commit 37227ac into cilium:main Oct 27, 2023
5 checks passed
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.

2 participants