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

update(driver): add support to openat2 syscall #80

Merged
merged 3 commits into from
Nov 15, 2021

Conversation

jasondellaluce
Copy link
Contributor

@jasondellaluce jasondellaluce commented Sep 10, 2021

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Co-authored-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area driver-kmod

/area driver-ebpf

/area libscap

/area libsinsp

What this PR does / why we need it:
This adds support for the openat2 system call, along with its transformation flags.

Which issue(s) this PR fixes:
falcosecurity/falco#676

Does this PR introduce a user-facing change?:

update(driver): add support to openat2 syscall

@poiana
Copy link
Contributor

poiana commented Sep 10, 2021

Welcome @jasondellaluce! It looks like this is your first PR to falcosecurity/libs 🎉

@poiana
Copy link
Contributor

poiana commented Sep 10, 2021

Hi @jasondellaluce. Thanks for your PR.

I'm waiting for a falcosecurity member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ghost
Copy link

ghost commented Sep 10, 2021

Sorry for nitpicking but I think that it shouldn't say "Fixes falcosecurity/falco#676" otherwise poiana would close the issue if this PR is merged I think

@jasondellaluce jasondellaluce changed the title update(driver): Add support to openat2 syscall update(driver): add support to openat2 syscall Sep 10, 2021
@leogr
Copy link
Member

leogr commented Sep 14, 2021

/ok-to-test

Copy link
Contributor

@gnosek gnosek left a comment

Choose a reason for hiding this comment

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

LGTM! The event names are unfortunate since we have both OPENAT2_[EX] and OPENAT_2_[EX] but I can't see a way around this.

Also, I know openat2 has been added in 5.6 and there's no struct open_how before, but is there e.g. a #define we could use instead of checking the kernel version? Just wondering, but I expect RHEL to backport this syscall into some 2.6.32 or other :D Maybe even #ifdef __NR_openat2 or similar? I rather like the idea of supporting the syscall even if the kernel does not, makes things simpler overall.

userspace/libsinsp/examples/util.cpp Outdated Show resolved Hide resolved
gnosek
gnosek previously approved these changes Nov 12, 2021
@poiana
Copy link
Contributor

poiana commented Nov 12, 2021

LGTM label has been added.

Git tree hash: 02656adf0ed466acef84a0ef2193e5652528430a

leogr
leogr previously approved these changes Nov 12, 2021
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Nov 12, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jasondellaluce, leogr

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

mstemm
mstemm previously approved these changes Nov 12, 2021
@leogr
Copy link
Member

leogr commented Nov 15, 2021

Hey @jasondellaluce

Could you rebase, please?

Thanks in advance 🙏

jasondellaluce and others added 3 commits November 15, 2021 08:33
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>

Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

approved again

@poiana poiana added the lgtm label Nov 15, 2021
@poiana
Copy link
Contributor

poiana commented Nov 15, 2021

LGTM label has been added.

Git tree hash: 792ee114700e915d668195cc296879f80f446595

@poiana poiana merged commit 1ed3e2a into falcosecurity:master Nov 15, 2021
@jasondellaluce jasondellaluce deleted the add_openat2_syscall branch November 15, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants