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

Add args for sendmmsg events #1636

Open
Biagio-Dipalma opened this issue Jan 22, 2024 · 6 comments
Open

Add args for sendmmsg events #1636

Biagio-Dipalma opened this issue Jan 22, 2024 · 6 comments
Assignees
Labels
kind/feature New feature or request
Milestone

Comments

@Biagio-Dipalma
Copy link

Motivation

Currently, the sendmmsg syscall is supported, but lacks arguments in both exit and entry events. I believe that adding parameters could significantly enhance the visibility of outbound connection events.

Feature

Add params to the sendmmsg events

@Biagio-Dipalma Biagio-Dipalma added the kind/feature New feature or request label Jan 22, 2024
@Andreagit97
Copy link
Member

thank you for this! We will try to understand when to schedule this!

@Andreagit97 Andreagit97 added this to the TBD milestone Jan 31, 2024
@oheifetz
Copy link
Contributor

oheifetz commented Mar 9, 2024

so basically you would like the sendmmsg to support an array of arguments where every argument is like what sendmsg does, right?

@oheifetz
Copy link
Contributor

oheifetz commented Mar 9, 2024

I can take it if no one has already started to add this support

@Andreagit97
Copy link
Member

Yes we would like to have something similar to sendmsg syscall

	[PPME_SOCKET_SENDMSG_E] = {"sendmsg", EC_IO_WRITE | EC_SYSCALL, EF_USES_FD | EF_WRITES_TO_FD | EF_MODIFIES_STATE, 3, {{"fd", PT_FD, PF_DEC}, {"size", PT_UINT32, PF_DEC}, {"tuple", PT_SOCKTUPLE, PF_NA} } },
	[PPME_SOCKET_SENDMSG_X] = {"sendmsg", EC_IO_WRITE | EC_SYSCALL, EF_USES_FD | EF_WRITES_TO_FD | EF_MODIFIES_STATE, 2, {{"res", PT_ERRNO, PF_DEC}, {"data", PT_BYTEBUF, PF_NA} } },

but since there is no need to have some info in the enter event and others in the exit one, I would go with implementing all the info in the exit event, so something like

	[PPME_SOCKET_SENDMMSG_E] = {"sendmmsg", EC_IO_WRITE | EC_SYSCALL, EF_USES_FD, 0},
	[PPME_SOCKET_SENDMMSG_X] = {"sendmmsg", EC_IO_WRITE | EC_SYSCALL, EF_USES_FD, 5, {{"res", PT_ERRNO, PF_DEC}, {"fd", PT_FD, PF_DEC}, {"data", PT_BYTEBUF, PF_NA}, {"size", PT_UINT32, PF_DEC}, {"tuple", PT_SOCKTUPLE, PF_NA} } },

I can take it if no one has already started to add this support

Sure! thank you!

@oheifetz
Copy link
Contributor

@Andreagit97 regarding your post above, you think that there is no need to push any data to ringbuf in enter since the only change between the enter and exit is the fact that on exit the msg_len changes and this may be important to user and on exit all other data can be inserted to ring?

@Andreagit97
Copy link
Member

Yes, exactly. In the exit event, we have all syscalls parameters + the return value so it should be enough to collect everything in the exit event, since the enter event doesn't bring any additional value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants