Draft
Conversation
| PoliciesConfig: *cfg, | ||
| TraceePid: uint32(os.Getpid()), | ||
| Options: t.getOptionsConfig(), | ||
| CgroupV1Hid: uint32(t.cgroups.GetDefaultCgroupHierarchyID()), |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
2ebef5c to
c8e2c7b
Compare
1f411ed to
6a0c8a7
Compare
geyslan
reviewed
Jan 22, 2025
Member
geyslan
left a comment
There was a problem hiding this comment.
Just a quick (so quick) pass. Tomorrow I'm going to dive into this.
Comment on lines
+15
to
+20
| func (e *policyError) Is(target error) bool { | ||
| t, ok := target.(*policyError) | ||
| if !ok { | ||
| return false | ||
| } | ||
| return e.msg == t.msg |
Member
There was a problem hiding this comment.
Perhaps it should be better to rely on the errors.Is() since it takes care of unwrapping.
| PoliciesConfig: *cfg, | ||
| TraceePid: uint32(os.Getpid()), | ||
| Options: t.getOptionsConfig(), | ||
| CgroupV1Hid: uint32(t.cgroups.GetDefaultCgroupHierarchyID()), |
geyslan
reviewed
Feb 26, 2025
|
|
||
| if (!(str_filter->exact_enabled || str_filter->prefix_enabled || str_filter->suffix_enabled)) | ||
| return policies_cfg->enabled_policies; | ||
| return ~0ULL; |
| // Combine rules that use string filters with those that do not | ||
| res |= mask_no_str_filter_rules; | ||
|
|
||
| return res; |
|
|
||
| program_data_t p = {}; | ||
| if (!init_program_data(&p, ctx, NO_EVENT_SUBMIT)) | ||
| if (!init_program_data(&p, ctx, POLICY_SCOPES)) |
Member
There was a problem hiding this comment.
What does the internal POLICY_SCOPES event must communicate?
| typedef struct event_config { | ||
| u64 submit_for_policies; | ||
| u16 rules_version; | ||
| u8 has_overflow; |
Member
There was a problem hiding this comment.
Could you elaborate more about has_overflow?
geyslan
reviewed
Apr 30, 2025
Member
geyslan
left a comment
There was a problem hiding this comment.
I've finished an overall review. 👍🏻 This is neat.
pkg/ebpf/events_pipeline.go
Outdated
| continue | ||
| // range through each userland filterable rule | ||
| for _, rule := range t.policyManager.GetUserlandRules(eventID) { | ||
| if rule.ID > 63 { |
Member
There was a problem hiding this comment.
It would be good to use a MaxRules alike const.
19 tasks
6a0c8a7 to
e1a6b4c
Compare
This file contains hidden or 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
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
WIP
2. Explain how to test it
3. Other comments