]> Cypherpunks repositories - gostls13.git/commitdiff
all: update vendored golang.org/x/net
authorDmitri Shuralyov <dmitshur@golang.org>
Fri, 5 Apr 2024 19:25:55 +0000 (15:25 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 5 Apr 2024 22:18:42 +0000 (22:18 +0000)
Pull in CL 576756:

b67a0f05 http2: send correct LastStreamID in stream-caused GOAWAY

It comes with newer x/crypto and x/sys requirements via CL 576516.

For #65051.
Fixes #66668.

Change-Id: Ib6df49b779ff5ea56966ae3de443e87ac7f4ec4f
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/576679
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
13 files changed:
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/sys/unix/mmap_nomremap.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go
src/cmd/vendor/golang.org/x/sys/windows/types_windows.go
src/cmd/vendor/golang.org/x/sys/windows/zsyscall_windows.go
src/cmd/vendor/modules.txt
src/go.mod
src/go.sum
src/net/http/h2_bundle.go
src/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s
src/vendor/modules.txt

index c7dfe3760e0d82ecba13935482d54bb5e4927eb8..acd8c9fa4636e6d230be96249dae895d42a26c2c 100644 (file)
@@ -8,7 +8,7 @@ require (
        golang.org/x/build v0.0.0-20240222153247-cf4ed81bb19f
        golang.org/x/mod v0.16.0
        golang.org/x/sync v0.6.0
-       golang.org/x/sys v0.18.0
+       golang.org/x/sys v0.19.0
        golang.org/x/telemetry v0.0.0-20240401194020-3640ba572dd1
        golang.org/x/term v0.18.0
        golang.org/x/tools v0.19.1-0.20240329171618-904c6baa6e14
index 7e70e03ac4ad2cf3f97b7ca25babefa3c84140ff..bd92d3c83f9b23010147fb10ddfc79726012889c 100644 (file)
@@ -30,8 +30,8 @@ golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
 golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
 golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
-golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
-golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
+golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/telemetry v0.0.0-20240401194020-3640ba572dd1 h1:x0E096pmZoLhjEfcM4q2gJ3eZvnTpZiYDSPDYtm4wME=
 golang.org/x/telemetry v0.0.0-20240401194020-3640ba572dd1/go.mod h1:wQS78u8AjB4H3mN7DPniFYwsXnV9lPziq+He/eA7JIw=
 golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
index 4b68e59780a2352b61dd88a7cb2b567264b247e9..7f602ffd26d4fae392377a8fe27fb6ca41aaa825 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
+//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
 
 package unix
 
index b473038c6155dcfd8360427f15d100db6321f30a..27c41b6f0a13b731d26aaae713e3847c31b6b1b0 100644 (file)
@@ -1520,6 +1520,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
        return nil
 }
 
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+        return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+        return mapper.Munmap(b)
+}
+
 func Read(fd int, p []byte) (n int, err error) {
        n, err = read(fd, p)
        if raceenabled {
index 6395a031d45d8d2b473dcaa2193124b5b458840e..6525c62f3c2ff3a287ffafe7fbe94108a537fba6 100644 (file)
@@ -165,6 +165,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys  CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
 //sys  CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error)  [failretval==InvalidHandle] = CreateNamedPipeW
 //sys  ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error)
+//sys  DisconnectNamedPipe(pipe Handle) (err error)
 //sys  GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
 //sys  GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
 //sys  SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
@@ -348,8 +349,19 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys  SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
 //sys  GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32)
 //sys  SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
+//sys  ClearCommBreak(handle Handle) (err error)
+//sys  ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error)
+//sys  EscapeCommFunction(handle Handle, dwFunc uint32) (err error)
+//sys  GetCommState(handle Handle, lpDCB *DCB) (err error)
+//sys  GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error)
 //sys  GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
+//sys  PurgeComm(handle Handle, dwFlags uint32) (err error)
+//sys  SetCommBreak(handle Handle) (err error)
+//sys  SetCommMask(handle Handle, dwEvtMask uint32) (err error)
+//sys  SetCommState(handle Handle, lpDCB *DCB) (err error)
 //sys  SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
+//sys  SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error)
+//sys  WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error)
 //sys  GetActiveProcessorCount(groupNumber uint16) (ret uint32)
 //sys  GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
 //sys  EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
@@ -1834,3 +1846,73 @@ func ResizePseudoConsole(pconsole Handle, size Coord) error {
        // accept arguments that can be casted to uintptr, and Coord can't.
        return resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size))))
 }
+
+// DCB constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb.
+const (
+       CBR_110    = 110
+       CBR_300    = 300
+       CBR_600    = 600
+       CBR_1200   = 1200
+       CBR_2400   = 2400
+       CBR_4800   = 4800
+       CBR_9600   = 9600
+       CBR_14400  = 14400
+       CBR_19200  = 19200
+       CBR_38400  = 38400
+       CBR_57600  = 57600
+       CBR_115200 = 115200
+       CBR_128000 = 128000
+       CBR_256000 = 256000
+
+       DTR_CONTROL_DISABLE   = 0x00000000
+       DTR_CONTROL_ENABLE    = 0x00000010
+       DTR_CONTROL_HANDSHAKE = 0x00000020
+
+       RTS_CONTROL_DISABLE   = 0x00000000
+       RTS_CONTROL_ENABLE    = 0x00001000
+       RTS_CONTROL_HANDSHAKE = 0x00002000
+       RTS_CONTROL_TOGGLE    = 0x00003000
+
+       NOPARITY    = 0
+       ODDPARITY   = 1
+       EVENPARITY  = 2
+       MARKPARITY  = 3
+       SPACEPARITY = 4
+
+       ONESTOPBIT   = 0
+       ONE5STOPBITS = 1
+       TWOSTOPBITS  = 2
+)
+
+// EscapeCommFunction constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-escapecommfunction.
+const (
+       SETXOFF  = 1
+       SETXON   = 2
+       SETRTS   = 3
+       CLRRTS   = 4
+       SETDTR   = 5
+       CLRDTR   = 6
+       SETBREAK = 8
+       CLRBREAK = 9
+)
+
+// PurgeComm constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-purgecomm.
+const (
+       PURGE_TXABORT = 0x0001
+       PURGE_RXABORT = 0x0002
+       PURGE_TXCLEAR = 0x0004
+       PURGE_RXCLEAR = 0x0008
+)
+
+// SetCommMask constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcommmask.
+const (
+       EV_RXCHAR  = 0x0001
+       EV_RXFLAG  = 0x0002
+       EV_TXEMPTY = 0x0004
+       EV_CTS     = 0x0008
+       EV_DSR     = 0x0010
+       EV_RLSD    = 0x0020
+       EV_BREAK   = 0x0040
+       EV_ERR     = 0x0080
+       EV_RING    = 0x0100
+)
index 359780f6ace5e622b4986de48fc6b547d712ece9..d8cb71db0a61b95df31c06848ccf4fe4e1dd785c 100644 (file)
@@ -3380,3 +3380,27 @@ type BLOB struct {
        Size     uint32
        BlobData *byte
 }
+
+type ComStat struct {
+       Flags    uint32
+       CBInQue  uint32
+       CBOutQue uint32
+}
+
+type DCB struct {
+       DCBlength  uint32
+       BaudRate   uint32
+       Flags      uint32
+       wReserved  uint16
+       XonLim     uint16
+       XoffLim    uint16
+       ByteSize   uint8
+       Parity     uint8
+       StopBits   uint8
+       XonChar    byte
+       XoffChar   byte
+       ErrorChar  byte
+       EofChar    byte
+       EvtChar    byte
+       wReserved1 uint16
+}
index e8791c82c30f445a0a8ff95b01462140ff183171..5c6035ddfa923580803e21170845eda63e4c113b 100644 (file)
@@ -188,6 +188,8 @@ var (
        procAssignProcessToJobObject                             = modkernel32.NewProc("AssignProcessToJobObject")
        procCancelIo                                             = modkernel32.NewProc("CancelIo")
        procCancelIoEx                                           = modkernel32.NewProc("CancelIoEx")
+       procClearCommBreak                                       = modkernel32.NewProc("ClearCommBreak")
+       procClearCommError                                       = modkernel32.NewProc("ClearCommError")
        procCloseHandle                                          = modkernel32.NewProc("CloseHandle")
        procClosePseudoConsole                                   = modkernel32.NewProc("ClosePseudoConsole")
        procConnectNamedPipe                                     = modkernel32.NewProc("ConnectNamedPipe")
@@ -212,7 +214,9 @@ var (
        procDeleteProcThreadAttributeList                        = modkernel32.NewProc("DeleteProcThreadAttributeList")
        procDeleteVolumeMountPointW                              = modkernel32.NewProc("DeleteVolumeMountPointW")
        procDeviceIoControl                                      = modkernel32.NewProc("DeviceIoControl")
+       procDisconnectNamedPipe                                  = modkernel32.NewProc("DisconnectNamedPipe")
        procDuplicateHandle                                      = modkernel32.NewProc("DuplicateHandle")
+       procEscapeCommFunction                                   = modkernel32.NewProc("EscapeCommFunction")
        procExitProcess                                          = modkernel32.NewProc("ExitProcess")
        procExpandEnvironmentStringsW                            = modkernel32.NewProc("ExpandEnvironmentStringsW")
        procFindClose                                            = modkernel32.NewProc("FindClose")
@@ -236,6 +240,8 @@ var (
        procGenerateConsoleCtrlEvent                             = modkernel32.NewProc("GenerateConsoleCtrlEvent")
        procGetACP                                               = modkernel32.NewProc("GetACP")
        procGetActiveProcessorCount                              = modkernel32.NewProc("GetActiveProcessorCount")
+       procGetCommModemStatus                                   = modkernel32.NewProc("GetCommModemStatus")
+       procGetCommState                                         = modkernel32.NewProc("GetCommState")
        procGetCommTimeouts                                      = modkernel32.NewProc("GetCommTimeouts")
        procGetCommandLineW                                      = modkernel32.NewProc("GetCommandLineW")
        procGetComputerNameExW                                   = modkernel32.NewProc("GetComputerNameExW")
@@ -322,6 +328,7 @@ var (
        procProcess32NextW                                       = modkernel32.NewProc("Process32NextW")
        procProcessIdToSessionId                                 = modkernel32.NewProc("ProcessIdToSessionId")
        procPulseEvent                                           = modkernel32.NewProc("PulseEvent")
+       procPurgeComm                                            = modkernel32.NewProc("PurgeComm")
        procQueryDosDeviceW                                      = modkernel32.NewProc("QueryDosDeviceW")
        procQueryFullProcessImageNameW                           = modkernel32.NewProc("QueryFullProcessImageNameW")
        procQueryInformationJobObject                            = modkernel32.NewProc("QueryInformationJobObject")
@@ -335,6 +342,9 @@ var (
        procResetEvent                                           = modkernel32.NewProc("ResetEvent")
        procResizePseudoConsole                                  = modkernel32.NewProc("ResizePseudoConsole")
        procResumeThread                                         = modkernel32.NewProc("ResumeThread")
+       procSetCommBreak                                         = modkernel32.NewProc("SetCommBreak")
+       procSetCommMask                                          = modkernel32.NewProc("SetCommMask")
+       procSetCommState                                         = modkernel32.NewProc("SetCommState")
        procSetCommTimeouts                                      = modkernel32.NewProc("SetCommTimeouts")
        procSetConsoleCursorPosition                             = modkernel32.NewProc("SetConsoleCursorPosition")
        procSetConsoleMode                                       = modkernel32.NewProc("SetConsoleMode")
@@ -342,7 +352,6 @@ var (
        procSetDefaultDllDirectories                             = modkernel32.NewProc("SetDefaultDllDirectories")
        procSetDllDirectoryW                                     = modkernel32.NewProc("SetDllDirectoryW")
        procSetEndOfFile                                         = modkernel32.NewProc("SetEndOfFile")
-       procSetFileValidData                                     = modkernel32.NewProc("SetFileValidData")
        procSetEnvironmentVariableW                              = modkernel32.NewProc("SetEnvironmentVariableW")
        procSetErrorMode                                         = modkernel32.NewProc("SetErrorMode")
        procSetEvent                                             = modkernel32.NewProc("SetEvent")
@@ -351,6 +360,7 @@ var (
        procSetFileInformationByHandle                           = modkernel32.NewProc("SetFileInformationByHandle")
        procSetFilePointer                                       = modkernel32.NewProc("SetFilePointer")
        procSetFileTime                                          = modkernel32.NewProc("SetFileTime")
+       procSetFileValidData                                     = modkernel32.NewProc("SetFileValidData")
        procSetHandleInformation                                 = modkernel32.NewProc("SetHandleInformation")
        procSetInformationJobObject                              = modkernel32.NewProc("SetInformationJobObject")
        procSetNamedPipeHandleState                              = modkernel32.NewProc("SetNamedPipeHandleState")
@@ -361,6 +371,7 @@ var (
        procSetStdHandle                                         = modkernel32.NewProc("SetStdHandle")
        procSetVolumeLabelW                                      = modkernel32.NewProc("SetVolumeLabelW")
        procSetVolumeMountPointW                                 = modkernel32.NewProc("SetVolumeMountPointW")
+       procSetupComm                                            = modkernel32.NewProc("SetupComm")
        procSizeofResource                                       = modkernel32.NewProc("SizeofResource")
        procSleepEx                                              = modkernel32.NewProc("SleepEx")
        procTerminateJobObject                                   = modkernel32.NewProc("TerminateJobObject")
@@ -379,6 +390,7 @@ var (
        procVirtualQueryEx                                       = modkernel32.NewProc("VirtualQueryEx")
        procVirtualUnlock                                        = modkernel32.NewProc("VirtualUnlock")
        procWTSGetActiveConsoleSessionId                         = modkernel32.NewProc("WTSGetActiveConsoleSessionId")
+       procWaitCommEvent                                        = modkernel32.NewProc("WaitCommEvent")
        procWaitForMultipleObjects                               = modkernel32.NewProc("WaitForMultipleObjects")
        procWaitForSingleObject                                  = modkernel32.NewProc("WaitForSingleObject")
        procWriteConsoleW                                        = modkernel32.NewProc("WriteConsoleW")
@@ -1641,6 +1653,22 @@ func CancelIoEx(s Handle, o *Overlapped) (err error) {
        return
 }
 
+func ClearCommBreak(handle Handle) (err error) {
+       r1, _, e1 := syscall.Syscall(procClearCommBreak.Addr(), 1, uintptr(handle), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) {
+       r1, _, e1 := syscall.Syscall(procClearCommError.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat)))
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func CloseHandle(handle Handle) (err error) {
        r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
        if r1 == 0 {
@@ -1845,6 +1873,14 @@ func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBuff
        return
 }
 
+func DisconnectNamedPipe(pipe Handle) (err error) {
+       r1, _, e1 := syscall.Syscall(procDisconnectNamedPipe.Addr(), 1, uintptr(pipe), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
        var _p0 uint32
        if bInheritHandle {
@@ -1857,6 +1893,14 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
        return
 }
 
+func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procEscapeCommFunction.Addr(), 2, uintptr(handle), uintptr(dwFunc), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func ExitProcess(exitcode uint32) {
        syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
        return
@@ -2058,6 +2102,22 @@ func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
        return
 }
 
+func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procGetCommModemStatus.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func GetCommState(handle Handle, lpDCB *DCB) (err error) {
+       r1, _, e1 := syscall.Syscall(procGetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
        r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
        if r1 == 0 {
@@ -2810,6 +2870,14 @@ func PulseEvent(event Handle) (err error) {
        return
 }
 
+func PurgeComm(handle Handle, dwFlags uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procPurgeComm.Addr(), 2, uintptr(handle), uintptr(dwFlags), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
        r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
        n = uint32(r0)
@@ -2924,6 +2992,30 @@ func ResumeThread(thread Handle) (ret uint32, err error) {
        return
 }
 
+func SetCommBreak(handle Handle) (err error) {
+       r1, _, e1 := syscall.Syscall(procSetCommBreak.Addr(), 1, uintptr(handle), 0, 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func SetCommMask(handle Handle, dwEvtMask uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procSetCommMask.Addr(), 2, uintptr(handle), uintptr(dwEvtMask), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+func SetCommState(handle Handle, lpDCB *DCB) (err error) {
+       r1, _, e1 := syscall.Syscall(procSetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
        r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
        if r1 == 0 {
@@ -2989,14 +3081,6 @@ func SetEndOfFile(handle Handle) (err error) {
        return
 }
 
-func SetFileValidData(handle Handle, validDataLength int64) (err error) {
-       r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0)
-       if r1 == 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
 func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
        r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
        if r1 == 0 {
@@ -3060,6 +3144,14 @@ func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim
        return
 }
 
+func SetFileValidData(handle Handle, validDataLength int64) (err error) {
+       r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0)
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
        r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
        if r1 == 0 {
@@ -3145,6 +3237,14 @@ func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err erro
        return
 }
 
+func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procSetupComm.Addr(), 3, uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue))
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {
        r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
        size = uint32(r0)
@@ -3291,6 +3391,14 @@ func WTSGetActiveConsoleSessionId() (sessionID uint32) {
        return
 }
 
+func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) {
+       r1, _, e1 := syscall.Syscall(procWaitCommEvent.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped)))
+       if r1 == 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
        var _p0 uint32
        if waitAll {
index 0601b13ce381274095eaae8d8d200f259011cf07..293c69c4c28ba0585cd05180b4d80ebb6ceed216 100644 (file)
@@ -40,7 +40,7 @@ golang.org/x/mod/zip
 ## explicit; go 1.18
 golang.org/x/sync/errgroup
 golang.org/x/sync/semaphore
-# golang.org/x/sys v0.18.0
+# golang.org/x/sys v0.19.0
 ## explicit; go 1.18
 golang.org/x/sys/plan9
 golang.org/x/sys/unix
index 333517bc5c5a5a402fb3ac64b686349f3fef7337..862e7803b472724e68d6557bcf13e5b8f2cac5c8 100644 (file)
@@ -3,11 +3,11 @@ module std
 go 1.23
 
 require (
-       golang.org/x/crypto v0.21.0
-       golang.org/x/net v0.23.0
+       golang.org/x/crypto v0.22.0
+       golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553
 )
 
 require (
-       golang.org/x/sys v0.18.0 // indirect
+       golang.org/x/sys v0.19.0 // indirect
        golang.org/x/text v0.14.0 // indirect
 )
index 6f756a6b26be9111e3fdd7a4be24760cc6c41a48..fef068762a0465cd6174ed95d5f0bc18d71fa4e8 100644 (file)
@@ -1,8 +1,8 @@
-golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
-golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
-golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
-golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
-golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
-golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
+golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553 h1:SY0JWjR8cbNiMj6BwFjzJIzYd/8cIgfg1cbdMpm8g38=
+golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
+golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
+golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
index 9285f90d9e83e3ccd6e09f6303857b87a5212247..683d538dbc58958de97f8133c42e5156b58ebf57 100644 (file)
@@ -1898,6 +1898,9 @@ func http2terminalReadFrameError(err error) bool {
 // returned error is ErrFrameTooLarge. Other errors may be of type
 // ConnectionError, StreamError, or anything else from the underlying
 // reader.
+//
+// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
+// indicates the stream responsible for the error.
 func (fr *http2Framer) ReadFrame() (http2Frame, error) {
        fr.errDetail = nil
        if fr.lastFrame != nil {
@@ -2929,7 +2932,7 @@ func (fr *http2Framer) maxHeaderStringLen() int {
 // readMetaFrame returns 0 or more CONTINUATION frames from fr and
 // merge them into the provided hf and returns a MetaHeadersFrame
 // with the decoded hpack values.
-func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFrame, error) {
+func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (http2Frame, error) {
        if fr.AllowIllegalReads {
                return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")
        }
@@ -3000,7 +3003,7 @@ func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFr
                        }
                        // It would be nice to send a RST_STREAM before sending the GOAWAY,
                        // but the structure of the server's frame writer makes this difficult.
-                       return nil, http2ConnectionError(http2ErrCodeProtocol)
+                       return mh, http2ConnectionError(http2ErrCodeProtocol)
                }
 
                // Also close the connection after any CONTINUATION frame following an
@@ -3012,11 +3015,11 @@ func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFr
                        }
                        // It would be nice to send a RST_STREAM before sending the GOAWAY,
                        // but the structure of the server's frame writer makes this difficult.
-                       return nil, http2ConnectionError(http2ErrCodeProtocol)
+                       return mh, http2ConnectionError(http2ErrCodeProtocol)
                }
 
                if _, err := hdec.Write(frag); err != nil {
-                       return nil, http2ConnectionError(http2ErrCodeCompression)
+                       return mh, http2ConnectionError(http2ErrCodeCompression)
                }
 
                if hc.HeadersEnded() {
@@ -3033,7 +3036,7 @@ func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFr
        mh.http2HeadersFrame.invalidate()
 
        if err := hdec.Close(); err != nil {
-               return nil, http2ConnectionError(http2ErrCodeCompression)
+               return mh, http2ConnectionError(http2ErrCodeCompression)
        }
        if invalid != nil {
                fr.errDetail = invalid
@@ -5310,6 +5313,11 @@ func (sc *http2serverConn) processFrameFromReader(res http2readFrameResult) bool
                sc.goAway(http2ErrCodeFlowControl)
                return true
        case http2ConnectionError:
+               if res.f != nil {
+                       if id := res.f.Header().StreamID; id > sc.maxClientStreamID {
+                               sc.maxClientStreamID = id
+                       }
+               }
                sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev)
                sc.goAway(http2ErrCode(ev))
                return true // goAway will handle shutdown
index 66aebae25885f166412ee417bdaf76e27b974fe0..c672ccf6986b08dee9c60f4405d6d66cafbc3e98 100644 (file)
@@ -33,6 +33,9 @@
 #define CONSTBASE  R16
 #define BLOCKS R17
 
+// for VPERMXOR
+#define MASK  R18
+
 DATA consts<>+0x00(SB)/8, $0x3320646e61707865
 DATA consts<>+0x08(SB)/8, $0x6b20657479622d32
 DATA consts<>+0x10(SB)/8, $0x0000000000000001
@@ -53,7 +56,11 @@ DATA consts<>+0x80(SB)/8, $0x6b2065746b206574
 DATA consts<>+0x88(SB)/8, $0x6b2065746b206574
 DATA consts<>+0x90(SB)/8, $0x0000000100000000
 DATA consts<>+0x98(SB)/8, $0x0000000300000002
-GLOBL consts<>(SB), RODATA, $0xa0
+DATA consts<>+0xa0(SB)/8, $0x5566774411223300
+DATA consts<>+0xa8(SB)/8, $0xddeeffcc99aabb88
+DATA consts<>+0xb0(SB)/8, $0x6677445522330011
+DATA consts<>+0xb8(SB)/8, $0xeeffccddaabb8899
+GLOBL consts<>(SB), RODATA, $0xc0
 
 //func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
 TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
@@ -70,6 +77,9 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
        MOVD $48, R10
        MOVD $64, R11
        SRD $6, LEN, BLOCKS
+       // for VPERMXOR
+       MOVD $consts<>+0xa0(SB), MASK
+       MOVD $16, R20
        // V16
        LXVW4X (CONSTBASE)(R0), VS48
        ADD $80,CONSTBASE
@@ -87,6 +97,10 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
        // V28
        LXVW4X (CONSTBASE)(R11), VS60
 
+       // Load mask constants for VPERMXOR
+       LXVW4X (MASK)(R0), V20
+       LXVW4X (MASK)(R20), V21
+
        // splat slot from V19 -> V26
        VSPLTW $0, V19, V26
 
@@ -97,7 +111,7 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
 
        MOVD $10, R14
        MOVD R14, CTR
-
+       PCALIGN $16
 loop_outer_vsx:
        // V0, V1, V2, V3
        LXVW4X (R0)(CONSTBASE), VS32
@@ -128,22 +142,17 @@ loop_outer_vsx:
        VSPLTISW $12, V28
        VSPLTISW $8, V29
        VSPLTISW $7, V30
-
+       PCALIGN $16
 loop_vsx:
        VADDUWM V0, V4, V0
        VADDUWM V1, V5, V1
        VADDUWM V2, V6, V2
        VADDUWM V3, V7, V3
 
-       VXOR V12, V0, V12
-       VXOR V13, V1, V13
-       VXOR V14, V2, V14
-       VXOR V15, V3, V15
-
-       VRLW V12, V27, V12
-       VRLW V13, V27, V13
-       VRLW V14, V27, V14
-       VRLW V15, V27, V15
+       VPERMXOR V12, V0, V21, V12
+       VPERMXOR V13, V1, V21, V13
+       VPERMXOR V14, V2, V21, V14
+       VPERMXOR V15, V3, V21, V15
 
        VADDUWM V8, V12, V8
        VADDUWM V9, V13, V9
@@ -165,15 +174,10 @@ loop_vsx:
        VADDUWM V2, V6, V2
        VADDUWM V3, V7, V3
 
-       VXOR V12, V0, V12
-       VXOR V13, V1, V13
-       VXOR V14, V2, V14
-       VXOR V15, V3, V15
-
-       VRLW V12, V29, V12
-       VRLW V13, V29, V13
-       VRLW V14, V29, V14
-       VRLW V15, V29, V15
+       VPERMXOR V12, V0, V20, V12
+       VPERMXOR V13, V1, V20, V13
+       VPERMXOR V14, V2, V20, V14
+       VPERMXOR V15, V3, V20, V15
 
        VADDUWM V8, V12, V8
        VADDUWM V9, V13, V9
@@ -195,15 +199,10 @@ loop_vsx:
        VADDUWM V2, V7, V2
        VADDUWM V3, V4, V3
 
-       VXOR V15, V0, V15
-       VXOR V12, V1, V12
-       VXOR V13, V2, V13
-       VXOR V14, V3, V14
-
-       VRLW V15, V27, V15
-       VRLW V12, V27, V12
-       VRLW V13, V27, V13
-       VRLW V14, V27, V14
+       VPERMXOR V15, V0, V21, V15
+       VPERMXOR V12, V1, V21, V12
+       VPERMXOR V13, V2, V21, V13
+       VPERMXOR V14, V3, V21, V14
 
        VADDUWM V10, V15, V10
        VADDUWM V11, V12, V11
@@ -225,15 +224,10 @@ loop_vsx:
        VADDUWM V2, V7, V2
        VADDUWM V3, V4, V3
 
-       VXOR V15, V0, V15
-       VXOR V12, V1, V12
-       VXOR V13, V2, V13
-       VXOR V14, V3, V14
-
-       VRLW V15, V29, V15
-       VRLW V12, V29, V12
-       VRLW V13, V29, V13
-       VRLW V14, V29, V14
+       VPERMXOR V15, V0, V20, V15
+       VPERMXOR V12, V1, V20, V12
+       VPERMXOR V13, V2, V20, V13
+       VPERMXOR V14, V3, V20, V14
 
        VADDUWM V10, V15, V10
        VADDUWM V11, V12, V11
@@ -249,48 +243,48 @@ loop_vsx:
        VRLW V6, V30, V6
        VRLW V7, V30, V7
        VRLW V4, V30, V4
-       BC   16, LT, loop_vsx
+       BDNZ   loop_vsx
 
        VADDUWM V12, V26, V12
 
-       WORD $0x13600F8C                // VMRGEW V0, V1, V27
-       WORD $0x13821F8C                // VMRGEW V2, V3, V28
+       VMRGEW V0, V1, V27
+       VMRGEW V2, V3, V28
 
-       WORD $0x10000E8C                // VMRGOW V0, V1, V0
-       WORD $0x10421E8C                // VMRGOW V2, V3, V2
+       VMRGOW V0, V1, V0
+       VMRGOW V2, V3, V2
 
-       WORD $0x13A42F8C                // VMRGEW V4, V5, V29
-       WORD $0x13C63F8C                // VMRGEW V6, V7, V30
+       VMRGEW V4, V5, V29
+       VMRGEW V6, V7, V30
 
        XXPERMDI VS32, VS34, $0, VS33
        XXPERMDI VS32, VS34, $3, VS35
        XXPERMDI VS59, VS60, $0, VS32
        XXPERMDI VS59, VS60, $3, VS34
 
-       WORD $0x10842E8C                // VMRGOW V4, V5, V4
-       WORD $0x10C63E8C                // VMRGOW V6, V7, V6
+       VMRGOW V4, V5, V4
+       VMRGOW V6, V7, V6
 
-       WORD $0x13684F8C                // VMRGEW V8, V9, V27
-       WORD $0x138A5F8C                // VMRGEW V10, V11, V28
+       VMRGEW V8, V9, V27
+       VMRGEW V10, V11, V28
 
        XXPERMDI VS36, VS38, $0, VS37
        XXPERMDI VS36, VS38, $3, VS39
        XXPERMDI VS61, VS62, $0, VS36
        XXPERMDI VS61, VS62, $3, VS38
 
-       WORD $0x11084E8C                // VMRGOW V8, V9, V8
-       WORD $0x114A5E8C                // VMRGOW V10, V11, V10
+       VMRGOW V8, V9, V8
+       VMRGOW V10, V11, V10
 
-       WORD $0x13AC6F8C                // VMRGEW V12, V13, V29
-       WORD $0x13CE7F8C                // VMRGEW V14, V15, V30
+       VMRGEW V12, V13, V29
+       VMRGEW V14, V15, V30
 
        XXPERMDI VS40, VS42, $0, VS41
        XXPERMDI VS40, VS42, $3, VS43
        XXPERMDI VS59, VS60, $0, VS40
        XXPERMDI VS59, VS60, $3, VS42
 
-       WORD $0x118C6E8C                // VMRGOW V12, V13, V12
-       WORD $0x11CE7E8C                // VMRGOW V14, V15, V14
+       VMRGOW V12, V13, V12
+       VMRGOW V14, V15, V14
 
        VSPLTISW $4, V27
        VADDUWM V26, V27, V26
@@ -431,7 +425,7 @@ tail_vsx:
        ADD $-1, R11, R12
        ADD $-1, INP
        ADD $-1, OUT
-
+       PCALIGN $16
 looptail_vsx:
        // Copying the result to OUT
        // in bytes.
@@ -439,7 +433,7 @@ looptail_vsx:
        MOVBZU 1(INP), TMP
        XOR    KEY, TMP, KEY
        MOVBU  KEY, 1(OUT)
-       BC     16, LT, looptail_vsx
+       BDNZ   looptail_vsx
 
        // Clear the stack values
        STXVW4X VS48, (R11)(R0)
index 6442e5d7ec24cd7d6ee7d73ccf03ecba280524cf..f8274732d31e7d1828809514c03a51348f5652fd 100644 (file)
@@ -1,4 +1,4 @@
-# golang.org/x/crypto v0.21.0
+# golang.org/x/crypto v0.22.0
 ## explicit; go 1.18
 golang.org/x/crypto/chacha20
 golang.org/x/crypto/chacha20poly1305
@@ -7,7 +7,7 @@ golang.org/x/crypto/cryptobyte/asn1
 golang.org/x/crypto/hkdf
 golang.org/x/crypto/internal/alias
 golang.org/x/crypto/internal/poly1305
-# golang.org/x/net v0.23.0
+# golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553
 ## explicit; go 1.18
 golang.org/x/net/dns/dnsmessage
 golang.org/x/net/http/httpguts
@@ -17,7 +17,7 @@ golang.org/x/net/idna
 golang.org/x/net/lif
 golang.org/x/net/nettest
 golang.org/x/net/route
-# golang.org/x/sys v0.18.0
+# golang.org/x/sys v0.19.0
 ## explicit; go 1.18
 golang.org/x/sys/cpu
 # golang.org/x/text v0.14.0