]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: update vendored golang.org/x/net
authorTobias Klauser <tklauser@distanz.ch>
Tue, 11 Apr 2023 22:28:06 +0000 (00:28 +0200)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 22:42:18 +0000 (22:42 +0000)
Pull in CL 483375. This also updates golang.org/x/sys to v0.7.0 and thus
we also need to update it to that version in cmd to keep
TestDependencyVersionsConsistent happy.

Fixes #22927

Change-Id: Ice14cd66a5c2a621b373c3d29455c75494436045
Reviewed-on: https://go-review.googlesource.com/c/go/+/483595
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

125 files changed:
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/sys/unix/ioctl_signed.go [new file with mode: 0644]
src/cmd/vendor/golang.org/x/sys/unix/ioctl_unsigned.go [moved from src/cmd/vendor/golang.org/x/sys/unix/ioctl.go with 76% similarity]
src/cmd/vendor/golang.org/x/sys/unix/ioctl_zos.go
src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh
src/cmd/vendor/golang.org/x/sys/unix/ptrace_darwin.go
src/cmd/vendor/golang.org/x/sys/unix/ptrace_ios.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_aix.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_bsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_hurd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_netbsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_openbsd.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_solaris.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go
src/cmd/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.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/modules.txt
src/go.mod
src/go.sum
src/net/http/h2_bundle.go
src/net/http/socks_bundle.go
src/vendor/golang.org/x/net/nettest/nettest.go
src/vendor/golang.org/x/sys/cpu/hwcap_linux.go
src/vendor/golang.org/x/sys/cpu/runtime_auxv.go [new file with mode: 0644]
src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go [new file with mode: 0644]
src/vendor/modules.txt

index 49dc45cd62d25b788fc14702d08af4a9dfa8261c..f3746634429e8d8a2d49baf20db73276b2afe7d9 100644 (file)
@@ -7,7 +7,7 @@ require (
        golang.org/x/arch v0.2.1-0.20230208145055-40c19ba4a7c5
        golang.org/x/mod v0.8.0
        golang.org/x/sync v0.1.0
-       golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339
+       golang.org/x/sys v0.7.0
        golang.org/x/term v0.5.0
        golang.org/x/tools v0.5.1-0.20230207232209-1ace7dbcb0de
 )
index 8acb92cda4f67102c2557fa98a2f5a7bf77868c2..24769262fb33bc8334cf3bba54dcaf4ff5bb2127 100644 (file)
@@ -8,8 +8,8 @@ golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339 h1:qejQWXLeAs3eO3KUJ7VrThA+k04v3zo/FhGln8EizY0=
-golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
 golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
 golang.org/x/tools v0.5.1-0.20230207232209-1ace7dbcb0de h1:4jmbIl5TAjCdpElDHfccqVTxbYmcojXD9SeGqafSYp0=
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/ioctl_signed.go b/src/cmd/vendor/golang.org/x/sys/unix/ioctl_signed.go
new file mode 100644 (file)
index 0000000..7def958
--- /dev/null
@@ -0,0 +1,70 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || solaris
+// +build aix solaris
+
+package unix
+
+import (
+       "unsafe"
+)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req int, value int) error {
+       return ioctl(fd, req, uintptr(value))
+}
+
+// IoctlSetPointerInt performs an ioctl operation which sets an
+// integer value on fd, using the specified request number. The ioctl
+// argument is called with a pointer to the integer value, rather than
+// passing the integer value directly.
+func IoctlSetPointerInt(fd int, req int, value int) error {
+       v := int32(value)
+       return ioctlPtr(fd, req, unsafe.Pointer(&v))
+}
+
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
+//
+// To change fd's window size, the req argument should be TIOCSWINSZ.
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
+       // TODO: if we get the chance, remove the req parameter and
+       // hardcode TIOCSWINSZ.
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
+
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value will usually be TCSETA or TIOCSETA.
+func IoctlSetTermios(fd int, req int, value *Termios) error {
+       // TODO: if we get the chance, remove the req parameter.
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+//
+// A few ioctl requests use the return value as an output parameter;
+// for those, IoctlRetInt should be used instead of this function.
+func IoctlGetInt(fd int, req int) (int, error) {
+       var value int
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+       return value, err
+}
+
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
+       var value Winsize
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+       return &value, err
+}
+
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
+       var value Termios
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+       return &value, err
+}
similarity index 76%
rename from src/cmd/vendor/golang.org/x/sys/unix/ioctl.go
rename to src/cmd/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
index 1c51b0ec2bcddc37a8270434dab51cd74e328dc7..649913d1ea71a1cfbb000875a3d2614298c18e73 100644 (file)
@@ -2,13 +2,12 @@
 // 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 || hurd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
+//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd
+// +build darwin dragonfly freebsd hurd linux netbsd openbsd
 
 package unix
 
 import (
-       "runtime"
        "unsafe"
 )
 
@@ -27,7 +26,7 @@ func IoctlSetInt(fd int, req uint, value int) error {
 // passing the integer value directly.
 func IoctlSetPointerInt(fd int, req uint, value int) error {
        v := int32(value)
-       return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
+       return ioctlPtr(fd, req, unsafe.Pointer(&v))
 }
 
 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
@@ -36,9 +35,7 @@ func IoctlSetPointerInt(fd int, req uint, value int) error {
 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
        // TODO: if we get the chance, remove the req parameter and
        // hardcode TIOCSWINSZ.
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-       runtime.KeepAlive(value)
-       return err
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
 }
 
 // IoctlSetTermios performs an ioctl on fd with a *Termios.
@@ -46,9 +43,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
 // The req value will usually be TCSETA or TIOCSETA.
 func IoctlSetTermios(fd int, req uint, value *Termios) error {
        // TODO: if we get the chance, remove the req parameter.
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-       runtime.KeepAlive(value)
-       return err
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
 }
 
 // IoctlGetInt performs an ioctl operation which gets an integer value
@@ -58,18 +53,18 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
 // for those, IoctlRetInt should be used instead of this function.
 func IoctlGetInt(fd int, req uint) (int, error) {
        var value int
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return value, err
 }
 
 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
        var value Winsize
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return &value, err
 }
 
 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
        var value Termios
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return &value, err
 }
index 5384e7d91d7989002ba950c4dcb343ee8195c2b0..cdc21bf76dcbbdde72dd3d4a236533035a91a18e 100644 (file)
@@ -17,25 +17,23 @@ import (
 
 // IoctlSetInt performs an ioctl operation which sets an integer value
 // on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
+func IoctlSetInt(fd int, req int, value int) error {
        return ioctl(fd, req, uintptr(value))
 }
 
 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
 //
 // To change fd's window size, the req argument should be TIOCSWINSZ.
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
        // TODO: if we get the chance, remove the req parameter and
        // hardcode TIOCSWINSZ.
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-       runtime.KeepAlive(value)
-       return err
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
 }
 
 // IoctlSetTermios performs an ioctl on fd with a *Termios.
 //
 // The req value is expected to be TCSETS, TCSETSW, or TCSETSF
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func IoctlSetTermios(fd int, req int, value *Termios) error {
        if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
                return ENOSYS
        }
@@ -49,22 +47,22 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
 //
 // A few ioctl requests use the return value as an output parameter;
 // for those, IoctlRetInt should be used instead of this function.
-func IoctlGetInt(fd int, req uint) (int, error) {
+func IoctlGetInt(fd int, req int) (int, error) {
        var value int
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return value, err
 }
 
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
        var value Winsize
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return &value, err
 }
 
 // IoctlGetTermios performs an ioctl on fd with a *Termios.
 //
 // The req value is expected to be TCGETS
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
        var value Termios
        if req != TCGETS {
                return &value, ENOSYS
index 7456d9ddde16b56331a704279a85ead5d55984d1..2045d3dadb87e66b19d8428d51afa23be6b6e05b 100644 (file)
@@ -66,6 +66,7 @@ includes_Darwin='
 #include <sys/ptrace.h>
 #include <sys/select.h>
 #include <sys/socket.h>
+#include <sys/stat.h>
 #include <sys/un.h>
 #include <sys/sockio.h>
 #include <sys/sys_domain.h>
@@ -521,6 +522,7 @@ ccflags="$@"
                $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
                $2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
                $2 ~ /^RAW_PAYLOAD_/ ||
+               $2 ~ /^[US]F_/ ||
                $2 ~ /^TP_STATUS_/ ||
                $2 ~ /^FALLOC_/ ||
                $2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
index 463c3eff7fd27170757f9eb8d3d74bcd87f16fea..39dba6ca6a34bf67ffe4e7205c18b86dd3696442 100644 (file)
@@ -7,6 +7,12 @@
 
 package unix
 
+import "unsafe"
+
 func ptrace(request int, pid int, addr uintptr, data uintptr) error {
        return ptrace1(request, pid, addr, data)
 }
+
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
+       return ptrace1Ptr(request, pid, addr, data)
+}
index ed0509a0117c413d554d211fe2b313f4bbf52626..9ea66330a96889a6dfcd3040b13af719b2b8e28a 100644 (file)
@@ -7,6 +7,12 @@
 
 package unix
 
+import "unsafe"
+
 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
        return ENOTSUP
 }
+
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
+       return ENOTSUP
+}
index 2db1b51e99f04098055f018b1ead48b497cef57e..c406ae00f417f5fd12faa6f38f17f86e4bb5fa41 100644 (file)
@@ -292,9 +292,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
                                break
                        }
                }
-
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
@@ -410,7 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
 
 func (w WaitStatus) TrapCause() int { return -1 }
 
-//sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctl(fd int, req int, arg uintptr) (err error)
+//sys  ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl
 
 // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
 // There is no way to create a custom fcntl and to keep //sys fcntl easily,
index e92a0be1630c7ab433ed63fac952507746496836..f2871fa953512a0a1599ce78e368028e9981d673 100644 (file)
@@ -8,7 +8,6 @@
 package unix
 
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
 //sys  Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
 
 //sys  mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
index 16eed17098e5fffda7bc80a6357044605088c17c..75718ec0f19b5a7f60cb365ba551dfe2ea3e3255 100644 (file)
@@ -8,7 +8,6 @@
 package unix
 
 //sysnb        Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
 
 //sys  mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
index eda42671f195432fc99bd91b5cc200fc621d4c65..7705c3270b5ece799f530628a73877ce9a868350 100644 (file)
@@ -245,8 +245,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
                                break
                        }
                }
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
index 192b071b3d0e43eb7e0bb5b0ff79463f11be815d..206921504cb6be713cd45b9ae097db851ecb1afe 100644 (file)
@@ -14,7 +14,6 @@ package unix
 
 import (
        "fmt"
-       "runtime"
        "syscall"
        "unsafe"
 )
@@ -376,11 +375,10 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
 func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
 
 //sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {
-       err := ioctl(fd, CTLIOCGINFO, uintptr(unsafe.Pointer(ctlInfo)))
-       runtime.KeepAlive(ctlInfo)
-       return err
+       return ioctlPtr(fd, CTLIOCGINFO, unsafe.Pointer(ctlInfo))
 }
 
 // IfreqMTU is struct ifreq used to get or set a network device's MTU.
@@ -394,16 +392,14 @@ type IfreqMTU struct {
 func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {
        var ifreq IfreqMTU
        copy(ifreq.Name[:], ifname)
-       err := ioctl(fd, SIOCGIFMTU, uintptr(unsafe.Pointer(&ifreq)))
+       err := ioctlPtr(fd, SIOCGIFMTU, unsafe.Pointer(&ifreq))
        return &ifreq, err
 }
 
 // IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU
 // of the network device specified by ifreq.Name.
 func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
-       err := ioctl(fd, SIOCSIFMTU, uintptr(unsafe.Pointer(ifreq)))
-       runtime.KeepAlive(ifreq)
-       return err
+       return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
 }
 
 //sys  sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
@@ -617,6 +613,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
 //sys  Rmdir(path string) (err error)
 //sys  Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
 //sys  Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys  Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error)
 //sys  Setegid(egid int) (err error)
 //sysnb        Seteuid(euid int) (err error)
 //sysnb        Setgid(gid int) (err error)
@@ -626,7 +623,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
 //sys  Setprivexec(flag int) (err error)
 //sysnb        Setregid(rgid int, egid int) (err error)
 //sysnb        Setreuid(ruid int, euid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
 //sysnb        Setuid(uid int) (err error)
@@ -680,7 +676,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
 // Kqueue_from_portset_np
 // Kqueue_portset
 // Getattrlist
-// Setattrlist
 // Getdirentriesattr
 // Searchfs
 // Delete
index b37310ce9b4050559d83f3b906d50fbca8a8f815..9fa879806bcbfdb5a8b041c1eef960e808fd4f9b 100644 (file)
@@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 //sys  getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
 //sys  Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 //sys  ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
+//sys  ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
 //sys  Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 //sys  Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
index d51ec996304e7c3d19b2e44c37abd987127ad540..f17b8c526a535e9360b65459e3b50ce3d0b14b1c 100644 (file)
@@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 //sys  getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
 //sys  Lstat(path string, stat *Stat_t) (err error)
 //sys  ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
+//sys  ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
 //sys  Stat(path string, stat *Stat_t) (err error)
 //sys  Statfs(path string, stat *Statfs_t) (err error)
index a41111a794e251ae74d147cc3e26fa4cbbedb393..d4ce988e72fbd46bb21ff69f06f3a1b9bfffbe8d 100644 (file)
@@ -172,6 +172,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 }
 
 //sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 //sys  sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 
@@ -325,7 +326,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 //sysnb        Setreuid(ruid int, euid int) (err error)
 //sysnb        Setresgid(rgid int, egid int, sgid int) (err error)
 //sysnb        Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
 //sysnb        Setuid(uid int) (err error)
index 19e71c2240d0f8f071a5bb89a17246dcee82a1fc..afb10106f6e6b8208a9567e6d2a41917188e36c4 100644 (file)
@@ -161,7 +161,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
        return
 }
 
-//sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
+//sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 //sys  sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 
@@ -253,6 +254,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 }
 
 //sys  ptrace(request int, pid int, addr uintptr, data int) (err error)
+//sys  ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) = SYS_PTRACE
 
 func PtraceAttach(pid int) (err error) {
        return ptrace(PT_ATTACH, pid, 0, 0)
@@ -267,11 +269,11 @@ func PtraceDetach(pid int) (err error) {
 }
 
 func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
-       return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
+       return ptracePtr(PT_GETFPREGS, pid, unsafe.Pointer(fpregsout), 0)
 }
 
 func PtraceGetRegs(pid int, regsout *Reg) (err error) {
-       return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
+       return ptracePtr(PT_GETREGS, pid, unsafe.Pointer(regsout), 0)
 }
 
 func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {
@@ -287,9 +289,7 @@ func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count in
        }
        ioDesc.SetLen(countin)
 
-       // TODO(#58387): It's not actually safe to pass &ioDesc as a uintptr here.
-       // Pass it as an unsafe.Pointer instead.
-       err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
+       err = ptracePtr(PT_IO, pid, unsafe.Pointer(&ioDesc), 0)
        return int(ioDesc.Len), err
 }
 
@@ -297,8 +297,8 @@ func PtraceLwpEvents(pid int, enable int) (err error) {
        return ptrace(PT_LWP_EVENTS, pid, 0, enable)
 }
 
-func PtraceLwpInfo(pid int, info uintptr) (err error) {
-       return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
+func PtraceLwpInfo(pid int, info *PtraceLwpInfoStruct) (err error) {
+       return ptracePtr(PT_LWPINFO, pid, unsafe.Pointer(info), int(unsafe.Sizeof(*info)))
 }
 
 func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
@@ -318,13 +318,25 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
 }
 
 func PtraceSetRegs(pid int, regs *Reg) (err error) {
-       return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
+       return ptracePtr(PT_SETREGS, pid, unsafe.Pointer(regs), 0)
 }
 
 func PtraceSingleStep(pid int) (err error) {
        return ptrace(PT_STEP, pid, 1, 0)
 }
 
+func Dup3(oldfd, newfd, flags int) error {
+       if oldfd == newfd || flags&^O_CLOEXEC != 0 {
+               return EINVAL
+       }
+       how := F_DUP2FD
+       if flags&O_CLOEXEC != 0 {
+               how = F_DUP2FD_CLOEXEC
+       }
+       _, err := fcntl(oldfd, how, newfd)
+       return err
+}
+
 /*
  * Exposed directly
  */
@@ -421,7 +433,6 @@ func PtraceSingleStep(pid int) (err error) {
 //sysnb        Setreuid(ruid int, euid int) (err error)
 //sysnb        Setresgid(rgid int, egid int, sgid int) (err error)
 //sysnb        Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
 //sysnb        Setuid(uid int) (err error)
index 2f798dbe2c33c23a167b5846d445a3a4306cf7f4..b8da510043cb78dc2b8baf6d12338d95d047df6c 100644 (file)
@@ -61,5 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
-       return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+       return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)
 }
index 1ed93b69e55640e032790efcc231e4e0fca6fc64..47155c48390b5dcedfc30e89a10fbdd773218f2b 100644 (file)
@@ -61,5 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
-       return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+       return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)
 }
index 4ffb64808d75ee33daadc28159ac4d27a945c74f..381fd4673bececd92f2739a50a623a4317cca20a 100644 (file)
@@ -20,3 +20,11 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        }
        return
 }
+
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
+       if r0 == -1 && er != nil {
+               err = er
+       }
+       return
+}
index 5443dddd48d60cb9c1a9163df1aa144ac06ba1a2..fbaeb5fff14845a6ba09a52a57bef0e6797c518b 100644 (file)
@@ -1015,8 +1015,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
                for n < len(pp.Path) && pp.Path[n] != 0 {
                        n++
                }
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
@@ -1365,6 +1364,10 @@ func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
        return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
 }
 
+func SetsockoptTCPMD5Sig(fd, level, opt int, s *TCPMD5Sig) error {
+       return setsockopt(fd, level, opt, unsafe.Pointer(s), unsafe.Sizeof(*s))
+}
+
 // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
 
 // KeyctlInt calls keyctl commands in which each argument is an int.
@@ -1579,6 +1582,7 @@ func BindToDevice(fd int, device string) (err error) {
 }
 
 //sys  ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
+//sys  ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) = SYS_PTRACE
 
 func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
        // The peek requests are machine-size oriented, so we wrap it
@@ -1596,7 +1600,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
        // boundary.
        n := 0
        if addr%SizeofPtr != 0 {
-               err = ptrace(req, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
+               err = ptracePtr(req, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
                if err != nil {
                        return 0, err
                }
@@ -1608,7 +1612,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
        for len(out) > 0 {
                // We use an internal buffer to guarantee alignment.
                // It's not documented if this is necessary, but we're paranoid.
-               err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
+               err = ptracePtr(req, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
                if err != nil {
                        return n, err
                }
@@ -1640,7 +1644,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
        n := 0
        if addr%SizeofPtr != 0 {
                var buf [SizeofPtr]byte
-               err = ptrace(peekReq, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
+               err = ptracePtr(peekReq, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
                if err != nil {
                        return 0, err
                }
@@ -1667,7 +1671,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
        // Trailing edge.
        if len(data) > 0 {
                var buf [SizeofPtr]byte
-               err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
+               err = ptracePtr(peekReq, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
                if err != nil {
                        return n, err
                }
@@ -1696,11 +1700,11 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
 }
 
 func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
 
 func PtraceSetOptions(pid int, options int) (err error) {
@@ -1709,7 +1713,7 @@ func PtraceSetOptions(pid int, options int) (err error) {
 
 func PtraceGetEventMsg(pid int) (msg uint, err error) {
        var data _C_long
-       err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
+       err = ptracePtr(PTRACE_GETEVENTMSG, pid, 0, unsafe.Pointer(&data))
        msg = uint(data)
        return
 }
@@ -1869,7 +1873,6 @@ func Getpgrp() (pid int) {
 //sys  OpenTree(dfd int, fileName string, flags uint) (r int, err error)
 //sys  PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
 //sys  PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb        Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
 //sys  Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
 //sys  Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
 //sys  read(fd int, p []byte) (n int, err error)
@@ -1883,6 +1886,15 @@ func Getpgrp() (pid int) {
 //sysnb        Settimeofday(tv *Timeval) (err error)
 //sys  Setns(fd int, nstype int) (err error)
 
+//go:linkname syscall_prlimit syscall.prlimit
+func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error
+
+func Prlimit(pid, resource int, newlimit, old *Rlimit) error {
+       // Just call the syscall version, because as of Go 1.21
+       // it will affect starting a new process.
+       return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old))
+}
+
 // PrctlRetInt performs a prctl operation specified by option and further
 // optional arguments arg2 through arg5 depending on option. It returns a
 // non-negative integer that is returned by the prctl syscall.
@@ -2154,6 +2166,14 @@ func isGroupMember(gid int) bool {
        return false
 }
 
+func isCapDacOverrideSet() bool {
+       hdr := CapUserHeader{Version: LINUX_CAPABILITY_VERSION_3}
+       data := [2]CapUserData{}
+       err := Capget(&hdr, &data[0])
+
+       return err == nil && data[0].Effective&(1<<CAP_DAC_OVERRIDE) != 0
+}
+
 //sys  faccessat(dirfd int, path string, mode uint32) (err error)
 //sys  Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
 
@@ -2189,6 +2209,12 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
        var uid int
        if flags&AT_EACCESS != 0 {
                uid = Geteuid()
+               if uid != 0 && isCapDacOverrideSet() {
+                       // If CAP_DAC_OVERRIDE is set, file access check is
+                       // done by the kernel in the same way as for root
+                       // (see generic_permission() in the Linux sources).
+                       uid = 0
+               }
        } else {
                uid = Getuid()
        }
index ff5b5899d6db36b8ab119e47ccda833148d4cded..c7d9945ea19afcffefd5a71c2de8dcee468044d9 100644 (file)
@@ -97,33 +97,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
        return
 }
 
-//sysnb        setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       err = Prlimit(0, resource, rlim, nil)
-       if err != ENOSYS {
-               return err
-       }
-
-       rl := rlimit32{}
-       if rlim.Cur == rlimInf64 {
-               rl.Cur = rlimInf32
-       } else if rlim.Cur < uint64(rlimInf32) {
-               rl.Cur = uint32(rlim.Cur)
-       } else {
-               return EINVAL
-       }
-       if rlim.Max == rlimInf64 {
-               rl.Max = rlimInf32
-       } else if rlim.Max < uint64(rlimInf32) {
-               rl.Max = uint32(rlim.Max)
-       } else {
-               return EINVAL
-       }
-
-       return setrlimit(resource, &rl)
-}
-
 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
        newoffset, errno := seek(fd, offset, whence)
        if errno != 0 {
index 9b2703532989adf388d01447b36199c6c20f2e83..5b21fcfd75393ebe9e728d3d828f4436f7259325 100644 (file)
@@ -46,7 +46,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 
index 856ad1d635cfdbdb021012ad9ed6c0498ad42d91..da2986415ae223e18db3ec147ee3a069d822006b 100644 (file)
@@ -171,33 +171,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
        return
 }
 
-//sysnb        setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       err = Prlimit(0, resource, rlim, nil)
-       if err != ENOSYS {
-               return err
-       }
-
-       rl := rlimit32{}
-       if rlim.Cur == rlimInf64 {
-               rl.Cur = rlimInf32
-       } else if rlim.Cur < uint64(rlimInf32) {
-               rl.Cur = uint32(rlim.Cur)
-       } else {
-               return EINVAL
-       }
-       if rlim.Max == rlimInf64 {
-               rl.Max = rlimInf32
-       } else if rlim.Max < uint64(rlimInf32) {
-               rl.Max = uint32(rlim.Max)
-       } else {
-               return EINVAL
-       }
-
-       return setrlimit(resource, &rl)
-}
-
 func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
index 6422704bc52aa82308411a010a9ae7757e452d50..a81f5742b8a58ca71a7a7c44cd9cbd557394e862 100644 (file)
@@ -39,7 +39,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 
@@ -143,15 +142,6 @@ func Getrlimit(resource int, rlim *Rlimit) error {
        return getrlimit(resource, rlim)
 }
 
-// Setrlimit prefers the prlimit64 system call. See issue 38604.
-func Setrlimit(resource int, rlim *Rlimit) error {
-       err := Prlimit(0, resource, rlim, nil)
-       if err != ENOSYS {
-               return err
-       }
-       return setrlimit(resource, rlim)
-}
-
 func (r *PtraceRegs) PC() uint64 { return r.Pc }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
index 59dab510e97cab584d2f12b3809120dfa07b956a..69d2d7c3db7a414c8afc421f4fd8ed5d67fe200d 100644 (file)
@@ -126,11 +126,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
        return
 }
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       err = Prlimit(0, resource, rlim, nil)
-       return
-}
-
 func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
        if tv == nil {
                return utimensat(dirfd, path, nil, 0)
index bfef09a39eb06c97a8e280d3118c8e8e6497a8e3..76d564095ef4918e4aecc0368cc15d1530c24ebf 100644 (file)
@@ -37,7 +37,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys  Statfs(path string, buf *Statfs_t) (err error)
index ab302509663e6508d054fd730f06a0ed39106814..aae7f0ffd3fcf7165c048331919363f29feac9a5 100644 (file)
@@ -151,33 +151,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
        return
 }
 
-//sysnb        setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       err = Prlimit(0, resource, rlim, nil)
-       if err != ENOSYS {
-               return err
-       }
-
-       rl := rlimit32{}
-       if rlim.Cur == rlimInf64 {
-               rl.Cur = rlimInf32
-       } else if rlim.Cur < uint64(rlimInf32) {
-               rl.Cur = uint32(rlim.Cur)
-       } else {
-               return EINVAL
-       }
-       if rlim.Max == rlimInf64 {
-               rl.Max = rlimInf32
-       } else if rlim.Max < uint64(rlimInf32) {
-               rl.Max = uint32(rlim.Max)
-       } else {
-               return EINVAL
-       }
-
-       return setrlimit(resource, &rl)
-}
-
 func (r *PtraceRegs) PC() uint64 { return r.Epc }
 
 func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
index eac1cf1acc86c37404803145e4466a48b7b58aad..66eff19a320bdb28f7c40b24e42da6944b7a63d5 100644 (file)
@@ -159,33 +159,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
        return
 }
 
-//sysnb        setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       err = Prlimit(0, resource, rlim, nil)
-       if err != ENOSYS {
-               return err
-       }
-
-       rl := rlimit32{}
-       if rlim.Cur == rlimInf64 {
-               rl.Cur = rlimInf32
-       } else if rlim.Cur < uint64(rlimInf32) {
-               rl.Cur = uint32(rlim.Cur)
-       } else {
-               return EINVAL
-       }
-       if rlim.Max == rlimInf64 {
-               rl.Max = rlimInf32
-       } else if rlim.Max < uint64(rlimInf32) {
-               rl.Max = uint32(rlim.Max)
-       } else {
-               return EINVAL
-       }
-
-       return setrlimit(resource, &rl)
-}
-
 func (r *PtraceRegs) PC() uint32 { return r.Nip }
 
 func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
index 4df56616b8f1a65992a4525d032204db7b59533c..806aa2574d8dfaa7e7cc3358fc29e8c37530baf7 100644 (file)
@@ -34,7 +34,6 @@ package unix
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys  Stat(path string, stat *Stat_t) (err error)
index 5f4243dea2c3b70c1048ffdf474dea0f814910bb..35851ef70b8d11dc6bd3b8617b82bfe906898356 100644 (file)
@@ -38,7 +38,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 
index d0a7d4066851f345e8c90826a70fd0b177f476a9..2f89e8f5defe36a7235eb5f5847fb99fff704ad5 100644 (file)
@@ -34,7 +34,6 @@ import (
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys  Stat(path string, stat *Stat_t) (err error)
 //sys  Statfs(path string, buf *Statfs_t) (err error)
index f5c793be26d4a274d097a7d4540fdf01a47d4e66..7ca064ae76495b5f643330d65ab621a4d03e34e0 100644 (file)
@@ -31,7 +31,6 @@ package unix
 //sys  sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
 //sys  setfsgid(gid int) (prev int, err error)
 //sys  setfsuid(uid int) (prev int, err error)
-//sysnb        Setrlimit(resource int, rlim *Rlimit) (err error)
 //sys  Shutdown(fd int, how int) (err error)
 //sys  Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys  Stat(path string, stat *Stat_t) (err error)
index 35a3ad758f599a6acb2fd6be34fd54fac44410ab..018d7d47822f7ab1b81c21dc74aadcc33b55f43b 100644 (file)
@@ -13,7 +13,6 @@
 package unix
 
 import (
-       "runtime"
        "syscall"
        "unsafe"
 )
@@ -178,13 +177,13 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 }
 
 //sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 //sys  sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 
 func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
        var value Ptmget
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
-       runtime.KeepAlive(value)
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return &value, err
 }
 
@@ -341,7 +340,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
 //sys  Setpriority(which int, who int, prio int) (err error)
 //sysnb        Setregid(rgid int, egid int) (err error)
 //sysnb        Setreuid(ruid int, euid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
 //sysnb        Setuid(uid int) (err error)
@@ -502,7 +500,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
 // compat_43_osendmsg
 // compat_43_osethostid
 // compat_43_osethostname
-// compat_43_osetrlimit
 // compat_43_osigblock
 // compat_43_osigsetmask
 // compat_43_osigstack
index 9b67b908e5f949438171c4357d51dd7e719a1527..f9c7a9663c6a628a3864773d166ab1c8e7e98084 100644 (file)
@@ -152,6 +152,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 }
 
 //sys  ioctl(fd int, req uint, arg uintptr) (err error)
+//sys  ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 //sys  sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
 
@@ -293,7 +294,6 @@ func Uname(uname *Utsname) error {
 //sysnb        Setreuid(ruid int, euid int) (err error)
 //sysnb        Setresgid(rgid int, egid int, sgid int) (err error)
 //sysnb        Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setrtable(rtable int) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Settimeofday(tp *Timeval) (err error)
index 07ac56109a053fa59dbb0c4364ab72626384554b..b600a289d33863289b5fd9b4881d1e81d630ecfa 100644 (file)
@@ -408,8 +408,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
                for n < len(pp.Path) && pp.Path[n] != 0 {
                        n++
                }
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
@@ -546,22 +545,26 @@ func Minor(dev uint64) uint32 {
  * Expose the ioctl function
  */
 
-//sys  ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
+//sys  ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl
+//sys  ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
 
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
        _, err = ioctlRet(fd, req, arg)
        return err
 }
 
-func IoctlSetTermio(fd int, req uint, value *Termio) error {
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-       runtime.KeepAlive(value)
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
+       _, err = ioctlPtrRet(fd, req, arg)
        return err
 }
 
-func IoctlGetTermio(fd int, req uint) (*Termio, error) {
+func IoctlSetTermio(fd int, req int, value *Termio) error {
+       return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
+
+func IoctlGetTermio(fd int, req int) (*Termio, error) {
        var value Termio
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&value))
        return &value, err
 }
 
@@ -662,7 +665,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 //sys  Setpriority(which int, who int, prio int) (err error)
 //sysnb        Setregid(rgid int, egid int) (err error)
 //sysnb        Setreuid(ruid int, euid int) (err error)
-//sysnb        Setrlimit(which int, lim *Rlimit) (err error)
 //sysnb        Setsid() (pid int, err error)
 //sysnb        Setuid(uid int) (err error)
 //sys  Shutdown(s int, how int) (err error) = libsocket.shutdown
@@ -1077,14 +1079,14 @@ func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags
        return retCl, retData, flags, nil
 }
 
-func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
+func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) {
        return ioctlRet(fd, req, uintptr(arg))
 }
 
-func IoctlSetString(fd int, req uint, val string) error {
+func IoctlSetString(fd int, req int, val string) error {
        bs := make([]byte, len(val)+1)
        copy(bs[:len(bs)-1], val)
-       err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
+       err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
        runtime.KeepAlive(&bs[0])
        return err
 }
@@ -1117,8 +1119,8 @@ func (l *Lifreq) GetLifruUint() uint {
        return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
 }
 
-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
-       return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
+func IoctlLifreq(fd int, req int, l *Lifreq) error {
+       return ioctlPtr(fd, req, unsafe.Pointer(l))
 }
 
 // Strioctl Helpers
@@ -1128,6 +1130,6 @@ func (s *Strioctl) SetInt(i int) {
        s.Dp = (*int8)(unsafe.Pointer(&i))
 }
 
-func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
-       return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
+func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
+       return ioctlPtrRet(fd, req, unsafe.Pointer(s))
 }
index 00f0aa3758892dfc1912c7996387bc7d19eb2e84..8e48c29ec332d62395184471280dc9d7bd62a98e 100644 (file)
@@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool {
        }
        return true
 }
+
+// Setrlimit sets a resource limit.
+func Setrlimit(resource int, rlim *Rlimit) error {
+       // Just call the syscall version, because as of Go 1.21
+       // it will affect starting a new process.
+       return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim))
+}
index 68b2f3e1cd0a22190d7b9977c2275f21a1220d82..d3d49ec3ed7595624dd5c138f169557564971c44 100644 (file)
@@ -139,8 +139,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
                for n < int(pp.Len) && pp.Path[n] != 0 {
                        n++
                }
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
@@ -213,7 +212,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
 //sys  sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A
 //sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
 //sys   munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
-//sys   ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
+//sys   ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL
+//sys   ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL
 
 //sys   Access(path string, mode uint32) (err error) = SYS___ACCESS_A
 //sys   Chdir(path string) (err error) = SYS___CHDIR_A
index 476a1c7e77c52814aced93d4bf22f50bd36431d3..14300762715010602ea5fe1b85b53481ebbe4c46 100644 (file)
@@ -1270,6 +1270,16 @@ const (
        SEEK_END                                = 0x2
        SEEK_HOLE                               = 0x3
        SEEK_SET                                = 0x0
+       SF_APPEND                               = 0x40000
+       SF_ARCHIVED                             = 0x10000
+       SF_DATALESS                             = 0x40000000
+       SF_FIRMLINK                             = 0x800000
+       SF_IMMUTABLE                            = 0x20000
+       SF_NOUNLINK                             = 0x100000
+       SF_RESTRICTED                           = 0x80000
+       SF_SETTABLE                             = 0x3fff0000
+       SF_SUPPORTED                            = 0x9f0000
+       SF_SYNTHETIC                            = 0xc0000000
        SHUT_RD                                 = 0x0
        SHUT_RDWR                               = 0x2
        SHUT_WR                                 = 0x1
@@ -1543,6 +1553,15 @@ const (
        TIOCTIMESTAMP                           = 0x40107459
        TIOCUCNTL                               = 0x80047466
        TOSTOP                                  = 0x400000
+       UF_APPEND                               = 0x4
+       UF_COMPRESSED                           = 0x20
+       UF_DATAVAULT                            = 0x80
+       UF_HIDDEN                               = 0x8000
+       UF_IMMUTABLE                            = 0x2
+       UF_NODUMP                               = 0x1
+       UF_OPAQUE                               = 0x8
+       UF_SETTABLE                             = 0xffff
+       UF_TRACKED                              = 0x40
        VDISCARD                                = 0xf
        VDSUSP                                  = 0xb
        VEOF                                    = 0x0
index e36f5178d60089f88323a37a6e73d3e26593daf9..ab044a74274f013dac8157758669869dee7fa64e 100644 (file)
@@ -1270,6 +1270,16 @@ const (
        SEEK_END                                = 0x2
        SEEK_HOLE                               = 0x3
        SEEK_SET                                = 0x0
+       SF_APPEND                               = 0x40000
+       SF_ARCHIVED                             = 0x10000
+       SF_DATALESS                             = 0x40000000
+       SF_FIRMLINK                             = 0x800000
+       SF_IMMUTABLE                            = 0x20000
+       SF_NOUNLINK                             = 0x100000
+       SF_RESTRICTED                           = 0x80000
+       SF_SETTABLE                             = 0x3fff0000
+       SF_SUPPORTED                            = 0x9f0000
+       SF_SYNTHETIC                            = 0xc0000000
        SHUT_RD                                 = 0x0
        SHUT_RDWR                               = 0x2
        SHUT_WR                                 = 0x1
@@ -1543,6 +1553,15 @@ const (
        TIOCTIMESTAMP                           = 0x40107459
        TIOCUCNTL                               = 0x80047466
        TOSTOP                                  = 0x400000
+       UF_APPEND                               = 0x4
+       UF_COMPRESSED                           = 0x20
+       UF_DATAVAULT                            = 0x80
+       UF_HIDDEN                               = 0x8000
+       UF_IMMUTABLE                            = 0x2
+       UF_NODUMP                               = 0x1
+       UF_OPAQUE                               = 0x8
+       UF_SETTABLE                             = 0xffff
+       UF_TRACKED                              = 0x40
        VDISCARD                                = 0xf
        VDSUSP                                  = 0xb
        VEOF                                    = 0x0
index e174685adbd83af3dea0e14314d3fd7ecff05bae..398c37e52d6b6fc4d31f4dc3c108ba2cc25938bd 100644 (file)
@@ -70,6 +70,7 @@ const (
        ALG_SET_DRBG_ENTROPY                        = 0x6
        ALG_SET_IV                                  = 0x2
        ALG_SET_KEY                                 = 0x1
+       ALG_SET_KEY_BY_KEY_SERIAL                   = 0x7
        ALG_SET_OP                                  = 0x3
        ANON_INODE_FS_MAGIC                         = 0x9041934
        ARPHRD_6LOWPAN                              = 0x339
@@ -774,6 +775,8 @@ const (
        DEVLINK_GENL_MCGRP_CONFIG_NAME              = "config"
        DEVLINK_GENL_NAME                           = "devlink"
        DEVLINK_GENL_VERSION                        = 0x1
+       DEVLINK_PORT_FN_CAP_MIGRATABLE              = 0x2
+       DEVLINK_PORT_FN_CAP_ROCE                    = 0x1
        DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX           = 0x14
        DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS  = 0x3
        DEVMEM_MAGIC                                = 0x454d444d
@@ -1262,6 +1265,8 @@ const (
        FSCRYPT_MODE_AES_256_CTS                    = 0x4
        FSCRYPT_MODE_AES_256_HCTR2                  = 0xa
        FSCRYPT_MODE_AES_256_XTS                    = 0x1
+       FSCRYPT_MODE_SM4_CTS                        = 0x8
+       FSCRYPT_MODE_SM4_XTS                        = 0x7
        FSCRYPT_POLICY_FLAGS_PAD_16                 = 0x2
        FSCRYPT_POLICY_FLAGS_PAD_32                 = 0x3
        FSCRYPT_POLICY_FLAGS_PAD_4                  = 0x0
@@ -1280,8 +1285,6 @@ const (
        FS_ENCRYPTION_MODE_AES_256_GCM              = 0x2
        FS_ENCRYPTION_MODE_AES_256_XTS              = 0x1
        FS_ENCRYPTION_MODE_INVALID                  = 0x0
-       FS_ENCRYPTION_MODE_SPECK128_256_CTS         = 0x8
-       FS_ENCRYPTION_MODE_SPECK128_256_XTS         = 0x7
        FS_IOC_ADD_ENCRYPTION_KEY                   = 0xc0506617
        FS_IOC_GET_ENCRYPTION_KEY_STATUS            = 0xc080661a
        FS_IOC_GET_ENCRYPTION_POLICY_EX             = 0xc0096616
@@ -1770,6 +1773,7 @@ const (
        LANDLOCK_ACCESS_FS_REFER                    = 0x2000
        LANDLOCK_ACCESS_FS_REMOVE_DIR               = 0x10
        LANDLOCK_ACCESS_FS_REMOVE_FILE              = 0x20
+       LANDLOCK_ACCESS_FS_TRUNCATE                 = 0x4000
        LANDLOCK_ACCESS_FS_WRITE_FILE               = 0x2
        LANDLOCK_CREATE_RULESET_VERSION             = 0x1
        LINUX_REBOOT_CMD_CAD_OFF                    = 0x0
@@ -1809,6 +1813,7 @@ const (
        LWTUNNEL_IP_OPT_GENEVE_MAX                  = 0x3
        LWTUNNEL_IP_OPT_VXLAN_MAX                   = 0x1
        MADV_COLD                                   = 0x14
+       MADV_COLLAPSE                               = 0x19
        MADV_DODUMP                                 = 0x11
        MADV_DOFORK                                 = 0xb
        MADV_DONTDUMP                               = 0x10
@@ -2163,6 +2168,7 @@ const (
        PACKET_FANOUT_DATA                          = 0x16
        PACKET_FANOUT_EBPF                          = 0x7
        PACKET_FANOUT_FLAG_DEFRAG                   = 0x8000
+       PACKET_FANOUT_FLAG_IGNORE_OUTGOING          = 0x4000
        PACKET_FANOUT_FLAG_ROLLOVER                 = 0x1000
        PACKET_FANOUT_FLAG_UNIQUEID                 = 0x2000
        PACKET_FANOUT_HASH                          = 0x0
index bd001a6e1cc714825d2ef2f103c7f05ae078959d..97f20ca282f5b962a6e511819fa78c1fb9f13fc6 100644 (file)
@@ -15,12 +15,12 @@ type PtraceRegsArm struct {
 
 // PtraceGetRegsArm fetches the registers used by arm binaries.
 func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsArm sets the registers used by arm binaries.
 func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
 
 // PtraceRegsArm64 is the registers used by arm64 binaries.
@@ -33,10 +33,10 @@ type PtraceRegsArm64 struct {
 
 // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
 func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
 func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
index 6cb6d688aa461ebcc2bb55a4fa146715dcd68dda..834d2856dd415375cada1e855892b586a85f6c8b 100644 (file)
@@ -7,11 +7,11 @@ import "unsafe"
 // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
 func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
        iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
-       return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
+       return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
 }
 
 // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
 func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
        iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
-       return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
+       return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
 }
index c34d0639be3aa3d4c8c514830d976255e1ad802b..0b5f7943054b2538352dac6b7fdf105c4f4ed899 100644 (file)
@@ -21,12 +21,12 @@ type PtraceRegsMips struct {
 
 // PtraceGetRegsMips fetches the registers used by mips binaries.
 func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsMips sets the registers used by mips binaries.
 func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
 
 // PtraceRegsMips64 is the registers used by mips64 binaries.
@@ -42,10 +42,10 @@ type PtraceRegsMips64 struct {
 
 // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
 func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
 func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
index 3ccf0c0c4a80cad2ead3d11a4cae924f4cf6845c..2807f7e64602d2a5d2e63802eab1d54c5f92c0f3 100644 (file)
@@ -21,12 +21,12 @@ type PtraceRegsMipsle struct {
 
 // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
 func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
 func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
 
 // PtraceRegsMips64le is the registers used by mips64le binaries.
@@ -42,10 +42,10 @@ type PtraceRegsMips64le struct {
 
 // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
 func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
 func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
index 7d65857004c447cc13b0fc4c97247c81a525beb2..281ea64e34acfb0f574788413a1d2d2083484ead 100644 (file)
@@ -31,12 +31,12 @@ type PtraceRegs386 struct {
 
 // PtraceGetRegs386 fetches the registers used by 386 binaries.
 func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegs386 sets the registers used by 386 binaries.
 func PtraceSetRegs386(pid int, regs *PtraceRegs386) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
 
 // PtraceRegsAmd64 is the registers used by amd64 binaries.
@@ -72,10 +72,10 @@ type PtraceRegsAmd64 struct {
 
 // PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
 func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {
-       return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+       return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
 }
 
 // PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
 func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {
-       return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+       return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
 }
index 870215d2c479dc5dd7a7fc58afa5bb7ee4ef0177..9a257219d7067698be72a85e33b9ff2b7bbf1860 100644 (file)
@@ -124,7 +124,6 @@ int utime(uintptr_t, uintptr_t);
 unsigned long long getsystemcfg(int);
 int umount(uintptr_t);
 int getrlimit64(int, uintptr_t);
-int setrlimit64(int, uintptr_t);
 long long lseek64(int, long long, int);
 uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);
 
@@ -213,7 +212,7 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
        r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
        if r0 == -1 && er != nil {
                err = er
@@ -223,6 +222,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
+       r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg)))
+       if r0 == -1 && er != nil {
+               err = er
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
        r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
        r = int(r0)
@@ -1454,16 +1463,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
-       if r0 == -1 && er != nil {
-               err = er
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Seek(fd int, offset int64, whence int) (off int64, err error) {
        r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))
        off = int64(r0)
index a89b0bfa53cac8a84ac3feb5725b609e2158d74c..6de80c20cf2a2fa182c896b9e25e7796e100ec8b 100644 (file)
@@ -93,8 +93,18 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func ioctl(fd int, req uint, arg uintptr) (err error) {
-       _, e1 := callioctl(fd, int(req), arg)
+func ioctl(fd int, req int, arg uintptr) (err error) {
+       _, e1 := callioctl(fd, req, arg)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
+       _, e1 := callioctl_ptr(fd, req, arg)
        if e1 != 0 {
                err = errnoErr(e1)
        }
@@ -1412,16 +1422,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Seek(fd int, offset int64, whence int) (off int64, err error) {
        r0, e1 := calllseek(fd, offset, whence)
        off = int64(r0)
index 2caa5adf95099d4b3e975e0977a43a642af98ab4..c4d50ae5005c284c54c94b604aeb0b24256e335d 100644 (file)
@@ -124,7 +124,6 @@ import (
 //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o"
 
@@ -242,7 +241,6 @@ import (
 //go:linkname libc_getsystemcfg libc_getsystemcfg
 //go:linkname libc_umount libc_umount
 //go:linkname libc_getrlimit libc_getrlimit
-//go:linkname libc_setrlimit libc_setrlimit
 //go:linkname libc_lseek libc_lseek
 //go:linkname libc_mmap64 libc_mmap64
 
@@ -363,7 +361,6 @@ var (
        libc_getsystemcfg,
        libc_umount,
        libc_getrlimit,
-       libc_setrlimit,
        libc_lseek,
        libc_mmap64 syscallFunc
 )
@@ -423,6 +420,13 @@ func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {
+       r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
        r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, fd, uintptr(cmd), arg, 0, 0, 0)
        return
@@ -1172,13 +1176,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
-       r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
        r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
        return
index 944a714b1ad45191af64f2c1f14305bc5e3b49b8..6903d3b09e3da99ac77abc2e420bcb9c9f671b86 100644 (file)
@@ -123,7 +123,6 @@ int utime(uintptr_t, uintptr_t);
 unsigned long long getsystemcfg(int);
 int umount(uintptr_t);
 int getrlimit(int, uintptr_t);
-int setrlimit(int, uintptr_t);
 long long lseek(int, long long, int);
 uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
 
@@ -131,6 +130,7 @@ uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
 import "C"
 import (
        "syscall"
+       "unsafe"
 )
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -191,6 +191,14 @@ func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {
+       r1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))))
+       e1 = syscall.GetErrno()
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
        r1 = uintptr(C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)))
        e1 = syscall.GetErrno()
@@ -1047,14 +1055,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
-       r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim)))
-       e1 = syscall.GetErrno()
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
        r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence)))
        e1 = syscall.GetErrno()
index c2461c4967978b4d1563bcdf6a72fb90fef99196..4037ccf7a940e217341b2aad39a48f0febc8d080 100644 (file)
@@ -725,6 +725,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
@@ -1984,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 unsafe.Pointer
+       if len(attrBuf) > 0 {
+               _p1 = unsafe.Pointer(&attrBuf[0])
+       } else {
+               _p1 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_setattrlist_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Setegid(egid int) (err error) {
        _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
        if e1 != 0 {
@@ -2115,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
        pid = int(r0)
@@ -2502,6 +2521,14 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
        return
 }
 
+func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ptrace_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
index 95fe4c0eb962dae63c2de600d9b0dccabb9d3bcf..4baaed0bc12ca0523586f64545021c16ab3eca8a 100644 (file)
@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_select_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
 
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_setattrlist(SB)
+GLOBL  Â·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
 TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setegid(SB)
 
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setreuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setsid(SB)
 
index 26a0fdc505bb63ae8e14f03c77d4073e9bd9cc8c..51d6f3fb2568192894c20b41baaf957303dd0415 100644 (file)
@@ -725,6 +725,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
@@ -1984,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
+       var _p0 *byte
+       _p0, err = BytePtrFromString(path)
+       if err != nil {
+               return
+       }
+       var _p1 unsafe.Pointer
+       if len(attrBuf) > 0 {
+               _p1 = unsafe.Pointer(&attrBuf[0])
+       } else {
+               _p1 = unsafe.Pointer(&_zero)
+       }
+       _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+var libc_setattrlist_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Setegid(egid int) (err error) {
        _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
        if e1 != 0 {
@@ -2115,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
        pid = int(r0)
@@ -2502,6 +2521,14 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
        return
 }
 
+func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ptrace_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
index efa5b4c987c56160685c8633dd02c658ac7dceca..c3b82c03793fae93f00d31348bbf62d36a2e2881 100644 (file)
@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_select_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
 
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
+       JMP     libc_setattrlist(SB)
+GLOBL  Â·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA   Â·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
 TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setegid(SB)
 
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setreuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setsid(SB)
 
index 54749f9c5ed79e7a2fa1e88cd41040ddc43347c3..0eabac7ade213a1b1784b93f3f06c243dc581fe3 100644 (file)
@@ -436,6 +436,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -1400,16 +1410,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 77479d45815587291a7a1eb1e73b669b07a6fe48..ee313eb0073b3d12774b31318dceb31c1f23e8f5 100644 (file)
@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 2e966d4d7a6c571e5b277d246dc9cc59175032fe..4c986e448ee9d00f72a8292d83b693cecd5aa969 100644 (file)
@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index d65a7c0fa6e9a846d1873f2cc74bccc27f04ec4a..555216944a0e0d384f9c00e7c0fc37ac91763eb1 100644 (file)
@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 6f0b97c6db3a2218f5707c9c21d13913c31770dd..67a226fbf5e326bf415f65146696d17b6c945e83 100644 (file)
@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index e1c23b52723670771830be8485bf0206b4f5a92a..f0b9ddaaa262c2cc6f1bfed56653a44067a52cf3 100644 (file)
@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Access(path string, mode uint32) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 36ea3a55b72b7c439151bc9206114d78fedd9f57..da63d9d7822ff6d34e10ae1b079fe40b19602009 100644 (file)
@@ -379,6 +379,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(arg)
@@ -1336,16 +1346,6 @@ func PivotRoot(newroot string, putold string) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-       _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
        _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
        if e1 != 0 {
index c81b0ad47772dc10fa2f1d93f57a77441f3c9cd7..07b549cc25e85bf26d8c196d2a41c83be40a5c81 100644 (file)
@@ -411,16 +411,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
        var _p0 *byte
        _p0, err = BytePtrFromString(path)
index 2206bce7f4dda8910a03f40efd40725f1749019d..5f481bf83f46afaeb3e1e50c1a262f14fe46e5f2 100644 (file)
@@ -334,16 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index edf6b39f1615e663323df1791888f7a901c59d52..824cd52c7fae4f2a8b9e794cf69ff2c68bd36b19 100644 (file)
@@ -578,16 +578,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
        if e1 != 0 {
index 190609f2140d4118993865e99a2f3fa20e326926..e77aecfe98535cd53ce5cfc9fd2f45aeda62b8a7 100644 (file)
@@ -289,16 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 5f984cbb1ca74005ff95da999c051b36a4e26481..961a3afb7b71b2a068bbbe7875d4bf1455a3502d 100644 (file)
@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Alarm(seconds uint) (remaining uint, err error) {
        r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
        remaining = uint(r0)
index 46fc380a40e5472092b958d7d71af0733dbe7ab3..ed05005e91b6992b74d3dfb712c58004b367534e 100644 (file)
@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index cbd0d4dadbaddc68bc6c14750799e7fdfe00fba9..d365b718f30146e5573b9bd3d9f0b3fcc4b8699c 100644 (file)
@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 0c13d15f07cfd85954702c62f9aff48db80503eb..c3f1b8bbde01acf0d853b7f0db75d4c9c3af10fb 100644 (file)
@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Alarm(seconds uint) (remaining uint, err error) {
        r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
        remaining = uint(r0)
index e01432aed51f78ed63371b72b3d9cdaea24c17a7..a6574cf98b16ed1c0989b7bfc0bd8ddfbdc285d9 100644 (file)
@@ -624,16 +624,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
        _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
        if e1 != 0 {
index 13c7ee7baff6cd95f670dedfedbd47bb0cb198eb..f40990264f497b15ab03709a553b740c12805b55 100644 (file)
@@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 02d0c0fd61ecdd041d07316fac1be0324799adbe..9dfcc29974f471c8cc0a98a8af25ce671bd9a4bc 100644 (file)
@@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 9fee3b1d23960cf0d31fdbb796aaa4b687f03a43..0b29239583b9524b0425ef37df803461ca71cfa0 100644 (file)
@@ -269,16 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 647bbfecd6aa8315f81be254e3b55dbac703874e..6cde32237dc8e0958ae743dd2fb9f73ae10e2974 100644 (file)
@@ -319,16 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
        r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
        n = int64(r0)
index ada057f89144bbe97bca49641a4ca2dee8c93694..5253d65bf1b96689608055fdce0d7bc5e974f4eb 100644 (file)
@@ -329,16 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Shutdown(fd int, how int) (err error) {
        _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
        if e1 != 0 {
index 79f7389963ec96f57b2de09f2477e700c54dd298..cdb2af5ae0f4a01965107f3ef48fd3f0ca8c5369 100644 (file)
@@ -405,6 +405,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -1597,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index fb161f3a263645662eec469a8c45eea39c105034..9d25f76b0bfdcd6c493b72a32d21d12f192afb06 100644 (file)
@@ -405,6 +405,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -1597,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 4c8ac993a880663d1eb95148450f90e45473cace..d3f8035169f0660a37a6029f46c10cb16642fd48 100644 (file)
@@ -405,6 +405,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -1597,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index 76dd8ec4fdb93298b0317a07dcc398c78e6d321d..887188a529e289821d608e52c688521705c570b8 100644 (file)
@@ -405,6 +405,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
        var _p0 unsafe.Pointer
        if len(mib) > 0 {
@@ -1597,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
        pid = int(r0)
index caeb807bd4e8d62adeb0f6c508eec18d76a50ac6..6699a783e1f0b9f6893d4213cdd766fa2472a3e0 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index 087444250c9a47a55b784376abb8864372360542..04f0de34b2e599281f3422619b946b1f1562f522 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $4
 DATA   Â·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $4
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $4
index a05e5f4fff6d0b2a48b5cd773d19dc28643ba983..1e775fe05718c1b2238b9b28c7bb001694a639d2 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index 5782cd1084470e3a0ba2eb0cb6b6787a2d0fb19c..27b6f4df74f1ccc0c920ec5bba75500ac7dfccf3 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $8
index b2da8e50cc7a846a2beeae93ceca3cd07bb3f518..7f6427899a5bed7d2fd6f72953c607100364c28c 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index cf310420c942dd2c350d618fdfc6d59748e92cc0..b797045fd2d1d752ec8ffc0dc64d8d4031ff6863 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $4
 DATA   Â·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $4
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $4
index 048b2655e6f809a812e80685fd8f9fe8d03e619d..756ef7b1736204a761a69f1f12f56cad9a96bb9b 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index 484bb42e0a89fcf9fa1562ce4d3f155b16187501..a871266221e470113faed4cb6b04fb6e5c5e84bb 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $8
index 6f33e37e723fec598fed1c7da01132d9e50d290b..7bc2e24eb95f5f1d0109fbed44a396a2fd8f2935 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index 55af27263ad735d666a3640e76506efa232c74c4..05d4bffd791eae8ff6c6db923cf747a9e48e4fae 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $8
index 330cf7f7ac66f64478892c75aa36f113c783d507..739be6217a376b0313a34e9ff2d12785e60fa0e3 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index 4028255b0d5bb8f40d2850c34fe436a3dddb4f22..74a25f8d6438004c7956cdbd481a966ea18dd098 100644 (file)
@@ -687,12 +687,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       CALL    libc_setrlimit(SB)
-       RET
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        CALL    libc_setrtable(SB)
        RET
index 5f24de0d9d76f62d6b30156b7f3cb5205383c641..7d95a1978033c02aa2108cea26e1b483ebf4b79c 100644 (file)
@@ -527,6 +527,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
        return
 }
 
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+       _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
 var libc_ioctl_trampoline_addr uintptr
 
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
@@ -1886,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setrtable(rtable int) (err error) {
        _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
        if e1 != 0 {
index e1fbd4dfa8c879d43279c4908ec29200b0bf5026..990be2457404c2d41b764ae02c21599d543d3409 100644 (file)
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
 GLOBL  Â·libc_setresuid_trampoline_addr(SB), RODATA, $8
 DATA   Â·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
 
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
-       JMP     libc_setrlimit(SB)
-GLOBL  Â·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA   Â·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
 TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
        JMP     libc_setrtable(SB)
 GLOBL  Â·libc_setrtable_trampoline_addr(SB), RODATA, $8
index 78d4a4240e9c3bf2dc7913d761061718af5ece5c..609d1c598a899b27247e27a371dcb76ca8d0137b 100644 (file)
@@ -110,7 +110,6 @@ import (
 //go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
 //go:cgo_import_dynamic libc_setregid setregid "libc.so"
 //go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
 //go:cgo_import_dynamic libc_setsid setsid "libc.so"
 //go:cgo_import_dynamic libc_setuid setuid "libc.so"
 //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
@@ -250,7 +249,6 @@ import (
 //go:linkname procSetpriority libc_setpriority
 //go:linkname procSetregid libc_setregid
 //go:linkname procSetreuid libc_setreuid
-//go:linkname procSetrlimit libc_setrlimit
 //go:linkname procSetsid libc_setsid
 //go:linkname procSetuid libc_setuid
 //go:linkname procshutdown libc_shutdown
@@ -391,7 +389,6 @@ var (
        procSetpriority,
        procSetregid,
        procSetreuid,
-       procSetrlimit,
        procSetsid,
        procSetuid,
        procshutdown,
@@ -646,7 +643,18 @@ func __minor(version int, dev uint64) (val uint) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
+func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) {
+       r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+       ret = int(r0)
+       if e1 != 0 {
+               err = e1
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) {
        r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
        ret = int(r0)
        if e1 != 0 {
@@ -1639,16 +1647,6 @@ func Setreuid(ruid int, euid int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Setrlimit(which int, lim *Rlimit) (err error) {
-       _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
-       if e1 != 0 {
-               err = e1
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Setsid() (pid int, err error) {
        r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
        pid = int(r0)
index f2079457c6b24a9de24fbfb3e05007f83c5b91d9..c31681743c74c76c0a6458f5f6d9eff408220b65 100644 (file)
@@ -257,7 +257,17 @@ func munmap(addr uintptr, length uintptr) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
+       _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+       if e1 != 0 {
+               err = errnoErr(e1)
+       }
+       return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
        _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
        if e1 != 0 {
                err = errnoErr(e1)
index e2a64f0991a00124f18fce599ca837fd28b9c588..690cefc3d06f12409b71495e7670cc2f883fea33 100644 (file)
@@ -151,6 +151,16 @@ type Dirent struct {
        _       [3]byte
 }
 
+type Attrlist struct {
+       Bitmapcount uint16
+       Reserved    uint16
+       Commonattr  uint32
+       Volattr     uint32
+       Dirattr     uint32
+       Fileattr    uint32
+       Forkattr    uint32
+}
+
 const (
        PathMax = 0x400
 )
@@ -610,6 +620,7 @@ const (
        AT_REMOVEDIR        = 0x80
        AT_SYMLINK_FOLLOW   = 0x40
        AT_SYMLINK_NOFOLLOW = 0x20
+       AT_EACCESS          = 0x10
 )
 
 type PollFd struct {
index 34aa775219f04f9c014ca6fab2bf12ea880b401b..5bffc10eac09a00fce6e59dc6ca60fe9023ce349 100644 (file)
@@ -151,6 +151,16 @@ type Dirent struct {
        _       [3]byte
 }
 
+type Attrlist struct {
+       Bitmapcount uint16
+       Reserved    uint16
+       Commonattr  uint32
+       Volattr     uint32
+       Dirattr     uint32
+       Fileattr    uint32
+       Forkattr    uint32
+}
+
 const (
        PathMax = 0x400
 )
@@ -610,6 +620,7 @@ const (
        AT_REMOVEDIR        = 0x80
        AT_SYMLINK_FOLLOW   = 0x40
        AT_SYMLINK_NOFOLLOW = 0x20
+       AT_EACCESS          = 0x10
 )
 
 type PollFd struct {
index 7d9fc8f1c91ae7c36cea0bd77c0c3fee67a46355..ca84727cfe804a92888b02d55de324b271525253 100644 (file)
@@ -456,36 +456,60 @@ type Ucred struct {
 }
 
 type TCPInfo struct {
-       State          uint8
-       Ca_state       uint8
-       Retransmits    uint8
-       Probes         uint8
-       Backoff        uint8
-       Options        uint8
-       Rto            uint32
-       Ato            uint32
-       Snd_mss        uint32
-       Rcv_mss        uint32
-       Unacked        uint32
-       Sacked         uint32
-       Lost           uint32
-       Retrans        uint32
-       Fackets        uint32
-       Last_data_sent uint32
-       Last_ack_sent  uint32
-       Last_data_recv uint32
-       Last_ack_recv  uint32
-       Pmtu           uint32
-       Rcv_ssthresh   uint32
-       Rtt            uint32
-       Rttvar         uint32
-       Snd_ssthresh   uint32
-       Snd_cwnd       uint32
-       Advmss         uint32
-       Reordering     uint32
-       Rcv_rtt        uint32
-       Rcv_space      uint32
-       Total_retrans  uint32
+       State           uint8
+       Ca_state        uint8
+       Retransmits     uint8
+       Probes          uint8
+       Backoff         uint8
+       Options         uint8
+       Rto             uint32
+       Ato             uint32
+       Snd_mss         uint32
+       Rcv_mss         uint32
+       Unacked         uint32
+       Sacked          uint32
+       Lost            uint32
+       Retrans         uint32
+       Fackets         uint32
+       Last_data_sent  uint32
+       Last_ack_sent   uint32
+       Last_data_recv  uint32
+       Last_ack_recv   uint32
+       Pmtu            uint32
+       Rcv_ssthresh    uint32
+       Rtt             uint32
+       Rttvar          uint32
+       Snd_ssthresh    uint32
+       Snd_cwnd        uint32
+       Advmss          uint32
+       Reordering      uint32
+       Rcv_rtt         uint32
+       Rcv_space       uint32
+       Total_retrans   uint32
+       Pacing_rate     uint64
+       Max_pacing_rate uint64
+       Bytes_acked     uint64
+       Bytes_received  uint64
+       Segs_out        uint32
+       Segs_in         uint32
+       Notsent_bytes   uint32
+       Min_rtt         uint32
+       Data_segs_in    uint32
+       Data_segs_out   uint32
+       Delivery_rate   uint64
+       Busy_time       uint64
+       Rwnd_limited    uint64
+       Sndbuf_limited  uint64
+       Delivered       uint32
+       Delivered_ce    uint32
+       Bytes_sent      uint64
+       Bytes_retrans   uint64
+       Dsack_dups      uint32
+       Reord_seen      uint32
+       Rcv_ooopack     uint32
+       Snd_wnd         uint32
+       Rcv_wnd         uint32
+       Rehash          uint32
 }
 
 type CanFilter struct {
@@ -528,7 +552,7 @@ const (
        SizeofIPv6MTUInfo       = 0x20
        SizeofICMPv6Filter      = 0x20
        SizeofUcred             = 0xc
-       SizeofTCPInfo           = 0x68
+       SizeofTCPInfo           = 0xf0
        SizeofCanFilter         = 0x8
        SizeofTCPRepairOpt      = 0x8
 )
@@ -1043,6 +1067,7 @@ const (
        PerfBitCommExec                      = CBitFieldMaskBit24
        PerfBitUseClockID                    = CBitFieldMaskBit25
        PerfBitContextSwitch                 = CBitFieldMaskBit26
+       PerfBitWriteBackward                 = CBitFieldMaskBit27
 )
 
 const (
@@ -1239,7 +1264,7 @@ type TCPMD5Sig struct {
        Flags     uint8
        Prefixlen uint8
        Keylen    uint16
-       _         uint32
+       Ifindex   int32
        Key       [80]uint8
 }
 
@@ -1939,7 +1964,11 @@ const (
        NFT_MSG_GETOBJ                    = 0x13
        NFT_MSG_DELOBJ                    = 0x14
        NFT_MSG_GETOBJ_RESET              = 0x15
-       NFT_MSG_MAX                       = 0x19
+       NFT_MSG_NEWFLOWTABLE              = 0x16
+       NFT_MSG_GETFLOWTABLE              = 0x17
+       NFT_MSG_DELFLOWTABLE              = 0x18
+       NFT_MSG_GETRULE_RESET             = 0x19
+       NFT_MSG_MAX                       = 0x1a
        NFTA_LIST_UNSPEC                  = 0x0
        NFTA_LIST_ELEM                    = 0x1
        NFTA_HOOK_UNSPEC                  = 0x0
@@ -2443,9 +2472,11 @@ const (
        SOF_TIMESTAMPING_OPT_STATS    = 0x1000
        SOF_TIMESTAMPING_OPT_PKTINFO  = 0x2000
        SOF_TIMESTAMPING_OPT_TX_SWHW  = 0x4000
+       SOF_TIMESTAMPING_BIND_PHC     = 0x8000
+       SOF_TIMESTAMPING_OPT_ID_TCP   = 0x10000
 
-       SOF_TIMESTAMPING_LAST = 0x8000
-       SOF_TIMESTAMPING_MASK = 0xffff
+       SOF_TIMESTAMPING_LAST = 0x10000
+       SOF_TIMESTAMPING_MASK = 0x1ffff
 
        SCM_TSTAMP_SND   = 0x0
        SCM_TSTAMP_SCHED = 0x1
@@ -3265,7 +3296,7 @@ const (
        DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES              = 0xae
        DEVLINK_ATTR_NESTED_DEVLINK                        = 0xaf
        DEVLINK_ATTR_SELFTESTS                             = 0xb0
-       DEVLINK_ATTR_MAX                                   = 0xb0
+       DEVLINK_ATTR_MAX                                   = 0xb3
        DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE              = 0x0
        DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX           = 0x1
        DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT               = 0x0
@@ -3281,7 +3312,8 @@ const (
        DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR                 = 0x1
        DEVLINK_PORT_FN_ATTR_STATE                         = 0x2
        DEVLINK_PORT_FN_ATTR_OPSTATE                       = 0x3
-       DEVLINK_PORT_FUNCTION_ATTR_MAX                     = 0x3
+       DEVLINK_PORT_FN_ATTR_CAPS                          = 0x4
+       DEVLINK_PORT_FUNCTION_ATTR_MAX                     = 0x4
 )
 
 type FsverityDigest struct {
@@ -3572,7 +3604,8 @@ const (
        ETHTOOL_MSG_MODULE_SET                    = 0x23
        ETHTOOL_MSG_PSE_GET                       = 0x24
        ETHTOOL_MSG_PSE_SET                       = 0x25
-       ETHTOOL_MSG_USER_MAX                      = 0x25
+       ETHTOOL_MSG_RSS_GET                       = 0x26
+       ETHTOOL_MSG_USER_MAX                      = 0x26
        ETHTOOL_MSG_KERNEL_NONE                   = 0x0
        ETHTOOL_MSG_STRSET_GET_REPLY              = 0x1
        ETHTOOL_MSG_LINKINFO_GET_REPLY            = 0x2
@@ -3611,7 +3644,8 @@ const (
        ETHTOOL_MSG_MODULE_GET_REPLY              = 0x23
        ETHTOOL_MSG_MODULE_NTF                    = 0x24
        ETHTOOL_MSG_PSE_GET_REPLY                 = 0x25
-       ETHTOOL_MSG_KERNEL_MAX                    = 0x25
+       ETHTOOL_MSG_RSS_GET_REPLY                 = 0x26
+       ETHTOOL_MSG_KERNEL_MAX                    = 0x26
        ETHTOOL_A_HEADER_UNSPEC                   = 0x0
        ETHTOOL_A_HEADER_DEV_INDEX                = 0x1
        ETHTOOL_A_HEADER_DEV_NAME                 = 0x2
@@ -3679,7 +3713,8 @@ const (
        ETHTOOL_A_LINKSTATE_SQI_MAX               = 0x4
        ETHTOOL_A_LINKSTATE_EXT_STATE             = 0x5
        ETHTOOL_A_LINKSTATE_EXT_SUBSTATE          = 0x6
-       ETHTOOL_A_LINKSTATE_MAX                   = 0x6
+       ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT          = 0x7
+       ETHTOOL_A_LINKSTATE_MAX                   = 0x7
        ETHTOOL_A_DEBUG_UNSPEC                    = 0x0
        ETHTOOL_A_DEBUG_HEADER                    = 0x1
        ETHTOOL_A_DEBUG_MSGMASK                   = 0x2
@@ -4409,7 +4444,7 @@ const (
        NL80211_ATTR_MAC_HINT                                   = 0xc8
        NL80211_ATTR_MAC_MASK                                   = 0xd7
        NL80211_ATTR_MAX_AP_ASSOC_STA                           = 0xca
-       NL80211_ATTR_MAX                                        = 0x140
+       NL80211_ATTR_MAX                                        = 0x141
        NL80211_ATTR_MAX_CRIT_PROT_DURATION                     = 0xb4
        NL80211_ATTR_MAX_CSA_COUNTERS                           = 0xce
        NL80211_ATTR_MAX_MATCH_SETS                             = 0x85
@@ -4552,6 +4587,7 @@ const (
        NL80211_ATTR_SUPPORT_MESH_AUTH                          = 0x73
        NL80211_ATTR_SURVEY_INFO                                = 0x54
        NL80211_ATTR_SURVEY_RADIO_STATS                         = 0xda
+       NL80211_ATTR_TD_BITMAP                                  = 0x141
        NL80211_ATTR_TDLS_ACTION                                = 0x88
        NL80211_ATTR_TDLS_DIALOG_TOKEN                          = 0x89
        NL80211_ATTR_TDLS_EXTERNAL_SETUP                        = 0x8c
@@ -5752,3 +5788,25 @@ const (
        AUDIT_NLGRP_NONE    = 0x0
        AUDIT_NLGRP_READLOG = 0x1
 )
+
+const (
+       TUN_F_CSUM    = 0x1
+       TUN_F_TSO4    = 0x2
+       TUN_F_TSO6    = 0x4
+       TUN_F_TSO_ECN = 0x8
+       TUN_F_UFO     = 0x10
+)
+
+const (
+       VIRTIO_NET_HDR_F_NEEDS_CSUM = 0x1
+       VIRTIO_NET_HDR_F_DATA_VALID = 0x2
+       VIRTIO_NET_HDR_F_RSC_INFO   = 0x4
+)
+
+const (
+       VIRTIO_NET_HDR_GSO_NONE  = 0x0
+       VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
+       VIRTIO_NET_HDR_GSO_UDP   = 0x3
+       VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
+       VIRTIO_NET_HDR_GSO_ECN   = 0x80
+)
index 89c516a29acfd2adbfb4d3ca00984475cb179be4..4ecc1495cd0afe7ca1a1d942e2234b95861ac649 100644 (file)
@@ -414,7 +414,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [122]int8
+       Data   [122]byte
        _      uint32
 }
 
index 62b4fb269963b36dfadb75dd24299e06e974d265..34fddff964e9b2ad7f409e679b12aa27e51c09c1 100644 (file)
@@ -427,7 +427,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index e86b35893ece552e48ac050453cd119af45662d9..3b14a6031f3f5a4d01e2810f442a2ece16dd3249 100644 (file)
@@ -405,7 +405,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [122]uint8
+       Data   [122]byte
        _      uint32
 }
 
index 6c6be4c911d8f6e5e60b680652766695d2b4a5e1..0517651ab3f9da1f6686d9ca639cacc1f91eec50 100644 (file)
@@ -406,7 +406,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index 4982ea355a286340cf2f6a86e9201f878d7a2c58..3b0c5181345250ab11e2d911e4d2cf98a8480624 100644 (file)
@@ -407,7 +407,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index 173141a670324ab9fb96456c36d930fa966a16ce..fccdf4dd0f46073c8bc7c0a3e6107e7603fded84 100644 (file)
@@ -410,7 +410,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [122]int8
+       Data   [122]byte
        _      uint32
 }
 
index 93ae4c51673dc3e884bd4b029969d0062d189397..500de8fc07db43c28e2d8c823109c2ced3732231 100644 (file)
@@ -409,7 +409,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index 4e4e510ca5198ab35f68d982f0b351a85c6ebff4..d0434cd2c6dbaa7eefea2103a399d7872a4465bb 100644 (file)
@@ -409,7 +409,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index 3f5ba013d99537bd2ce4f1f53683f0ecd143220f..84206ba5347af837cfd48de491ac78d43b911dfd 100644 (file)
@@ -410,7 +410,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [122]int8
+       Data   [122]byte
        _      uint32
 }
 
index 71dfe7cdb47a4392a9049e78ba8f4eebaa3044b7..ab078cf1f51dec597470df9842c02200ff4bf496 100644 (file)
@@ -417,7 +417,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [122]uint8
+       Data   [122]byte
        _      uint32
 }
 
index 3a2b7f0a666e665d5faffd043dc762812b498fec..42eb2c4cefd6148549ec8b00bee4d6b8bfe6adfd 100644 (file)
@@ -416,7 +416,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]uint8
+       Data   [118]byte
        _      uint64
 }
 
index a52d62756328b91521c898b075650c7a150b2f74..31304a4e8bb51ba53b1d9bc9af0d2269ccefb226 100644 (file)
@@ -416,7 +416,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]uint8
+       Data   [118]byte
        _      uint64
 }
 
index dfc007d8a691257edc6b8da9e5c15106c2484374..c311f9612d8859c24700ad99902c92ee9fcc70cf 100644 (file)
@@ -434,7 +434,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]uint8
+       Data   [118]byte
        _      uint64
 }
 
index b53cb9103d3074996cd4a920c6b00536fdd404e5..bba3cefac1dd89bf44dd33ff61cd9a9af4014b0e 100644 (file)
@@ -429,7 +429,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index fe0aa3547280f8504b06c485aec6a22fe54deebb..ad8a01380461c031b8d24b8b786bc1c3efc7e1f9 100644 (file)
@@ -411,7 +411,7 @@ const (
 
 type SockaddrStorage struct {
        Family uint16
-       _      [118]int8
+       Data   [118]byte
        _      uint64
 }
 
index afe2f80670e071e2e5abd86cf8f918a13e39759d..3723b2c224c8528f9dd4c7c6eadf52a4fa8784bf 100644 (file)
@@ -1022,8 +1022,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
                for n < len(pp.Path) && pp.Path[n] != 0 {
                        n++
                }
-               bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-               sa.Name = string(bytes)
+               sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
                return sa, nil
 
        case AF_INET:
index 857acf1032d9f17db095e0ac49eb9f92ce032dae..0dbb20841178313fb85fa3489500c0d8a7ad9660 100644 (file)
@@ -2229,10 +2229,10 @@ const (
        JobObjectExtendedLimitInformation           = 9
        JobObjectGroupInformation                   = 11
        JobObjectGroupInformationEx                 = 14
-       JobObjectLimitViolationInformation2         = 35
+       JobObjectLimitViolationInformation2         = 34
        JobObjectNetRateControlInformation          = 32
        JobObjectNotificationLimitInformation       = 12
-       JobObjectNotificationLimitInformation2      = 34
+       JobObjectNotificationLimitInformation2      = 33
        JobObjectSecurityLimitInformation           = 5
 )
 
index 930f1f825db7ee703aebbfa0bbd63f17a030645e..61b06031e321d2c0d4441d8cc6b44200eec0fd77 100644 (file)
@@ -37,7 +37,7 @@ golang.org/x/mod/zip
 # golang.org/x/sync v0.1.0
 ## explicit
 golang.org/x/sync/semaphore
-# golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339
+# golang.org/x/sys v0.7.0
 ## explicit; go 1.17
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/plan9
index 81c765f950b0176721805b018788a383e3fc9742..3c6222f56937b728b7753d3e049a9e8f3e459a72 100644 (file)
@@ -4,10 +4,10 @@ go 1.21
 
 require (
        golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4
-       golang.org/x/net v0.7.0
+       golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7
 )
 
 require (
-       golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339 // indirect
-       golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b // indirect
+       golang.org/x/sys v0.7.0 // indirect
+       golang.org/x/text v0.9.0 // indirect
 )
index 33f73713173f1d91a16b4f29b61dd6d82d2ab285..0868ac0d73f24cb9cc6e7b6f88b1d730e8e34f82 100644 (file)
@@ -1,8 +1,8 @@
 golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 h1:8CmdfDrqo5/AGztF4Zk/aBNGTgL5dgcfPMmmvH1z8Lo=
 golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339 h1:qejQWXLeAs3eO3KUJ7VrThA+k04v3zo/FhGln8EizY0=
-golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b h1:/WbjM0nb7XdqglHRPb40OoA+bJr3ZR/TFeNAF139Jyw=
-golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7 h1:3Th36ggEMCIutdWQW4wH75MkjpKjK2/qO70GW+eA5Lo=
+golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
index b451cee9dc25a1dabcb30fd01b98b700cc8f4efe..8ec90cdabb5e81b635cf82ee973e2431fbbf86e2 100644 (file)
@@ -3777,13 +3777,9 @@ func (p *http2pipe) Write(d []byte) (n int, err error) {
                p.c.L = &p.mu
        }
        defer p.c.Signal()
-       if p.err != nil {
+       if p.err != nil || p.breakErr != nil {
                return 0, http2errClosedPipeWrite
        }
-       if p.breakErr != nil {
-               p.unread += len(d)
-               return len(d), nil // discard when there is no reader
-       }
        return p.b.Write(d)
 }
 
@@ -5643,15 +5639,18 @@ func (sc *http2serverConn) processData(f *http2DataFrame) error {
                }
 
                if len(data) > 0 {
+                       st.bodyBytes += int64(len(data))
                        wrote, err := st.body.Write(data)
                        if err != nil {
+                               // The handler has closed the request body.
+                               // Return the connection-level flow control for the discarded data,
+                               // but not the stream-level flow control.
                                sc.sendWindowUpdate(nil, int(f.Length)-wrote)
-                               return sc.countError("body_write_err", http2streamError(id, http2ErrCodeStreamClosed))
+                               return nil
                        }
                        if wrote != len(data) {
                                panic("internal error: bad Writer")
                        }
-                       st.bodyBytes += int64(len(data))
                }
 
                // Return any padded flow control now, since we won't
@@ -7582,10 +7581,11 @@ func (t *http2Transport) RoundTripOpt(req *Request, opt http2RoundTripOpt) (*Res
                http2traceGotConn(req, cc, reused)
                res, err := cc.RoundTrip(req)
                if err != nil && retry <= 6 {
+                       roundTripErr := err
                        if req, err = http2shouldRetryRequest(req, err); err == nil {
                                // After the first retry, do exponential backoff with 10% jitter.
                                if retry == 0 {
-                                       t.vlogf("RoundTrip retrying after failure: %v", err)
+                                       t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
                                        continue
                                }
                                backoff := float64(uint(1) << (uint(retry) - 1))
@@ -7594,7 +7594,7 @@ func (t *http2Transport) RoundTripOpt(req *Request, opt http2RoundTripOpt) (*Res
                                timer := http2backoffNewTimer(d)
                                select {
                                case <-timer.C:
-                                       t.vlogf("RoundTrip retrying after failure: %v", err)
+                                       t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
                                        continue
                                case <-req.Context().Done():
                                        timer.Stop()
@@ -9577,6 +9577,9 @@ func (b http2transportResponseBody) Close() error {
        cs := b.cs
        cc := cs.cc
 
+       cs.bufPipe.BreakWithError(http2errClosedResponseBody)
+       cs.abortStream(http2errClosedResponseBody)
+
        unread := cs.bufPipe.Len()
        if unread > 0 {
                cc.mu.Lock()
@@ -9595,9 +9598,6 @@ func (b http2transportResponseBody) Close() error {
                cc.wmu.Unlock()
        }
 
-       cs.bufPipe.BreakWithError(http2errClosedResponseBody)
-       cs.abortStream(http2errClosedResponseBody)
-
        select {
        case <-cs.donec:
        case <-cs.ctx.Done():
index e446669589905dcf71029c6774d75eab50279d76..776b03d941a405882594ca67d8cd459790061ded 100644 (file)
@@ -445,7 +445,7 @@ func (up *socksUsernamePassword) Authenticate(ctx context.Context, rw io.ReadWri
        case socksAuthMethodNotRequired:
                return nil
        case socksAuthMethodUsernamePassword:
-               if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) == 0 || len(up.Password) > 255 {
+               if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) > 255 {
                        return errors.New("invalid username/password")
                }
                b := []byte{socksauthUsernamePasswordVersion}
index 510555ac28fafe7912878cc349d9787b7fc2535e..1e350f09cb0bcdd0053c3e90a19152780b7891bf 100644 (file)
@@ -126,12 +126,6 @@ func TestableNetwork(network string) bool {
                switch runtime.GOOS {
                case "aix", "android", "fuchsia", "hurd", "darwin", "ios", "js", "nacl", "plan9", "windows", "zos":
                        return false
-               case "netbsd":
-                       // It passes on amd64 at least. 386 fails
-                       // (Issue 22927). arm is unknown.
-                       if runtime.GOARCH == "386" {
-                               return false
-                       }
                }
        }
        switch ss[0] {
index f3baa379328fe55c255bb41e2423c2961a8f9ff3..1d9d91f3ed81a8d8cb06c171e92e337d312249a6 100644 (file)
@@ -24,6 +24,21 @@ var hwCap uint
 var hwCap2 uint
 
 func readHWCAP() error {
+       // For Go 1.21+, get auxv from the Go runtime.
+       if a := getAuxv(); len(a) > 0 {
+               for len(a) >= 2 {
+                       tag, val := a[0], uint(a[1])
+                       a = a[2:]
+                       switch tag {
+                       case _AT_HWCAP:
+                               hwCap = val
+                       case _AT_HWCAP2:
+                               hwCap2 = val
+                       }
+               }
+               return nil
+       }
+
        buf, err := ioutil.ReadFile(procAuxv)
        if err != nil {
                // e.g. on android /proc/self/auxv is not accessible, so silently
diff --git a/src/vendor/golang.org/x/sys/cpu/runtime_auxv.go b/src/vendor/golang.org/x/sys/cpu/runtime_auxv.go
new file mode 100644 (file)
index 0000000..5f92ac9
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
+// on platforms that use auxv.
+var getAuxvFn func() []uintptr
+
+func getAuxv() []uintptr {
+       if getAuxvFn == nil {
+               return nil
+       }
+       return getAuxvFn()
+}
diff --git a/src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go b/src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
new file mode 100644 (file)
index 0000000..b975ea2
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.21
+// +build go1.21
+
+package cpu
+
+import (
+       _ "unsafe" // for linkname
+)
+
+//go:linkname runtime_getAuxv runtime.getAuxv
+func runtime_getAuxv() []uintptr
+
+func init() {
+       getAuxvFn = runtime_getAuxv
+}
index d555d326b1ac4db3403e3885e90f85a6eeb0a979..438c2f447be441c85bad093c362d950b362c1617 100644 (file)
@@ -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.7.0
+# golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7
 ## explicit; go 1.17
 golang.org/x/net/dns/dnsmessage
 golang.org/x/net/http/httpguts
@@ -17,10 +17,10 @@ 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.5.1-0.20230208141308-4fee21c92339
+# golang.org/x/sys v0.7.0
 ## explicit; go 1.17
 golang.org/x/sys/cpu
-# golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b
+# golang.org/x/text v0.9.0
 ## explicit; go 1.17
 golang.org/x/text/secure/bidirule
 golang.org/x/text/transform