-
Notifications
You must be signed in to change notification settings - Fork 165
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: Support for pidfd_getfd syscall #1145
Conversation
Please double check driver/API_VERSION file. See versioning. |
/milestone 0.12.0 |
@@ -174,7 +174,6 @@ TEST(SyscallExit, execveatX_correct_exit) | |||
/* Prepare the execve args */ | |||
int dirfd = 0; | |||
const char *pathname = "/usr/bin/echo"; | |||
const char *comm = "echo"; |
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 line should not be removed as this is required below for the __s390x__
block. However, I have corrected this with PR #1150. Thanks.
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.
uhm probably now we should remove it otherwise we will have it defined twice on s390x 🤔
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.
On master
this line is already removed and I have added it again for s390x
with PR #1150 . I think this hunk above will go away with rebasing to latest master
.
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.
oh, bad trip hahaha! thank you for the hint
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 work, thank you!
driver/event_table.c
Outdated
@@ -453,6 +453,8 @@ const struct ppm_event_info g_event_info[] = { | |||
[PPME_SYSCALL_PRCTL_X] = {"prctl", EC_PROCESS | EC_SYSCALL, EF_MODIFIES_STATE, 4, {{"res", PT_ERRNO, PF_DEC}, {"option", PT_ENUMFLAGS32, PF_DEC, prctl_options}, {"arg2_str", PT_CHARBUF, PF_NA}, {"arg2_int", PT_INT64, PF_DEC} } }, | |||
[PPME_ASYNCEVENT_E] = {"asyncevent", EC_OTHER | EC_METAEVENT, EF_LARGE_PAYLOAD, 3, {{"plugin_id", PT_UINT32, PF_DEC}, {"name", PT_CHARBUF, PF_NA}, {"data", PT_BYTEBUF, PF_NA} } }, | |||
[PPME_ASYNCEVENT_X] = {"NA", EC_UNKNOWN, EF_UNUSED, 0}, | |||
[PPME_SYSCALL_PIDFD_GETFD_E] = {"pidfd_getfd", EC_PROCESS | EC_SYSCALL, EF_CREATES_FD | EF_NONE, 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.
we don't need the EF_NONE
[PPME_SYSCALL_PIDFD_GETFD_E] = {"pidfd_getfd", EC_PROCESS | EC_SYSCALL, EF_CREATES_FD | EF_NONE, 0}, | |
[PPME_SYSCALL_PIDFD_GETFD_E] = {"pidfd_getfd", EC_PROCESS | EC_SYSCALL, EF_CREATES_FD, 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.
we still need to address it, same for exit event
@@ -174,7 +174,6 @@ TEST(SyscallExit, execveatX_correct_exit) | |||
/* Prepare the execve args */ | |||
int dirfd = 0; | |||
const char *pathname = "/usr/bin/echo"; | |||
const char *comm = "echo"; |
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.
uhm probably now we should remove it otherwise we will have it defined twice on s390x 🤔
43e17d2
to
1cf25be
Compare
Signed-off-by: Rohith Raju <rohithraju488@gmail.com>
Signed-off-by: Rohith Raju <rohithraju488@gmail.com>
Signed-off-by: rohith-raju <rohithraju488@gmail.com>
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.
Left some really minor comments! Great job!
To bump the SCHEMA_VERSION you have to do exactly this 2f1c561
Please note that you have to change it from 2.4.1
to 2.5.1
as I've done in that commit since it is not yet merged, so you will be the first to bump it this time :)
driver/event_table.c
Outdated
@@ -453,6 +453,8 @@ const struct ppm_event_info g_event_info[] = { | |||
[PPME_SYSCALL_PRCTL_X] = {"prctl", EC_PROCESS | EC_SYSCALL, EF_MODIFIES_STATE, 4, {{"res", PT_ERRNO, PF_DEC}, {"option", PT_ENUMFLAGS32, PF_DEC, prctl_options}, {"arg2_str", PT_CHARBUF, PF_NA}, {"arg2_int", PT_INT64, PF_DEC} } }, | |||
[PPME_ASYNCEVENT_E] = {"asyncevent", EC_OTHER | EC_METAEVENT, EF_LARGE_PAYLOAD, 3, {{"plugin_id", PT_UINT32, PF_DEC}, {"name", PT_CHARBUF, PF_NA}, {"data", PT_BYTEBUF, PF_NA} } }, | |||
[PPME_ASYNCEVENT_X] = {"NA", EC_UNKNOWN, EF_UNUSED, 0}, | |||
[PPME_SYSCALL_PIDFD_GETFD_E] = {"pidfd_getfd", EC_PROCESS | EC_SYSCALL, EF_CREATES_FD | EF_NONE, 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.
we still need to address it, same for exit event
Signed-off-by: rohith-raju <rohithraju488@gmail.com>
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!
/approve
LGTM label has been added. Git tree hash: 7a424fee13b674ef9e5d2847d28d108537db28fe
|
/hold |
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
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
/unhold
sorry for the SCHEMA_VERSION dance now we should be finally ready!
LGTM label has been added. Git tree hash: b72b12e6fff039dbeedd94a067095566fcd79dc4
|
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.
Thanks a lot @Rohith-Raju !
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, hbrueckner, Rohith-Raju 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 |
/milestone 5.1.0+driver |
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 libscap
area tests
Does this PR require a change in the driver versions?
version driver-API-version-minor
What this PR does / why we need it:
This PR adds support to
pidfd_getfd
syscall.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: