-
Notifications
You must be signed in to change notification settings - Fork 176
fix(drivers): align and improve connect kernel drivers fillers
#2528
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/milestone 0.22.0 |
|
Please double check driver/SCHEMA_VERSION file. See versioning. /hold |
|
/unhold as schema version check is a false positive. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2528 +/- ##
=======================================
Coverage 78.53% 78.53%
=======================================
Files 292 292
Lines 31953 31953
Branches 4642 4642
=======================================
Hits 25094 25094
Misses 6859 6859
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The current bpf and kmod's `connect` fillers implementations extract socket tuple information only if the socket file descriptor is greater than or equal to zero: this does not ensure that the file descriptor is valid and that the kernel has the correct amount of information needed to build the socket tuple. On the other side, the modern probe implementation correctly checks the system call return value on the exit program, but doesn't try hard enough to build the socket tuple, as it does not leverage the sockaddr provided by the user. Align all three implementations, checking the system call return value and leveraging the user-provided sockaddr information to build the socket tuple. Signed-off-by: Leonardo Di Giovanna <[email protected]>
425b430 to
bf66bc2
Compare
X64 kernel testing matrix
ARM64 kernel testing matrix
|
|
LGTM label has been added. DetailsGit tree hash: 8b571ca1d636664239b6369b5711752feea120ba |
|
/unhold |
What type of PR is this?
/kind bug
/kind test
Any specific area of the project related to this PR?
/area driver-kmod
/area driver-bpf
/area driver-modern-bpf
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
The current bpf and kmod's
connectfillers implementations extract socket tuple information only if the socket file descriptor is greater than or equal to zero: this does not ensure that the file descriptor is valid and that the kernel has the correct amount of information needed to build the socket tuple.On the other side, the modern probe implementation correctly checks the system call return value on the exit program, but doesn't try hard enough to build the socket tuple, as it does not leverage the sockaddr provided by the user.
This PR aligns all three implementations, checking the system call return value and leveraging the user-provided sockaddr information to build the socket tuple.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: