-
Notifications
You must be signed in to change notification settings - Fork 175
update(libsinsp): support indexed proc.args access #2382
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
CC @yg-oss I also notice that we have some new formatting requirements and checks since the last time I contributed -- I'll take a look! |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2382 +/- ##
==========================================
+ Coverage 77.02% 77.18% +0.15%
==========================================
Files 229 231 +2
Lines 30316 30357 +41
Branches 4657 4658 +1
==========================================
+ Hits 23352 23430 +78
+ Misses 6964 6927 -37
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:
|
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
42cb298
to
f431ecb
Compare
@@ -893,6 +911,22 @@ int32_t sinsp_filter_check_thread::parse_field_name(std::string_view val, | |||
} | |||
} | |||
|
|||
return res; | |||
} else if(STR_MATCH("proc.args")) { | |||
m_field_id = TYPE_ARGS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: who was setting m_field_id = TYPE_ARGS;
prior to your changes? Can't find it anywhere :O
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears to only apply to fields that could have an arg passed via []
notation within parse_field_name
.
And thanks to your comment I noticed I forgot to adjust the EBPF_*
for proc.args
, see my follow up commit :)
/milestone 0.21.0 |
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
a212e31
to
12f63be
Compare
m_tstr += tinfo->m_args[j]; | ||
if(j < nargs - 1) { | ||
m_tstr += ' '; | ||
if(m_argid >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FedeDP Suggesting to further clean this up after rebasing the next PR, new helper is introduced here https://github.com/falcosecurity/libs/pull/2387/files#r2074420790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This is a very useful feat!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, incertum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 37b373b119d11f55b94e7db3352141086e945677
|
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Support indexed proc.args access, community request, see falcosecurity/falco#3534
Which issue(s) this PR fixes:
Part 1 falcosecurity/falco#3534
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: