Skip to content

Find process using pid instead of tid#280

Merged
brb merged 1 commit intocilium:mainfrom
jschwinger233:gray/fix-process-output
Oct 27, 2023
Merged

Find process using pid instead of tid#280
brb merged 1 commit intocilium:mainfrom
jschwinger233:gray/fix-process-output

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
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