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

Use socket cookie for cgroup skb task context #338

Merged
merged 10 commits into from
Sep 2, 2024
Merged

Use socket cookie for cgroup skb task context #338

merged 10 commits into from
Sep 2, 2024

Conversation

anjmao
Copy link
Collaborator

@anjmao anjmao commented Aug 29, 2024

We are getting some invalid connection processes contexts when there is some server/client running on the same host and client connects to server. In such case socket may be cloned. Current logic of trying to find correct context form old socket doesn't always work.

This PR uses bpf socket storage map to store network task context.

Copy link
Contributor

@patrickpichler patrickpichler left a comment

Choose a reason for hiding this comment

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

Awesome change,that simplifies quite a lot 🎉 🚀

As pointed out in one comment, investigating if sock storage could even further simplifies it, would be nice.

pkg/ebpftracer/c/tracee.bpf.c Outdated Show resolved Hide resolved
pkg/ebpftracer/c/tracee.bpf.c Outdated Show resolved Hide resolved
pkg/ebpftracer/c/tracee.bpf.c Show resolved Hide resolved
@anjmao anjmao merged commit c76ae7e into main Sep 2, 2024
2 checks passed
@anjmao anjmao deleted the fix-netctx branch September 2, 2024 12:01
@anjmao anjmao mentioned this pull request Sep 4, 2024
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