snapshot: sagernet/gvisor v0.0.0-20260727.0-sing-box-mod.1 + SPEC 048 guard
Обновление снапшота с v0.0.0-20250811.0 на пин, которого требует sing-box после мержа 235 коммитов (upstream d620bbbf2 "Update gvisor to 20260727.0"). Прежний снапшот был взят 2026-08-04 ровно с той версии, на которой тогда стоял апстрим; разрыв возник 2026-08-05 вместе с его бампом. За год апстрим-gvisor изменил ~14 000 строк в 292 файлах. Значимое для нас — сетевой стек: tcp/connect.go (PMTU-discovery + исправление начального RTT/RTO: раньше задержка ACK внутри стека завышала стартовый таймаут на несколько RTT), tcp/snd.go, tcp/rcv.go, stack/conntrack.go, stack/packet_buffer.go. Всего 30 файлов в TCP и 37 в stack. Баг SPEC 048 апстрим НЕ исправил — проверено по коду новой версии: handleConnecting по-прежнему проверяет состояние endpoint'а, но не ep.h, а performHandshake так же зануляет h и отпускает мьютекс до Close(). Поэтому guard перенесён (12 строк) вместе со своим тестом (45 строк). Red/green проверен на новой базе: без guard'а тест падает с той же nil-паникой, что в полевом крашдампе; с ним зелёный.
This commit is contained in:
parent
ffebe42860
commit
117243aa02
293 changed files with 16413 additions and 2842 deletions
|
|
@ -63,15 +63,25 @@ const xSaveInfoNumLeaves = 64 // Maximum number of xSaveInfo leaves.
|
|||
|
||||
// The "extended" functions.
|
||||
const (
|
||||
extendedStart cpuidFunction = 0x80000000
|
||||
extendedFunctionInfo cpuidFunction = extendedStart + 0 // Returns highest available extended function in eax.
|
||||
extendedFeatures = extendedStart + 1 // Returns some extended feature bits in edx and ecx.
|
||||
processorBrandString2 = extendedStart + 2 // Processor Name String Identifier.
|
||||
processorBrandString3 = extendedStart + 3 // Processor Name String Identifier.
|
||||
processorBrandString4 = extendedStart + 4 // Processor Name String Identifier.
|
||||
l1CacheAndTLBInfo = extendedStart + 5 // Returns L2 cache information.
|
||||
l2CacheInfo = extendedStart + 6 // Returns L2 cache information.
|
||||
addressSizes = extendedStart + 8 // Physical and virtual address sizes.
|
||||
extendedStart cpuidFunction = 0x80000000
|
||||
extendedFunctionInfo cpuidFunction = extendedStart + 0 // Returns highest available extended function in eax.
|
||||
extendedFeatures = extendedStart + 1 // Returns some extended feature bits in edx and ecx.
|
||||
processorBrandString2 = extendedStart + 2 // Processor Name String Identifier.
|
||||
processorBrandString3 = extendedStart + 3 // Processor Name String Identifier.
|
||||
processorBrandString4 = extendedStart + 4 // Processor Name String Identifier.
|
||||
l1CacheAndTLBInfo = extendedStart + 5 // Returns L2 cache information.
|
||||
l2CacheInfo = extendedStart + 6 // Returns L2 cache information.
|
||||
addressSizes = extendedStart + 8 // Physical and virtual address sizes.
|
||||
amdMemoryEncryptionInfo = extendedStart + 31 // AMD memory encryption information.
|
||||
)
|
||||
|
||||
// AMD-defined memory encryption feature bits and fields.
|
||||
const (
|
||||
amdSecureMemoryEncryption = 1 << 0
|
||||
amdSecureEncryptedVirtualization = 1 << 1
|
||||
amdMemoryEncryptionFeatureMask = amdSecureMemoryEncryption | amdSecureEncryptedVirtualization
|
||||
amdPhysAddrReductionShift = 6
|
||||
amdPhysAddrReductionMask = 0x3f
|
||||
)
|
||||
|
||||
var allowedBasicFunctions = [...]bool{
|
||||
|
|
@ -84,14 +94,15 @@ var allowedBasicFunctions = [...]bool{
|
|||
}
|
||||
|
||||
var allowedExtendedFunctions = [...]bool{
|
||||
extendedFunctionInfo - extendedStart: true,
|
||||
extendedFeatures - extendedStart: true,
|
||||
addressSizes - extendedStart: true,
|
||||
processorBrandString2 - extendedStart: true,
|
||||
processorBrandString3 - extendedStart: true,
|
||||
processorBrandString4 - extendedStart: true,
|
||||
l1CacheAndTLBInfo - extendedStart: true,
|
||||
l2CacheInfo - extendedStart: true,
|
||||
extendedFunctionInfo - extendedStart: true,
|
||||
extendedFeatures - extendedStart: true,
|
||||
addressSizes - extendedStart: true,
|
||||
processorBrandString2 - extendedStart: true,
|
||||
processorBrandString3 - extendedStart: true,
|
||||
processorBrandString4 - extendedStart: true,
|
||||
l1CacheAndTLBInfo - extendedStart: true,
|
||||
l2CacheInfo - extendedStart: true,
|
||||
amdMemoryEncryptionInfo - extendedStart: true,
|
||||
}
|
||||
|
||||
// Function executes a CPUID function.
|
||||
|
|
@ -119,7 +130,7 @@ func (i *In) normalize() {
|
|||
switch cpuidFunction(i.Eax) {
|
||||
case vendorID, featureInfo, intelCacheDescriptors, extendedFunctionInfo, extendedFeatures:
|
||||
i.Ecx = 0 // Ignore.
|
||||
case processorBrandString2, processorBrandString3, processorBrandString4, l1CacheAndTLBInfo, l2CacheInfo:
|
||||
case processorBrandString2, processorBrandString3, processorBrandString4, l1CacheAndTLBInfo, l2CacheInfo, amdMemoryEncryptionInfo:
|
||||
i.Ecx = 0 // Ignore.
|
||||
case intelDeterministicCacheParams, extendedFeatureInfo:
|
||||
// Preserve i.Ecx.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue