-
Notifications
You must be signed in to change notification settings - Fork 176
feat!: complete drop of enter events generation for cases not related to TOCTOU mitigation support #2627
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
Conversation
|
Please double check driver/SCHEMA_VERSION file. See versioning. /hold |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2627 +/- ##
=======================================
Coverage 78.25% 78.25%
=======================================
Files 294 294
Lines 31826 31826
Branches 4667 4667
=======================================
Hits 24905 24905
Misses 6921 6921
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
X64 kernel testing matrix
ARM64 kernel testing matrix
|
Drop modern probe `sys_enter` dispatcher, the syscall enter tail call table and remaining enter event programs (i.e. `generic_e` and `connect_e_raw_tp`) not generating events related to TOCTOU mitigation. This is motivated by the fact that, in the current implementation, enter events information are a subset of the one exported by exit events. As `PPME_GENERIC_E` and network enter events resulting from socketcall invocations are not generated anymore by the modern probe, skip `generic_e.cpp` and `socketcall_e.cpp` tests if the modern probe is used as engine. BREAKING CHANGE: drop non-TOCTOU syscall enter progs in modern probe Signed-off-by: Leonardo Di Giovanna <[email protected]>
In kmod probe, update `syscall_enter` probe to only allow execution of fillers related to TOCTOU mitigation, disabling the generation of any other enter event. This is motivated by the fact that, for all other enter events, the corresponding exit events already contain the same kind of information. Contextually, update the fillers table by removing any filler information related to enter events, excluding (1) the entries related to TOCTOU mitigation and (2) the `PPME_GENERIC_E` entry (as it still used by legacy bpf probe code). Finally, remove any `PPME_GENERIC_E` event related code and skip `generic_e.cpp` and `socketcall_e` tests when run while using the kmod engine. BREAKING CHANGE: update fillers table and drop non-TOCTOU syscall enter fillers in kmod probe Signed-off-by: Leonardo Di Giovanna <[email protected]>
In legacy bpf probe, update `sys_enter` probe to only allow execution of fillers related to TOCTOU mitigation, disabling the generation of any other enter event. This is motivated by the fact that, for all other enter events, the corresponding exit events already contain the same kind of information. Contextually, update the fillers table by removing the entry related to `PPME_GENERIC_E` enter event, as it is not anymore used by any driver. any filler information related to enter events, excluding the entries related to TOCTOU mitigation. Finally, remove any `PPME_GENERIC_E` event related code and delete `generic_e.cpp` and `socketcall_e.cpp` files, as contained tests are related to events not generated anymore by any engine. BREAKING CHANGE: update fillers table and drop non-TOCTOU syscall enter fillers in legacy bpf probe Signed-off-by: Leonardo Di Giovanna <[email protected]>
b9c10e4 to
fc865db
Compare
|
Hey @deepskyblue86 , thank you for your review. I applied your suggestions, and I fixed an issue related to modern probe programs loading which broke CI run. Let me know if there is any other issue you want me to fix. |
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
deepskyblue86
left a comment
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepskyblue86, ekoops The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
What type of PR is this?
/kind cleanup
/kind design
/kind test
Any specific area of the project related to this PR?
/area driver-kmod
/area driver-bpf
/area driver-modern-bpf
/area libpman
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This PR is related to the proposal approved in #2068.
It completes the removal of the logic related to enter events generation, in all 3 drivers, for cases not related to TOCTOU mitigation support. This is motivated by the fact that, for these cases, the corresponding exit events already contain the same kind of information. Practically speaking, this means keeping support only for
connect,creat,open,openatandopenat2enter event generation.To achieve this goal, this PR drops the modern probe
sys_enterdispatcher and adapts the kmodsyscall_enterregistered probe and the legacy bpf probesys_enterprogram to only allow fillers execution for the aforementioned 5 system calls.These patches remove from the drivers fillers table all the disabled enter event entries. Moreover, it removes from drivers the code related to
PPME_GENERIC_Eevent type, besides the remaining modern probegeneric_eprogram and socketcall and generic enter events driver tests.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Not bumping the driver schema version is currently a practice we are following as we will bump it in a single shot once we are done with the #2068 proposal.
/milestone 0.22.0
Does this PR introduce a user-facing change?: