-
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
new: add setre*id syscall family #1871
Conversation
Please double check driver/API_VERSION file. See versioning. /hold |
c70bc18
to
df8f2aa
Compare
/milestone next-driver |
df8f2aa
to
ec22f2e
Compare
ec22f2e
to
ffe53cb
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
|
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.
Amazing job, thank you!
userspace/libsinsp/parsers.cpp
Outdated
if(new_euid < std::numeric_limits<uint32_t>::max()) | ||
{ | ||
if (evt->get_thread_info()) { | ||
evt->get_thread_info()->set_user(new_euid); |
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.
This is not related to this PR.
Looking inside set_user
code, why are we copying all the user info inside each thread info? wouldn't it be better to just save a shared pointer to a user struct with all the info? Is there a particular reason why we are doing this? @FedeDP
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.
Yes that's because if a process foo
is started as user pippo
but then user pippo is removed from the system (while the process runs), we should still be able to tell that process foo
has user pippo
even if it is not existing anymore, since that is the user it was started by.
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.
Now that i think about it, perhaps a shared_ptr would do the trick too!
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.
yep the user info should be available until the last thread using it is dead
ffe53cb
to
f093284
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
|
f093284
to
a7fbbc8
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
|
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.
Thank you! it would be great to add a bunch of userspace tests for these new parsers https://github.com/falcosecurity/libs/tree/master/userspace/libsinsp/test/parsers just to check we are doing the right thing
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
a7fbbc8
to
bb9f9ff
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
bb9f9ff
to
c0a45c2
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
|
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.
/approve
LGTM label has been added. Git tree hash: ca3c6dc541927fb5b23c34b0435d4481c3a079e7
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, therealbobo 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 |
/unhold |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area driver-kmod
/area driver-bpf
/area driver-modern-bpf
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
/version driver-SCHEMA-version-minor
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: