Skip to content

Consume ebpf-extension-common#318

Open
LakshK98 wants to merge 7 commits intomicrosoft:mainfrom
LakshK98:extension_dedup
Open

Consume ebpf-extension-common#318
LakshK98 wants to merge 7 commits intomicrosoft:mainfrom
LakshK98:extension_dedup

Conversation

@LakshK98
Copy link
Copy Markdown
Contributor

@LakshK98 LakshK98 commented Mar 3, 2026

Description

ebpf-extensions-common now provides shared extension code for rundown protection and tracelogging. This PR adds it as a submodule and removes the corresponding local implementations.

The changes are functionally equivalent to the existing code, with one exception: ntosebpfext.sys and neteventebpfext.sys previously shared the same ETW trace provider (name and GUID). Since these are separate driver binaries, this PR gives each its own provider to avoid ambiguous traces.

Closes #335

Testing

CI/CD

Documentation

NA

Installation

NA

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces the ebpf-extension-common submodule and wires it into the solution/projects to consume shared user-mode and kernel-mode components (notably the shared rundown API).

Changes:

  • Add external/ebpf-extension-common as a git submodule and include its UM/KM projects in the solution.
  • Link extension projects (and unit tests) against ebpf_extension_common_um/lib and ebpf_extension_common_km.lib, and add the shared include path.
  • Replace local rundown implementation in ebpf_ext_hook_provider.c with shared rundown APIs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/ntosebpfext/ntosebpfext_unit/ntosebpfext_unit.vcxproj Adds project reference to the shared UM common library for unit tests.
tests/neteventebpfext/neteventebpfext_unit/neteventebpfext_unit.vcxproj Adds project reference to the shared UM common library for unit tests.
ntosebpfext.sln Adds KM/UM common projects and configuration mappings into the solution.
libs/ebpf_ext/ebpf_ext_hook_provider.c Switches from a local rundown struct/functions to shared rundown APIs.
external/ebpf-extension-common Adds the submodule commit pointer for the new dependency.
ebpf_extensions/ntosebpfext/user/ntosebpfext_user.vcxproj Adds include path, links UM common lib, and adds project reference.
ebpf_extensions/ntosebpfext/sys/ntosebpfext.vcxproj Adds include path, links KM common lib, and adds project reference.
ebpf_extensions/neteventebpfext/user/neteventebpfext_user.vcxproj Adds include path and project reference to UM common.
ebpf_extensions/neteventebpfext/sys/neteventebpfext.vcxproj Adds include path, links KM common lib, and adds project reference.
.gitmodules Registers the new ebpf-extension-common submodule and its remote URL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/ntosebpfext/ntosebpfext_unit/ntosebpfext_unit.vcxproj Outdated
Comment thread tests/neteventebpfext/neteventebpfext_unit/neteventebpfext_unit.vcxproj Outdated
Comment thread ntosebpfext.sln
Comment thread .gitmodules
url = https://github.com/microsoft/usersim.git
[submodule "external/ebpf-extension-common"]
path = external/ebpf-extension-common
url = https://github.com/LakshK98/ebpf-extension-common.git
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The submodule URL points to a personal fork (LakshK98). For supply-chain/security and long-term reliability, it’s better to depend on the canonical upstream (or an organization-owned mirror) rather than an individual fork. Update the submodule URL to the official/maintained repository location intended for production use.

Suggested change
url = https://github.com/LakshK98/ebpf-extension-common.git
url = https://github.com/microsoft/ebpf-extension-common.git

Copilot uses AI. Check for mistakes.
@LakshK98 LakshK98 marked this pull request as draft March 9, 2026 16:15
@LakshK98 LakshK98 marked this pull request as ready for review April 13, 2026 21:50
Copilot AI review requested due to automatic review settings April 13, 2026 21:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ntosebpfext.sln
Comment thread ebpf_extensions/ntosebpfext/user/ntosebpfext_user.vcxproj Outdated
@LakshK98 LakshK98 changed the title [Draft] Consume ebpf-extension-common Consume ebpf-extension-common Apr 13, 2026
Comment thread ebpf_extensions/ntosebpfext/ntos_ebpf_ext_tracelog_provider.c Outdated
Copilot AI review requested due to automatic review settings April 24, 2026 02:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ebpf_extensions/ntosebpfext/ntos_ebpf_ext_tracelog_provider.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Consume ebpf-extension-common as a submodule

3 participants