Skip to content

Commit 0c3596a

Browse files
authored
Backport ETW silo fix to v2.4 (#5058)
1 parent 87c7ebe commit 0c3596a

File tree

21 files changed

+37
-29
lines changed

21 files changed

+37
-29
lines changed

.azure/OneBranch.Package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ extends:
9595
ob_createvpack_owneralias: quicdev
9696
ob_createvpack_description: msquic.$(Build.SourceBranchName)
9797
ob_createvpack_versionAs: string
98-
ob_createvpack_version: 2.4.9-$(Build.BuildId)
98+
ob_createvpack_version: 2.4.10-$(Build.BuildId)
9999
steps:
100100
- task: DownloadPipelineArtifact@2
101101
inputs:

.github/workflows/build.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ jobs:
118118
- plat: android
119119
systemcrypto: '-UseSystemOpenSSLCrypto'
120120
# TODO: android to support ubuntu-24.04
121-
- plat: android
122-
os: 'ubuntu-24.04'
123-
systemcrypto: '-UseSystemOpenSSLCrypto'
124121
# No openssl system crypto on ubuntu-22.04
125122
- plat: linux
126123
os: 'ubuntu-22.04'
@@ -209,23 +206,21 @@ jobs:
209206
- name: Checkout repository
210207
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
211208
- name: Download Build Artifacts
212-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11
209+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
213210
with:
214211
name: Release-${{ matrix.vec.plat }}-windows-2022-x86-${{ matrix.vec.tls }}
215212
path: artifacts
216-
if_no_artifact_found: ignore
217213
- name: Download Build Artifacts
218-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11
214+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
219215
with:
220216
name: Release-${{ matrix.vec.plat }}-windows-2022-x64-${{ matrix.vec.tls }}
221217
path: artifacts
222-
if_no_artifact_found: ignore
223218
- name: Download Build Artifacts
224-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11
219+
if: matrix.vec.tls != 'openssl'
220+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
225221
with:
226222
name: Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}
227223
path: artifacts
228-
if_no_artifact_found: ignore
229224
- name: Build Package
230225
shell: pwsh
231226
run: scripts/package-nuget.ps1 -Tls ${{ matrix.vec.tls }} ${{ matrix.vec.arg }} -GHA
@@ -234,3 +229,4 @@ jobs:
234229
with:
235230
name: Nuget-Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}
236231
path: artifacts/dist/*.nupkg
232+

.github/workflows/test-down-level.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
matrix:
2626
vec: [
2727
# v2.1
28-
{ release: "2.1.11", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
2928
{ release: "2.1.11", os: "windows-2022", arch: "x64", tls: "schannel" },
3029
{ release: "2.1.11", os: "windows-2022", arch: "x64", tls: "openssl" },
3130
# v2.2

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ message(STATUS "Platform version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
5757
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
5858

5959
set(QUIC_MAJOR_VERSION 2)
60-
set(QUIC_FULL_VERSION 2.4.9)
60+
set(QUIC_FULL_VERSION 2.4.10)
6161

6262
if (WIN32)
6363
set(CX_PLATFORM "windows")

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "msquic"
3-
version = "2.4.9-beta"
3+
version = "2.4.10-beta"
44
edition = "2018"
55
authors = ["Microsoft"]
66
description = "Microsoft implementation of the IETF QUIC protocol"

scripts/build.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,16 +505,21 @@ function CMake-Generate {
505505
$Arguments += " -DQUIC_HIGH_RES_TIMERS=on"
506506
}
507507
if ($Platform -eq "android") {
508-
$NDK = $env:ANDROID_NDK_LATEST_HOME -replace '26\.\d+\.\d+', '25.2.9519653' # Temporary work around. Use RegEx to replace newer version.
508+
$NDK = $env:ANDROID_NDK_LATEST_HOME
509509
$env:PATH = "$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$env:PATH"
510+
$env:ANDROID_NDK_HOME = $NDK
511+
$env:ANDROID_NDK_ROOT = $NDK # Set ANDROID_NDK_ROOT to ensure consistency
512+
Write-Host "Set ANDROID_NDK_HOME: $env:ANDROID_NDK_HOME"
513+
Write-Host "Set ANDROID_NDK_ROOT: $env:ANDROID_NDK_ROOT"
514+
Write-Host "Set ANDROID_NDK_LATEST_HOME: $env:ANDROID_NDK_LATEST_HOME"
515+
510516
switch ($Arch) {
511517
"x86" { $Arguments += " -DANDROID_ABI=x86"}
512518
"x64" { $Arguments += " -DANDROID_ABI=x86_64" }
513519
"arm" { $Arguments += " -DANDROID_ABI=armeabi-v7a" }
514520
"arm64" { $Arguments += " -DANDROID_ABI=arm64-v8a" }
515521
}
516522
$Arguments += " -DANDROID_PLATFORM=android-29"
517-
$env:ANDROID_NDK_HOME = $NDK
518523
$NdkToolchainFile = "$NDK/build/cmake/android.toolchain.cmake"
519524
$Arguments += " -DANDROID_NDK=""$NDK"""
520525
$Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$NdkToolchainFile"""

scripts/package-distribution.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $ArtifactsBinDir = Join-Path $BaseArtifactsDir "bin"
2424
# All direct subfolders are OS's
2525
$Platforms = Get-ChildItem -Path $ArtifactsBinDir
2626

27-
$Version = "2.4.9"
27+
$Version = "2.4.10"
2828

2929
$WindowsBuilds = @()
3030
$AllBuilds = @()

scripts/package-nuget.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ $DistDir = Join-Path $BaseArtifactsDir "dist"
153153
$CurrentCommitHash = Get-GitHash -RepoDir $RootDir
154154
$RepoRemote = Get-GitRemote -RepoDir $RootDir
155155

156-
$Version = "2.4.9"
156+
$Version = "2.4.10"
157157

158158
$BuildId = $env:BUILD_BUILDID
159159
if ($null -ne $BuildId) {

scripts/write-versions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ArtifactsDir = $BuildConfig.ArtifactsDir
2626
$SourceVersion = $env:BUILD_SOURCEVERSION;
2727
$SourceBranch = $env:BUILD_SOURCEBRANCH;
2828
$BuildId = $env:BUILD_BUILDID;
29-
$VersionNumber = "2.4.9";
29+
$VersionNumber = "2.4.10";
3030

3131
class BuildData {
3232
[string]$SourceVersion;

src/bin/winkernel/driver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ Return Value:
9595
NTSTATUS Status;
9696
WDF_DRIVER_CONFIG Config;
9797
WDFDRIVER Driver;
98+
QUIC_SILO PrevSilo = QuicSiloAttach(QuicSiloGetHostSilo());
99+
CXPLAT_DBG_ASSERT(!QuicSiloIsServerSilo());
98100

99101
//
100102
// We explicitly load the MsQuic library upfront (instead of letting it
@@ -143,6 +145,7 @@ Return Value:
143145
MsQuicLibraryUnload();
144146
}
145147

148+
QuicSiloDetatch(PrevSilo);
146149
return Status;
147150
}
148151

@@ -168,10 +171,13 @@ Routine Description:
168171
--*/
169172
{
170173
UNREFERENCED_PARAMETER(Driver);
174+
QUIC_SILO PrevSilo = QuicSiloAttach(QuicSiloGetHostSilo());
175+
CXPLAT_DBG_ASSERT(!QuicSiloIsServerSilo());
171176

172177
PAGED_CODE();
173178

174179
MsQuicDeregisterNmrProvider();
175180
MsQuicPcwCleanup();
176181
MsQuicLibraryUnload();
182+
QuicSiloDetatch(PrevSilo);
177183
}

