Skip to content

Conversation

@toribioa
Copy link
Member

Description

Enables hotpatching capabilities for msquic.dll in Release|ARM64 builds. To produce MSQuic artifacts with runtime hotpatching support enabled across both SChannel and OpenSSL binaries.

  • Enables map file injection for Release|ARM64 configuration
  • Supports runtime hotpatching for production deployments
  • Applied to both SChannel and OpenSSL build paths

These linker flags modifications meaning:

  • /hotpatchcompatible /profile /incremental:no This adds records to the PDB which lets vulcan understand the binary.
  • /pdbinject:mapfile This enables map file injection needed for hotpatching on ARM64 binaries. The map file injection methodology is used by hpiload at patch load time to enable runtime patching for ARM64 architecture instead of the function padding approach used on x64.

Key points:

  • Project Generation Impact: Modifies CMakeLists.txt to generate Visual Studio project files with conditional hotpatch support
  • Dual Binary Coverage: Applied uniformly to both SChannel (build/windows/arm64_schannel/) and OpenSSL (build/windows/arm64_openssl/) project generation paths
  • Configuration Specificity: Hotpatch flags integrated exclusively into Release|ARM64 configuration within generated .vcxproj files
  • Build System Integration: Leverages CMake's CMAKE_SHARED_LINKER_FLAGS_RELEASE to ensure consistent flag application across binary variants
  • CI/CD Compatibility: Source-controlled approach enables automatic project generation with hotpatch support in GitHub CI pipelines
  • Production Targeting: Conditional logic ensures hotpatch overhead limited to production Release ARM64 builds

Generated project paths:

  • SChannel Build Path: build/windows/arm64_schannel/src/bin/msquic.vcxproj
  • OpenSSL Build Path: build/windows/arm64_openssl/src/bin/msquic.vcxproj

Testing

Completed Verification
✅ Visual Studio Build: Confirmed that locally built msquic.dll for ARM64 Release configuration contains all required hotpatch prerequisites for SChannel and OpenSSL binaries.
⏳ Hotpatch Loading: Successfully loaded and applied a hotpatch to the driver in memory during testing.

⏳ GitHub Actions Pipeline: Verify that CI/CD-generated msquic.dll artifacts maintain hotpatch compatibility
⏳ Release Artifact Testing: Confirm that market-ready msquic.dll binaries produced by GitHub pipelines support hotpatch operations

Validation Plan

Download Release-winuser-windows-2022-arm64-schannel artifact from GitHub Actions
Download Release-winuser-windows-2022-arm64-openssl artifact from GitHub Actions
Verify binaries contains required hotpatch metadata
Perform runtime hotpatch loading test with CI-generated binaries

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.

Enables hotpatching capabilities for msquic.dll in Release|ARM64 builds. To produce MSQuic artifacts with runtime hotpatching support enabled across both SChannel and OpenSSL binaries.

- Enables map file injection for Release|ARM64 configuration
- Supports runtime hotpatching for production deployments  
- Applied to both SChannel and OpenSSL build paths

These linker flags modifications meaning:
- /hotpatchcompatible /profile /incremental:no This adds records to the PDB which lets vulcan understand the binary.
- /pdbinject:mapfile This enables map file injection needed for hotpatching on ARM64 binaries. The map file injection methodology is used by hpiload at patch load time to enable runtime patching for ARM64 architecture instead of the function padding approach used on x64.

Key points:
- Project Generation Impact: Modifies CMakeLists.txt to generate Visual Studio project files with conditional hotpatch support
- Dual Binary Coverage: Applied uniformly to both SChannel (build/windows/arm64_schannel/) and OpenSSL (build/windows/arm64_openssl/) project generation paths
- Configuration Specificity: Hotpatch flags integrated exclusively into Release|ARM64 configuration within generated .vcxproj files
- Build System Integration: Leverages CMake's CMAKE_SHARED_LINKER_FLAGS_RELEASE to ensure consistent flag application across binary variants
- CI/CD Compatibility: Source-controlled approach enables automatic project generation with hotpatch support in GitHub CI pipelines
- Production Targeting: Conditional logic ensures hotpatch overhead limited to production Release ARM64 builds

Generated project paths:
- SChannel Build Path: build/windows/arm64_schannel/src/bin/msquic.vcxproj
- OpenSSL Build Path: build/windows/arm64_openssl/src/bin/msquic.vcxproj
@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.75%. Comparing base (1a1ef81) to head (3232eec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5445      +/-   ##
==========================================
+ Coverage   84.61%   84.75%   +0.14%     
==========================================
  Files          59       59              
  Lines       18600    18600              
==========================================
+ Hits        15738    15765      +27     
+ Misses       2862     2835      -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants