-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat(userspace/libsinsp): improve recvmsg
SCM_RIGHTS
cmsg handling
#2262
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Leonardo Di Giovanna <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ekoops The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
SCM_RIGHTS
cmsg handlingrecvmsg
SCM_RIGHTS
cmsg handling
/milestone 0.21.0 |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2262 +/- ##
==========================================
- Coverage 75.34% 75.33% -0.02%
==========================================
Files 279 279
Lines 34368 34373 +5
Branches 5872 5872
==========================================
Hits 25894 25894
- Misses 8474 8479 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/hold |
05b2b33
to
9183259
Compare
Parse all control messages instead of parsing just the first one. Leverage the new scap_get_fdinfo API to get info only from the file in procfs associated to the file descriptor, instead of scanning each time the entire procfs fd directory. Signed-off-by: Leonardo Di Giovanna <[email protected]>
9183259
to
c7f02ba
Compare
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libscap-engine-gvisor
/area libscap
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This enhances file descriptor handling in the context of
SCM_RIGHTS
control message processing forrecvmsg
events. Specifically:cmsghdr
and all file descriptors contained inSCM_RIGHTS
control messages, by selectively call the new API on them, instead of entirely scanning the entire procfs fd directory each time.readlink + sscanf
calls with a single call tostat
for retrieving the inode number of a network namespace inscap_fd_scan_fd_dir
andscap_fd_get_fdinfo
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: