Skip to content

[netebpfext] Add per-provider WFP handles to avoid improper use from parallel invocations #3866

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

Merged
merged 14 commits into from
Oct 10, 2024

Conversation

matthewige
Copy link
Contributor

@matthewige matthewige commented Sep 24, 2024

Description

Issue:
Our KM stress tests revealed an issue in our netebpfext code. There is a single global WFP handle, but multiple threads could use this at the same time (such as two programs attaching in parallel), leading to errors in the WFP APIs.

Fix:

  • Add per-provider handles
  • Make all WFP engine handles use static sessions (this allows a separate WFP handle to access the same objects, such as the sublayer/callouts)
  • Add proper cleanup logic to remove all WFP objects

Closes #3607

Testing

Existing tests validate this functionality.

Documentation

None.

Installation

None.

@matthewige matthewige changed the title [draft] [draft] [netebpfext] Add per-provider WFP handles to avoid improper use from parallel invocations Sep 26, 2024
@matthewige matthewige changed the title [draft] [netebpfext] Add per-provider WFP handles to avoid improper use from parallel invocations [netebpfext] Add per-provider WFP handles to avoid improper use from parallel invocations Sep 27, 2024
@matthewige matthewige marked this pull request as ready for review September 27, 2024 16:56
shankarseal
shankarseal previously approved these changes Oct 2, 2024
…ks with asserts, remove unneded helper function
@Alan-Jowett Alan-Jowett added this pull request to the merge queue Oct 10, 2024
Merged via the queue into microsoft:main with commit 8fb3a7e Oct 10, 2024
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow failed - km_mt_stress_tests
4 participants