-
Notifications
You must be signed in to change notification settings - Fork 431
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
Generic syscall kprobes #4256
Merged
yanivagman
merged 7 commits into
aquasecurity:main
from
yanivagman:generic_syscall_kprobes
Aug 22, 2024
Merged
Generic syscall kprobes #4256
yanivagman
merged 7 commits into
aquasecurity:main
from
yanivagman:generic_syscall_kprobes
Aug 22, 2024
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
yanivagman
force-pushed
the
generic_syscall_kprobes
branch
2 times, most recently
from
August 19, 2024 09:26
5c17a8d
to
fabd491
Compare
We currently use sys_enter/sys_exit tracepoints to trace syscalls. These impact performance on hot paths. This change introduces BPF program attachment to syscall entry/exit using kprobes, offering a more efficient mechanism. It handles varying symbol prefixes across architectures and includes 32-bit compat support.
yanivagman
force-pushed
the
generic_syscall_kprobes
branch
from
August 19, 2024 15:20
fabd491
to
30447d4
Compare
This was referenced Aug 19, 2024
Same as we have for sys_enter/sys_exit probes, this will allow us to add new events or logic for specific syscalls.
yanivagman
force-pushed
the
generic_syscall_kprobes
branch
from
August 20, 2024 20:50
f06178b
to
c2af27b
Compare
Merged
yanivagman
force-pushed
the
generic_syscall_kprobes
branch
2 times, most recently
from
August 22, 2024 13:39
a5376be
to
642f3f4
Compare
geyslan
reviewed
Aug 22, 2024
@@ -191,6 +191,7 @@ statfunc int init_program_data(program_data_t *p, void *ctx, u32 event_id) | |||
p->event->config.submit_for_policies = ~0ULL; | |||
|
|||
if (event_id != NO_EVENT_SUBMIT) { | |||
p->event->config.submit_for_policies = 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.
silent bug?
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
geyslan
approved these changes
Aug 22, 2024
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.
1. Explain what the PR does
feat: Add syscall kprobe support
We currently use sys_enter/sys_exit tracepoints to trace syscalls.
These impact performance on hot paths.
This change introduces BPF program attachment to syscall entry/exit using kprobes,
offering a more efficient mechanism.
It handles varying symbol prefixes across architectures and includes 32-bit compat support.
2. Explain how to test it
3. Other comments
Close #4211