[CP] Add linker options for hotpatching on x64 kernel driver (#5437)#5770
Merged
Merged
Conversation
…e changes required for hotpatching
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2.5 #5770 +/- ##
===============================================
- Coverage 87.34% 86.75% -0.59%
===============================================
Files 59 59
Lines 18209 18209
===============================================
- Hits 15905 15798 -107
- Misses 2304 2411 +107 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
guhetier
approved these changes
Feb 5, 2026
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.
Cherry-pick Information
Related PR on main: #5437
Cherry-picked from main commit f2c318d
Description
Add hotpatch support for Windows x64 kernel driver
This PR enables runtime hotpatching capabilities for the MSQuic kernel driver (msquic.sys) in Release|x64 builds by adding the necessary linker flags to msquic.kernel.vcxproj.
Background
Currently, production releases of msquic.sys do not support runtime hotpatching due to missing linker options and function padding required for x64 hotpatch operations. This limitation prevents in-memory updates and affects compatibility with components such as SMBDirect that depend on hotpatch-enabled drivers.
Changes
This PR adds the following linker flags to the Release|x64 configuration:
Impact
Technical Details
Testing
Completed Verification
✅ Visual Studio Build: Confirmed that locally built msquic.sys for x64 Release configuration contains all required hotpatch prerequisites.
✅ Hotpatch Loading: Successfully loaded and applied a hotpatch to the driver in memory during testing.
✅ GitHub Actions Pipeline: Verify that CI/CD-generated msquic.sys artifact maintain hotpatch compatibility
✅ Release Artifact Testing: Confirm that market-ready msquic.sys binary produced by GitHub pipelines support hotpatch operations
Validation Plan
✅https://github.com/microsoft/msquic/actions/runs/17618956151/job/50059433726?pr=5437
✅https://github.com/microsoft/msquic/actions/runs/17618956151/artifacts/3976994659
✅Successfully loaded and applied a hotpatch to the driver in memory during testing.
Documentation
No user-facing documentation changes required. This is an internal build configuration change that enables existing Windows hotpatch infrastructure. The functionality is transparent to end users and does not modify MSQuic APIs or behavior.