src/core/configuration.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ MsQuicConfigurationOpen(
116116
//
117117

118118
#ifdef QUIC_SILO
119-
Configuration->Silo = QuicSiloGetCurrentServer();
119+
Configuration->Silo = QuicSiloGetCurrentServerSilo();
120120
QuicSiloAddRef(Configuration->Silo);
121121
if (Configuration->Silo != NULL) {
122122
//

src/core/listener.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ MsQuicListenerOpen(
7171
CxPlatEventInitialize(&Listener->StopEvent, TRUE, TRUE);
7272

7373
#ifdef QUIC_SILO
74-
Listener->Silo = QuicSiloGetCurrentServer();
74+
Listener->Silo = QuicSiloGetCurrentServerSilo();
7575
QuicSiloAddRef(Listener->Silo);
7676
#endif
7777

src/distribution/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleInfoDictionaryVersion</key>
2020
<string>6.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>2.4.9</string>
22+
<string>2.4.10</string>
2323
<key>NSHumanReadableCopyright</key>
2424
<string>MIT</string>
2525
<key>CFBundleGetInfoString</key>

src/inc/msquic.ver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#endif
1313

1414
#ifndef VER_PATCH
15-
#define VER_PATCH 9
15+
#define VER_PATCH 10
1616
#endif
1717

1818
#ifndef VER_BUILD_ID

src/inc/quic_platform_winkernel.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,9 @@ CxPlatRandom(
932932
#define QUIC_SILO PESILO
933933
#define QUIC_SILO_INVALID ((PESILO)(void*)(LONG_PTR)-1)
934934

935-
#define QuicSiloGetCurrentServer() PsGetCurrentServerSilo()
935+
#define QuicSiloGetHostSilo() PsGetHostSilo()
936+
#define QuicSiloIsServerSilo() PsIsCurrentThreadInServerSilo()
937+
#define QuicSiloGetCurrentServerSilo() PsGetCurrentServerSilo()
936938
#define QuicSiloAddRef(Silo) if (Silo != NULL) { ObReferenceObjectWithTag(Silo, QUIC_POOL_SILO); }
937939
#define QuicSiloRelease(Silo) if (Silo != NULL) { ObDereferenceObjectWithTag(Silo, QUIC_POOL_SILO); }
938940
#define QuicSiloAttach(Silo) PsAttachSiloToCurrentThread(Silo)

src/tools/forwarder/forwarder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,6 @@ int QUIC_MAIN_EXPORT main(int argc, char **argv) {
234234
CXPLAT_FRE_ASSERT(QUIC_SUCCEEDED(Listener.Start(Alpn, QuicAddr(QUIC_ADDRESS_FAMILY_UNSPEC, FrontEndPort))));
235235

236236
printf("Press Enter to exit.\n\n");
237-
getchar();
237+
(void)getchar();
238238
return 0;
239239
}

src/tools/interopserver/InteropServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ main(
134134
HttpServer Server(Registration, SupportedALPNs, ARRAYSIZE(SupportedALPNs), &ListenAddr, SslKeyLogFileParam);
135135
if (!GetFlag(argc, argv, "noexit")) {
136136
printf("Press Enter to exit.\n\n");
137-
getchar();
137+
(void)getchar();
138138
} else {
139139
CXPLAT_EVENT Event;
140140
CxPlatEventInitialize(&Event, TRUE, FALSE);

src/tools/ip/server/quicipserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ RunServer(
182182
}
183183

184184
printf("Press Enter to exit.\n\n");
185-
getchar();
185+
(void)getchar();
186186

187187
Error:
188188

src/tools/lb/loadbalancer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ main(int argc, char **argv)
218218
PublicInterface = new LbPublicInterface(&PublicAddr);
219219

220220
printf("Press Enter to exit.\n\n");
221-
getchar();
221+
(void)getchar();
222222

223223
delete PublicInterface;
224224
CxPlatDataPathUninitialize(Datapath);

src/tools/sample/sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ RunServer(
662662
// Continue listening for connections until the Enter key is pressed.
663663
//
664664
printf("Press Enter to exit.\n\n");
665-
getchar();
665+
(void)getchar();
666666

667667
Error:
668668

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "major": 2, "minor": 4, "patch": 9 }
1+
{ "major": 2, "minor": 4, "patch": 10 }

0 commit comments

Comments
 (0)