-
Notifications
You must be signed in to change notification settings - Fork 388
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 socket and sockaddr types #3358
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
504a8a5
to
0c92303
Compare
Some security_socket_* functions take a struct sockaddr * as an argument. We don't currently support this type. This commit adds support in BPF for kprobes and tracepoints. Signed-off-by: Kevin Sheldrake <[email protected]>
Some security_socket_* functions take a struct sockaddr * as an argument. We don't currently support this type. This commit adds sockaddr types to user space for kprobes and tracepoints. Signed-off-by: Kevin Sheldrake <[email protected]>
Some security_socket_* functions take a struct sockaddr * as an argument. We don't currently support this type. This commit adds configuration for the sockaddr types. Signed-off-by: Kevin Sheldrake <[email protected]>
security_socket_* functions take a struct socket * as an argument. We don't currently support this type. This commit adds support in BPF for kprobes and tracepoints. We just access the struct sock linked from the struct socket and handle it as a struct sock. Signed-off-by: Kevin Sheldrake <[email protected]>
security_socket_* functions take a struct socket * as an argument. We don't currently support this type. This commit adds socket types to user space for kprobes and tracepoints. Signed-off-by: Kevin Sheldrake <[email protected]>
security_socket_* functions take a struct socket * as an argument. We don't currently support this type. This commit adds configuration for the socket types. Signed-off-by: Kevin Sheldrake <[email protected]>
The sockaddr and socket types were added. This commit adds a test and two example policies. Signed-off-by: Kevin Sheldrake <[email protected]>
Signed-off-by: Kevin Sheldrake <[email protected]>
0c92303
to
ccef91f
Compare
will-isovalent
approved these changes
Feb 3, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The security_socket_* functions take pointers to struct socket and struct sockaddr, but we don't currently support these types. This series adds support for them. The socket support resolves the socket's struct sock pointer and uses that as per struct sock support. The sockaddr support uses the SAddr and SPort matchArgs operators to represent SinAddr and SinPort.
Changelog
Add support for struct socket and struct sockaddr.