Add attach opts to netevent ext#192
Merged
shankarseal merged 7 commits intomicrosoft:mainfrom Feb 27, 2025
Merged
Conversation
added 2 commits
February 24, 2025 09:09
nigriMSFT
reviewed
Feb 24, 2025
nigriMSFT
reviewed
Feb 24, 2025
shankarseal
reviewed
Feb 26, 2025
shankarseal
reviewed
Feb 26, 2025
shankarseal
approved these changes
Feb 27, 2025
nigriMSFT
reviewed
Feb 27, 2025
| typedef enum _netevent_capture_type | ||
| { | ||
| NeteventCapture_All = 1, | ||
| NetevenCapture_Flow, |
nigriMSFT
reviewed
Feb 27, 2025
| // Verifier feature proposal: https://github.com/vbpf/ebpf-verifier/issues/639 | ||
| ExAcquirePushLockExclusive(&_ebpf_netevent_push_event_lock); | ||
| push_lock_acquired = true; | ||
| KIRQL oldIrql = ExAcquireSpinLockExclusive(&_ebpf_netevent_push_event_lock); |
There was a problem hiding this comment.
It looks like ebpf_extension_hook_get_next_attached_client uses a push lock, which cannot be safely used at DISPATCH_LEVEL. The _ebpf_netevent_push_event callback will execute at IRLQ <= DISPATCH_LEVEL, so the design of the callback needs to take this into account. It seems like this was a missed detail when this callback code was originally written
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.
Description
Added logic to handle capture type as an attach option provided by the attaching client. The capture type specifies the type of events that would be reported.
Testing
Unit tests added to test attaching options.
Documentation
NA
Installation
NA