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:
Leadaxe 2026-08-05 14:53:31 +03:00
parent ffebe42860
commit 117243aa02
293 changed files with 16413 additions and 2842 deletions

View file

@ -13,36 +13,30 @@
// limitations under the License.
//go:build arm64
// +build arm64
package hostarch
import (
"encoding/binary"
"golang.org/x/sys/unix"
)
import "encoding/binary"
const (
// PageSize is the system page size.
// arm64 support 4K/16K/64K page size,
// which can be get by unix.Getpagesize().
// Currently, only 4K page size is supported.
// Currently, only 4K page size is supported by default,
// or 64K pages by using the pagesize_64k build tag.
PageSize = 1 << PageShift
// HugePageSize is the system huge page size.
HugePageSize = 1 << HugePageShift
// JumboPageSize is the 1GB jumbo page size.
JumboPageSize = 1 << JumboPageShift
// CacheLineSize is the size of the cache line.
CacheLineSize = 1 << CacheLineShift
// PageShift is the binary log of the system page size.
PageShift = 12
// HugePageShift is the binary log of the system huge page size.
// Should be calculated by "PageShift + (PageShift - 3)"
// when multiple page size support is ready.
HugePageShift = 21
// JumboPageShift is the binary log of jumbo page whose size is 1GB.
JumboPageShift = 30
// CacheLineShift is the binary log of the cache line size.
CacheLineShift = 6
@ -89,10 +83,3 @@ func ESRAccessType(code uint64) AccessType {
func UntaggedUserAddr(addr Addr) Addr {
return Addr(int64(addr<<8) >> 8)
}
func init() {
// Make sure the page size is 4K on arm64 platform.
if size := unix.Getpagesize(); size != PageSize {
panic("Only 4K page size is supported on arm64!")
}
}