Browse Source

upgrade to x/term instead of crypto/ssh/terminal

Simplify some of the password hashing logic. This requires a bump of irctest.
tags/v2.12.0-rc1
Shivaram Lingamneni 1 year ago
parent
commit
0d8dcbecf6
100 changed files with 720 additions and 620 deletions
  1. 13
    21
      ergo.go
  2. 3
    4
      go.mod
  3. 4
    4
      go.sum
  4. 1
    1
      irctest
  5. 0
    76
      vendor/golang.org/x/crypto/ssh/terminal/terminal.go
  6. 1
    0
      vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
  7. 11
    0
      vendor/golang.org/x/sys/cpu/endian_big.go
  8. 11
    0
      vendor/golang.org/x/sys/cpu/endian_little.go
  9. 15
    0
      vendor/golang.org/x/sys/cpu/hwcap_linux.go
  10. 16
    0
      vendor/golang.org/x/sys/cpu/runtime_auxv.go
  11. 19
    0
      vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
  12. 2
    2
      vendor/golang.org/x/sys/unix/gccgo_c.c
  13. 70
    0
      vendor/golang.org/x/sys/unix/ioctl_signed.go
  14. 8
    13
      vendor/golang.org/x/sys/unix/ioctl_unsigned.go
  15. 9
    11
      vendor/golang.org/x/sys/unix/ioctl_zos.go
  16. 2
    0
      vendor/golang.org/x/sys/unix/mkerrors.sh
  17. 6
    0
      vendor/golang.org/x/sys/unix/ptrace_darwin.go
  18. 6
    0
      vendor/golang.org/x/sys/unix/ptrace_ios.go
  19. 3
    4
      vendor/golang.org/x/sys/unix/syscall_aix.go
  20. 0
    1
      vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
  21. 0
    1
      vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
  22. 1
    2
      vendor/golang.org/x/sys/unix/syscall_bsd.go
  23. 6
    10
      vendor/golang.org/x/sys/unix/syscall_darwin.go
  24. 1
    0
      vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
  25. 1
    0
      vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
  26. 1
    1
      vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  27. 37
    7
      vendor/golang.org/x/sys/unix/syscall_freebsd.go
  28. 5
    7
      vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
  29. 5
    7
      vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
  30. 4
    6
      vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
  31. 4
    6
      vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
  32. 4
    6
      vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
  33. 8
    0
      vendor/golang.org/x/sys/unix/syscall_hurd.go
  34. 38
    11
      vendor/golang.org/x/sys/unix/syscall_linux.go
  35. 0
    27
      vendor/golang.org/x/sys/unix/syscall_linux_386.go
  36. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
  37. 0
    27
      vendor/golang.org/x/sys/unix/syscall_linux_arm.go
  38. 0
    10
      vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
  39. 0
    5
      vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
  40. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
  41. 0
    27
      vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
  42. 0
    27
      vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
  43. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
  44. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
  45. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
  46. 0
    1
      vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
  47. 2
    5
      vendor/golang.org/x/sys/unix/syscall_netbsd.go
  48. 1
    1
      vendor/golang.org/x/sys/unix/syscall_openbsd.go
  49. 19
    17
      vendor/golang.org/x/sys/unix/syscall_solaris.go
  50. 8
    1
      vendor/golang.org/x/sys/unix/syscall_unix.go
  51. 3
    3
      vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
  52. 1
    1
      vendor/golang.org/x/sys/unix/timestruct.go
  53. 7
    2
      vendor/golang.org/x/sys/unix/xattr_bsd.go
  54. 19
    0
      vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
  55. 19
    0
      vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
  56. 31
    9
      vendor/golang.org/x/sys/unix/zerrors_linux.go
  57. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_386.go
  58. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
  59. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
  60. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
  61. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
  62. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
  63. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
  64. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
  65. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
  66. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
  67. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
  68. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
  69. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
  70. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
  71. 1
    0
      vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
  72. 4
    4
      vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
  73. 2
    2
      vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go
  74. 4
    4
      vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
  75. 4
    4
      vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
  76. 4
    4
      vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
  77. 11
    12
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
  78. 12
    12
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
  79. 7
    10
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
  80. 9
    9
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
  81. 41
    14
      vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
  82. 5
    6
      vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
  83. 41
    14
      vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
  84. 5
    6
      vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
  85. 10
    10
      vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
  86. 20
    10
      vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
  87. 20
    10
      vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
  88. 20
    10
      vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
  89. 20
    10
      vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
  90. 20
    10
      vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
  91. 21
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux.go
  92. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
  93. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
  94. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
  95. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
  96. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
  97. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
  98. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
  99. 0
    10
      vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
  100. 0
    0
      vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go

+ 13
- 21
ergo.go View File

@@ -14,7 +14,7 @@ import (
14 14
 	"syscall"
15 15
 
16 16
 	"golang.org/x/crypto/bcrypt"
17
-	"golang.org/x/crypto/ssh/terminal"
17
+	"golang.org/x/term"
18 18
 
19 19
 	"github.com/docopt/docopt-go"
20 20
 	"github.com/ergochat/ergo/irc"
@@ -27,18 +27,12 @@ var commit = ""  // git hash
27 27
 var version = "" // tagged version
28 28
 
29 29
 // get a password from stdin from the user
30
-func getPassword() string {
31
-	fd := int(os.Stdin.Fd())
32
-	if terminal.IsTerminal(fd) {
33
-		bytePassword, err := terminal.ReadPassword(int(syscall.Stdin))
34
-		if err != nil {
35
-			log.Fatal("Error reading password:", err.Error())
36
-		}
37
-		return string(bytePassword)
30
+func getPasswordFromTerminal() string {
31
+	bytePassword, err := term.ReadPassword(int(syscall.Stdin))
32
+	if err != nil {
33
+		log.Fatal("Error reading password:", err.Error())
38 34
 	}
39
-	reader := bufio.NewReader(os.Stdin)
40
-	text, _ := reader.ReadString('\n')
41
-	return strings.TrimSpace(text)
35
+	return string(bytePassword)
42 36
 }
43 37
 
44 38
 func fileDoesNotExist(file string) bool {
@@ -114,19 +108,20 @@ Options:
114 108
 	// don't require a config file for genpasswd
115 109
 	if arguments["genpasswd"].(bool) {
116 110
 		var password string
117
-		fd := int(os.Stdin.Fd())
118
-		if terminal.IsTerminal(fd) {
111
+		if term.IsTerminal(int(syscall.Stdin)) {
119 112
 			fmt.Print("Enter Password: ")
120
-			password = getPassword()
113
+			password = getPasswordFromTerminal()
121 114
 			fmt.Print("\n")
122 115
 			fmt.Print("Reenter Password: ")
123
-			confirm := getPassword()
116
+			confirm := getPasswordFromTerminal()
124 117
 			fmt.Print("\n")
125 118
 			if confirm != password {
126 119
 				log.Fatal("passwords do not match")
127 120
 			}
128 121
 		} else {
129
-			password = getPassword()
122
+			reader := bufio.NewReader(os.Stdin)
123
+			text, _ := reader.ReadString('\n')
124
+			password = strings.TrimSpace(text)
130 125
 		}
131 126
 		if err := irc.ValidatePassphrase(password); err != nil {
132 127
 			log.Printf("WARNING: this password contains characters that may cause problems with your IRC client software.\n")
@@ -136,10 +131,7 @@ Options:
136 131
 		if err != nil {
137 132
 			log.Fatal("encoding error:", err.Error())
138 133
 		}
139
-		fmt.Print(string(hash))
140
-		if terminal.IsTerminal(fd) {
141
-			fmt.Println()
142
-		}
134
+		fmt.Println(string(hash))
143 135
 		return
144 136
 	} else if arguments["mkcerts"].(bool) {
145 137
 		doMkcerts(arguments["--conf"].(string), arguments["--quiet"].(bool))

+ 3
- 4
go.mod View File

@@ -11,6 +11,7 @@ require (
11 11
 	github.com/ergochat/irc-go v0.2.0
12 12
 	github.com/go-sql-driver/mysql v1.7.0
13 13
 	github.com/go-test/deep v1.0.6 // indirect
14
+	github.com/gofrs/flock v0.8.1
14 15
 	github.com/golang-jwt/jwt v3.2.2+incompatible
15 16
 	github.com/gorilla/websocket v1.4.2
16 17
 	github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
@@ -21,12 +22,11 @@ require (
21 22
 	github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208
22 23
 	github.com/xdg-go/scram v1.0.2
23 24
 	golang.org/x/crypto v0.5.0
25
+	golang.org/x/term v0.7.0
24 26
 	golang.org/x/text v0.6.0
25 27
 	gopkg.in/yaml.v2 v2.4.0
26 28
 )
27 29
 
28
-require github.com/gofrs/flock v0.8.1
29
-
30 30
 require (
31 31
 	github.com/tidwall/btree v1.4.2 // indirect
32 32
 	github.com/tidwall/gjson v1.14.3 // indirect
@@ -36,8 +36,7 @@ require (
36 36
 	github.com/tidwall/rtred v0.1.2 // indirect
37 37
 	github.com/tidwall/tinyqueue v0.1.1 // indirect
38 38
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
39
-	golang.org/x/sys v0.4.0 // indirect
40
-	golang.org/x/term v0.4.0 // indirect
39
+	golang.org/x/sys v0.7.0 // indirect
41 40
 )
42 41
 
43 42
 replace github.com/gorilla/websocket => github.com/ergochat/websocket v1.4.2-oragono1

+ 4
- 4
go.sum View File

@@ -73,10 +73,10 @@ golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
73 73
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
74 74
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
75 75
 golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
76
-golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
77
-golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
78
-golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg=
79
-golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
76
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
77
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
78
+golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
79
+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
80 80
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
81 81
 golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
82 82
 golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=

+ 1
- 1
irctest

@@ -1 +1 @@
1
-Subproject commit 6815dd238b8afd8ad73712d50d3e93cf997c26db
1
+Subproject commit 3b7f81e22c317eae885f5a942767ba4f6a30414e

+ 0
- 76
vendor/golang.org/x/crypto/ssh/terminal/terminal.go View File

@@ -1,76 +0,0 @@
1
-// Copyright 2011 The Go Authors. All rights reserved.
2
-// Use of this source code is governed by a BSD-style
3
-// license that can be found in the LICENSE file.
4
-
5
-// Package terminal provides support functions for dealing with terminals, as
6
-// commonly found on UNIX systems.
7
-//
8
-// Deprecated: this package moved to golang.org/x/term.
9
-package terminal
10
-
11
-import (
12
-	"io"
13
-
14
-	"golang.org/x/term"
15
-)
16
-
17
-// EscapeCodes contains escape sequences that can be written to the terminal in
18
-// order to achieve different styles of text.
19
-type EscapeCodes = term.EscapeCodes
20
-
21
-// Terminal contains the state for running a VT100 terminal that is capable of
22
-// reading lines of input.
23
-type Terminal = term.Terminal
24
-
25
-// NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is
26
-// a local terminal, that terminal must first have been put into raw mode.
27
-// prompt is a string that is written at the start of each input line (i.e.
28
-// "> ").
29
-func NewTerminal(c io.ReadWriter, prompt string) *Terminal {
30
-	return term.NewTerminal(c, prompt)
31
-}
32
-
33
-// ErrPasteIndicator may be returned from ReadLine as the error, in addition
34
-// to valid line data. It indicates that bracketed paste mode is enabled and
35
-// that the returned line consists only of pasted data. Programs may wish to
36
-// interpret pasted data more literally than typed data.
37
-var ErrPasteIndicator = term.ErrPasteIndicator
38
-
39
-// State contains the state of a terminal.
40
-type State = term.State
41
-
42
-// IsTerminal returns whether the given file descriptor is a terminal.
43
-func IsTerminal(fd int) bool {
44
-	return term.IsTerminal(fd)
45
-}
46
-
47
-// ReadPassword reads a line of input from a terminal without local echo.  This
48
-// is commonly used for inputting passwords and other sensitive data. The slice
49
-// returned does not include the \n.
50
-func ReadPassword(fd int) ([]byte, error) {
51
-	return term.ReadPassword(fd)
52
-}
53
-
54
-// MakeRaw puts the terminal connected to the given file descriptor into raw
55
-// mode and returns the previous state of the terminal so that it can be
56
-// restored.
57
-func MakeRaw(fd int) (*State, error) {
58
-	return term.MakeRaw(fd)
59
-}
60
-
61
-// Restore restores the terminal connected to the given file descriptor to a
62
-// previous state.
63
-func Restore(fd int, oldState *State) error {
64
-	return term.Restore(fd, oldState)
65
-}
66
-
67
-// GetState returns the current state of a terminal which may be useful to
68
-// restore the terminal after a signal.
69
-func GetState(fd int) (*State, error) {
70
-	return term.GetState(fd)
71
-}
72
-
73
-// GetSize returns the dimensions of the given terminal.
74
-func GetSize(fd int) (width, height int, err error) {
75
-	return term.GetSize(fd)
76
-}

+ 1
- 0
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build (386 || amd64 || amd64p32) && gccgo
5 6
 // +build 386 amd64 amd64p32
6 7
 // +build gccgo
7 8
 

+ 11
- 0
vendor/golang.org/x/sys/cpu/endian_big.go View File

@@ -0,0 +1,11 @@
1
+// Copyright 2023 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6
+// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
7
+
8
+package cpu
9
+
10
+// IsBigEndian records whether the GOARCH's byte order is big endian.
11
+const IsBigEndian = true

+ 11
- 0
vendor/golang.org/x/sys/cpu/endian_little.go View File

@@ -0,0 +1,11 @@
1
+// Copyright 2023 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6
+// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
7
+
8
+package cpu
9
+
10
+// IsBigEndian records whether the GOARCH's byte order is big endian.
11
+const IsBigEndian = false

+ 15
- 0
vendor/golang.org/x/sys/cpu/hwcap_linux.go View File

@@ -24,6 +24,21 @@ var hwCap uint
24 24
 var hwCap2 uint
25 25
 
26 26
 func readHWCAP() error {
27
+	// For Go 1.21+, get auxv from the Go runtime.
28
+	if a := getAuxv(); len(a) > 0 {
29
+		for len(a) >= 2 {
30
+			tag, val := a[0], uint(a[1])
31
+			a = a[2:]
32
+			switch tag {
33
+			case _AT_HWCAP:
34
+				hwCap = val
35
+			case _AT_HWCAP2:
36
+				hwCap2 = val
37
+			}
38
+		}
39
+		return nil
40
+	}
41
+
27 42
 	buf, err := ioutil.ReadFile(procAuxv)
28 43
 	if err != nil {
29 44
 		// e.g. on android /proc/self/auxv is not accessible, so silently

+ 16
- 0
vendor/golang.org/x/sys/cpu/runtime_auxv.go View File

@@ -0,0 +1,16 @@
1
+// Copyright 2023 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package cpu
6
+
7
+// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
8
+// on platforms that use auxv.
9
+var getAuxvFn func() []uintptr
10
+
11
+func getAuxv() []uintptr {
12
+	if getAuxvFn == nil {
13
+		return nil
14
+	}
15
+	return getAuxvFn()
16
+}

+ 19
- 0
vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go View File

@@ -0,0 +1,19 @@
1
+// Copyright 2023 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build go1.21
6
+// +build go1.21
7
+
8
+package cpu
9
+
10
+import (
11
+	_ "unsafe" // for linkname
12
+)
13
+
14
+//go:linkname runtime_getAuxv runtime.getAuxv
15
+func runtime_getAuxv() []uintptr
16
+
17
+func init() {
18
+	getAuxvFn = runtime_getAuxv
19
+}

+ 2
- 2
vendor/golang.org/x/sys/unix/gccgo_c.c View File

@@ -2,8 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build gccgo,!hurd
6
-// +build !aix,!hurd
5
+//go:build gccgo && !aix && !hurd
6
+// +build gccgo,!aix,!hurd
7 7
 
8 8
 #include <errno.h>
9 9
 #include <stdint.h>

+ 70
- 0
vendor/golang.org/x/sys/unix/ioctl_signed.go View File

@@ -0,0 +1,70 @@
1
+// Copyright 2018 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+//go:build aix || solaris
6
+// +build aix solaris
7
+
8
+package unix
9
+
10
+import (
11
+	"unsafe"
12
+)
13
+
14
+// ioctl itself should not be exposed directly, but additional get/set
15
+// functions for specific types are permissible.
16
+
17
+// IoctlSetInt performs an ioctl operation which sets an integer value
18
+// on fd, using the specified request number.
19
+func IoctlSetInt(fd int, req int, value int) error {
20
+	return ioctl(fd, req, uintptr(value))
21
+}
22
+
23
+// IoctlSetPointerInt performs an ioctl operation which sets an
24
+// integer value on fd, using the specified request number. The ioctl
25
+// argument is called with a pointer to the integer value, rather than
26
+// passing the integer value directly.
27
+func IoctlSetPointerInt(fd int, req int, value int) error {
28
+	v := int32(value)
29
+	return ioctlPtr(fd, req, unsafe.Pointer(&v))
30
+}
31
+
32
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
33
+//
34
+// To change fd's window size, the req argument should be TIOCSWINSZ.
35
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
36
+	// TODO: if we get the chance, remove the req parameter and
37
+	// hardcode TIOCSWINSZ.
38
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
39
+}
40
+
41
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
42
+//
43
+// The req value will usually be TCSETA or TIOCSETA.
44
+func IoctlSetTermios(fd int, req int, value *Termios) error {
45
+	// TODO: if we get the chance, remove the req parameter.
46
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
47
+}
48
+
49
+// IoctlGetInt performs an ioctl operation which gets an integer value
50
+// from fd, using the specified request number.
51
+//
52
+// A few ioctl requests use the return value as an output parameter;
53
+// for those, IoctlRetInt should be used instead of this function.
54
+func IoctlGetInt(fd int, req int) (int, error) {
55
+	var value int
56
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
57
+	return value, err
58
+}
59
+
60
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
61
+	var value Winsize
62
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
63
+	return &value, err
64
+}
65
+
66
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
67
+	var value Termios
68
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
69
+	return &value, err
70
+}

vendor/golang.org/x/sys/unix/ioctl.go → vendor/golang.org/x/sys/unix/ioctl_unsigned.go View File

@@ -2,13 +2,12 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
6
-// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
5
+//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd
6
+// +build darwin dragonfly freebsd hurd linux netbsd openbsd
7 7
 
8 8
 package unix
9 9
 
10 10
 import (
11
-	"runtime"
12 11
 	"unsafe"
13 12
 )
14 13
 
@@ -27,7 +26,7 @@ func IoctlSetInt(fd int, req uint, value int) error {
27 26
 // passing the integer value directly.
28 27
 func IoctlSetPointerInt(fd int, req uint, value int) error {
29 28
 	v := int32(value)
30
-	return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
29
+	return ioctlPtr(fd, req, unsafe.Pointer(&v))
31 30
 }
32 31
 
33 32
 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
@@ -36,9 +35,7 @@ func IoctlSetPointerInt(fd int, req uint, value int) error {
36 35
 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
37 36
 	// TODO: if we get the chance, remove the req parameter and
38 37
 	// hardcode TIOCSWINSZ.
39
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
40
-	runtime.KeepAlive(value)
41
-	return err
38
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
42 39
 }
43 40
 
44 41
 // IoctlSetTermios performs an ioctl on fd with a *Termios.
@@ -46,9 +43,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
46 43
 // The req value will usually be TCSETA or TIOCSETA.
47 44
 func IoctlSetTermios(fd int, req uint, value *Termios) error {
48 45
 	// TODO: if we get the chance, remove the req parameter.
49
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
50
-	runtime.KeepAlive(value)
51
-	return err
46
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
52 47
 }
53 48
 
54 49
 // IoctlGetInt performs an ioctl operation which gets an integer value
@@ -58,18 +53,18 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
58 53
 // for those, IoctlRetInt should be used instead of this function.
59 54
 func IoctlGetInt(fd int, req uint) (int, error) {
60 55
 	var value int
61
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
56
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
62 57
 	return value, err
63 58
 }
64 59
 
65 60
 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
66 61
 	var value Winsize
67
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
62
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
68 63
 	return &value, err
69 64
 }
70 65
 
71 66
 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
72 67
 	var value Termios
73
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
68
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
74 69
 	return &value, err
75 70
 }

+ 9
- 11
vendor/golang.org/x/sys/unix/ioctl_zos.go View File

@@ -17,25 +17,23 @@ import (
17 17
 
18 18
 // IoctlSetInt performs an ioctl operation which sets an integer value
19 19
 // on fd, using the specified request number.
20
-func IoctlSetInt(fd int, req uint, value int) error {
20
+func IoctlSetInt(fd int, req int, value int) error {
21 21
 	return ioctl(fd, req, uintptr(value))
22 22
 }
23 23
 
24 24
 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
25 25
 //
26 26
 // To change fd's window size, the req argument should be TIOCSWINSZ.
27
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
27
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
28 28
 	// TODO: if we get the chance, remove the req parameter and
29 29
 	// hardcode TIOCSWINSZ.
30
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
31
-	runtime.KeepAlive(value)
32
-	return err
30
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
33 31
 }
34 32
 
35 33
 // IoctlSetTermios performs an ioctl on fd with a *Termios.
36 34
 //
37 35
 // The req value is expected to be TCSETS, TCSETSW, or TCSETSF
38
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
36
+func IoctlSetTermios(fd int, req int, value *Termios) error {
39 37
 	if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
40 38
 		return ENOSYS
41 39
 	}
@@ -49,22 +47,22 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
49 47
 //
50 48
 // A few ioctl requests use the return value as an output parameter;
51 49
 // for those, IoctlRetInt should be used instead of this function.
52
-func IoctlGetInt(fd int, req uint) (int, error) {
50
+func IoctlGetInt(fd int, req int) (int, error) {
53 51
 	var value int
54
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
52
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
55 53
 	return value, err
56 54
 }
57 55
 
58
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
56
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
59 57
 	var value Winsize
60
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
58
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
61 59
 	return &value, err
62 60
 }
63 61
 
64 62
 // IoctlGetTermios performs an ioctl on fd with a *Termios.
65 63
 //
66 64
 // The req value is expected to be TCGETS
67
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
65
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
68 66
 	var value Termios
69 67
 	if req != TCGETS {
70 68
 		return &value, ENOSYS

+ 2
- 0
vendor/golang.org/x/sys/unix/mkerrors.sh View File

@@ -66,6 +66,7 @@ includes_Darwin='
66 66
 #include <sys/ptrace.h>
67 67
 #include <sys/select.h>
68 68
 #include <sys/socket.h>
69
+#include <sys/stat.h>
69 70
 #include <sys/un.h>
70 71
 #include <sys/sockio.h>
71 72
 #include <sys/sys_domain.h>
@@ -521,6 +522,7 @@ ccflags="$@"
521 522
 		$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
522 523
 		$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
523 524
 		$2 ~ /^RAW_PAYLOAD_/ ||
525
+		$2 ~ /^[US]F_/ ||
524 526
 		$2 ~ /^TP_STATUS_/ ||
525 527
 		$2 ~ /^FALLOC_/ ||
526 528
 		$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||

+ 6
- 0
vendor/golang.org/x/sys/unix/ptrace_darwin.go View File

@@ -7,6 +7,12 @@
7 7
 
8 8
 package unix
9 9
 
10
+import "unsafe"
11
+
10 12
 func ptrace(request int, pid int, addr uintptr, data uintptr) error {
11 13
 	return ptrace1(request, pid, addr, data)
12 14
 }
15
+
16
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
17
+	return ptrace1Ptr(request, pid, addr, data)
18
+}

+ 6
- 0
vendor/golang.org/x/sys/unix/ptrace_ios.go View File

@@ -7,6 +7,12 @@
7 7
 
8 8
 package unix
9 9
 
10
+import "unsafe"
11
+
10 12
 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
11 13
 	return ENOTSUP
12 14
 }
15
+
16
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
17
+	return ENOTSUP
18
+}

+ 3
- 4
vendor/golang.org/x/sys/unix/syscall_aix.go View File

@@ -292,9 +292,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
292 292
 				break
293 293
 			}
294 294
 		}
295
-
296
-		bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
297
-		sa.Name = string(bytes)
295
+		sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
298 296
 		return sa, nil
299 297
 
300 298
 	case AF_INET:
@@ -410,7 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
410 408
 
411 409
 func (w WaitStatus) TrapCause() int { return -1 }
412 410
 
413
-//sys	ioctl(fd int, req uint, arg uintptr) (err error)
411
+//sys	ioctl(fd int, req int, arg uintptr) (err error)
412
+//sys	ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl
414 413
 
415 414
 // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
416 415
 // There is no way to create a custom fcntl and to keep //sys fcntl easily,

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_aix_ppc.go View File

@@ -8,7 +8,6 @@
8 8
 package unix
9 9
 
10 10
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
11
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
12 11
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
13 12
 
14 13
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go View File

@@ -8,7 +8,6 @@
8 8
 package unix
9 9
 
10 10
 //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
11
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
12 11
 //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
13 12
 
14 13
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64

+ 1
- 2
vendor/golang.org/x/sys/unix/syscall_bsd.go View File

@@ -245,8 +245,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
245 245
 				break
246 246
 			}
247 247
 		}
248
-		bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
249
-		sa.Name = string(bytes)
248
+		sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
250 249
 		return sa, nil
251 250
 
252 251
 	case AF_INET:

+ 6
- 10
vendor/golang.org/x/sys/unix/syscall_darwin.go View File

@@ -14,7 +14,6 @@ package unix
14 14
 
15 15
 import (
16 16
 	"fmt"
17
-	"runtime"
18 17
 	"syscall"
19 18
 	"unsafe"
20 19
 )
@@ -230,6 +229,7 @@ func direntNamlen(buf []byte) (uint64, bool) {
230 229
 
231 230
 func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
232 231
 func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
232
+func PtraceDenyAttach() (err error)    { return ptrace(PT_DENY_ATTACH, 0, 0, 0) }
233 233
 
234 234
 //sysnb	pipe(p *[2]int32) (err error)
235 235
 
@@ -375,11 +375,10 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
375 375
 func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
376 376
 
377 377
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
378
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
378 379
 
379 380
 func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {
380
-	err := ioctl(fd, CTLIOCGINFO, uintptr(unsafe.Pointer(ctlInfo)))
381
-	runtime.KeepAlive(ctlInfo)
382
-	return err
381
+	return ioctlPtr(fd, CTLIOCGINFO, unsafe.Pointer(ctlInfo))
383 382
 }
384 383
 
385 384
 // IfreqMTU is struct ifreq used to get or set a network device's MTU.
@@ -393,16 +392,14 @@ type IfreqMTU struct {
393 392
 func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {
394 393
 	var ifreq IfreqMTU
395 394
 	copy(ifreq.Name[:], ifname)
396
-	err := ioctl(fd, SIOCGIFMTU, uintptr(unsafe.Pointer(&ifreq)))
395
+	err := ioctlPtr(fd, SIOCGIFMTU, unsafe.Pointer(&ifreq))
397 396
 	return &ifreq, err
398 397
 }
399 398
 
400 399
 // IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU
401 400
 // of the network device specified by ifreq.Name.
402 401
 func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
403
-	err := ioctl(fd, SIOCSIFMTU, uintptr(unsafe.Pointer(ifreq)))
404
-	runtime.KeepAlive(ifreq)
405
-	return err
402
+	return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
406 403
 }
407 404
 
408 405
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
@@ -616,6 +613,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
616 613
 //sys	Rmdir(path string) (err error)
617 614
 //sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
618 615
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
616
+//sys	Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error)
619 617
 //sys	Setegid(egid int) (err error)
620 618
 //sysnb	Seteuid(euid int) (err error)
621 619
 //sysnb	Setgid(gid int) (err error)
@@ -625,7 +623,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
625 623
 //sys	Setprivexec(flag int) (err error)
626 624
 //sysnb	Setregid(rgid int, egid int) (err error)
627 625
 //sysnb	Setreuid(ruid int, euid int) (err error)
628
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
629 626
 //sysnb	Setsid() (pid int, err error)
630 627
 //sysnb	Settimeofday(tp *Timeval) (err error)
631 628
 //sysnb	Setuid(uid int) (err error)
@@ -679,7 +676,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
679 676
 // Kqueue_from_portset_np
680 677
 // Kqueue_portset
681 678
 // Getattrlist
682
-// Setattrlist
683 679
 // Getdirentriesattr
684 680
 // Searchfs
685 681
 // Delete

+ 1
- 0
vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go View File

@@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
47 47
 //sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
48 48
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
49 49
 //sys	ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
50
+//sys	ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
50 51
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
51 52
 //sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64

+ 1
- 0
vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go View File

@@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
47 47
 //sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
48 48
 //sys	Lstat(path string, stat *Stat_t) (err error)
49 49
 //sys	ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
50
+//sys	ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
50 51
 //sys	Stat(path string, stat *Stat_t) (err error)
51 52
 //sys	Statfs(path string, stat *Statfs_t) (err error)

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_dragonfly.go View File

@@ -172,6 +172,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
172 172
 }
173 173
 
174 174
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
175
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
175 176
 
176 177
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
177 178
 
@@ -325,7 +326,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
325 326
 //sysnb	Setreuid(ruid int, euid int) (err error)
326 327
 //sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
327 328
 //sysnb	Setresuid(ruid int, euid int, suid int) (err error)
328
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
329 329
 //sysnb	Setsid() (pid int, err error)
330 330
 //sysnb	Settimeofday(tp *Timeval) (err error)
331 331
 //sysnb	Setuid(uid int) (err error)

+ 37
- 7
vendor/golang.org/x/sys/unix/syscall_freebsd.go View File

@@ -161,7 +161,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
161 161
 	return
162 162
 }
163 163
 
164
-//sys	ioctl(fd int, req uint, arg uintptr) (err error)
164
+//sys	ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
165
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
165 166
 
166 167
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
167 168
 
@@ -253,6 +254,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
253 254
 }
254 255
 
255 256
 //sys	ptrace(request int, pid int, addr uintptr, data int) (err error)
257
+//sys	ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) = SYS_PTRACE
256 258
 
257 259
 func PtraceAttach(pid int) (err error) {
258 260
 	return ptrace(PT_ATTACH, pid, 0, 0)
@@ -267,19 +269,36 @@ func PtraceDetach(pid int) (err error) {
267 269
 }
268 270
 
269 271
 func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
270
-	return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
272
+	return ptracePtr(PT_GETFPREGS, pid, unsafe.Pointer(fpregsout), 0)
271 273
 }
272 274
 
273 275
 func PtraceGetRegs(pid int, regsout *Reg) (err error) {
274
-	return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
276
+	return ptracePtr(PT_GETREGS, pid, unsafe.Pointer(regsout), 0)
277
+}
278
+
279
+func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {
280
+	ioDesc := PtraceIoDesc{
281
+		Op:   int32(req),
282
+		Offs: offs,
283
+	}
284
+	if countin > 0 {
285
+		_ = out[:countin] // check bounds
286
+		ioDesc.Addr = &out[0]
287
+	} else if out != nil {
288
+		ioDesc.Addr = (*byte)(unsafe.Pointer(&_zero))
289
+	}
290
+	ioDesc.SetLen(countin)
291
+
292
+	err = ptracePtr(PT_IO, pid, unsafe.Pointer(&ioDesc), 0)
293
+	return int(ioDesc.Len), err
275 294
 }
276 295
 
277 296
 func PtraceLwpEvents(pid int, enable int) (err error) {
278 297
 	return ptrace(PT_LWP_EVENTS, pid, 0, enable)
279 298
 }
280 299
 
281
-func PtraceLwpInfo(pid int, info uintptr) (err error) {
282
-	return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
300
+func PtraceLwpInfo(pid int, info *PtraceLwpInfoStruct) (err error) {
301
+	return ptracePtr(PT_LWPINFO, pid, unsafe.Pointer(info), int(unsafe.Sizeof(*info)))
283 302
 }
284 303
 
285 304
 func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
@@ -299,13 +318,25 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
299 318
 }
300 319
 
301 320
 func PtraceSetRegs(pid int, regs *Reg) (err error) {
302
-	return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
321
+	return ptracePtr(PT_SETREGS, pid, unsafe.Pointer(regs), 0)
303 322
 }
304 323
 
305 324
 func PtraceSingleStep(pid int) (err error) {
306 325
 	return ptrace(PT_STEP, pid, 1, 0)
307 326
 }
308 327
 
328
+func Dup3(oldfd, newfd, flags int) error {
329
+	if oldfd == newfd || flags&^O_CLOEXEC != 0 {
330
+		return EINVAL
331
+	}
332
+	how := F_DUP2FD
333
+	if flags&O_CLOEXEC != 0 {
334
+		how = F_DUP2FD_CLOEXEC
335
+	}
336
+	_, err := fcntl(oldfd, how, newfd)
337
+	return err
338
+}
339
+
309 340
 /*
310 341
  * Exposed directly
311 342
  */
@@ -402,7 +433,6 @@ func PtraceSingleStep(pid int) (err error) {
402 433
 //sysnb	Setreuid(ruid int, euid int) (err error)
403 434
 //sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
404 435
 //sysnb	Setresuid(ruid int, euid int, suid int) (err error)
405
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
406 436
 //sysnb	Setsid() (pid int, err error)
407 437
 //sysnb	Settimeofday(tp *Timeval) (err error)
408 438
 //sysnb	Setuid(uid int) (err error)

+ 5
- 7
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go View File

@@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
42 42
 	cmsg.Len = uint32(length)
43 43
 }
44 44
 
45
+func (d *PtraceIoDesc) SetLen(length int) {
46
+	d.Len = uint32(length)
47
+}
48
+
45 49
 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46 50
 	var writtenOut uint64 = 0
47 51
 	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
@@ -57,11 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
57 61
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58 62
 
59 63
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
60
-	return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
61
-}
62
-
63
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
64
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
65
-	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
66
-	return int(ioDesc.Len), err
64
+	return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)
67 65
 }

+ 5
- 7
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go View File

@@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
42 42
 	cmsg.Len = uint32(length)
43 43
 }
44 44
 
45
+func (d *PtraceIoDesc) SetLen(length int) {
46
+	d.Len = uint64(length)
47
+}
48
+
45 49
 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46 50
 	var writtenOut uint64 = 0
47 51
 	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
@@ -57,11 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
57 61
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58 62
 
59 63
 func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
60
-	return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
61
-}
62
-
63
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
64
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
65
-	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
66
-	return int(ioDesc.Len), err
64
+	return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)
67 65
 }

+ 4
- 6
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go View File

@@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
42 42
 	cmsg.Len = uint32(length)
43 43
 }
44 44
 
45
+func (d *PtraceIoDesc) SetLen(length int) {
46
+	d.Len = uint32(length)
47
+}
48
+
45 49
 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46 50
 	var writtenOut uint64 = 0
47 51
 	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
@@ -55,9 +59,3 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
55 59
 }
56 60
 
57 61
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58
-
59
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
61
-	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62
-	return int(ioDesc.Len), err
63
-}

+ 4
- 6
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go View File

@@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
42 42
 	cmsg.Len = uint32(length)
43 43
 }
44 44
 
45
+func (d *PtraceIoDesc) SetLen(length int) {
46
+	d.Len = uint64(length)
47
+}
48
+
45 49
 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46 50
 	var writtenOut uint64 = 0
47 51
 	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
@@ -55,9 +59,3 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
55 59
 }
56 60
 
57 61
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58
-
59
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
61
-	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62
-	return int(ioDesc.Len), err
63
-}

+ 4
- 6
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go View File

@@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
42 42
 	cmsg.Len = uint32(length)
43 43
 }
44 44
 
45
+func (d *PtraceIoDesc) SetLen(length int) {
46
+	d.Len = uint64(length)
47
+}
48
+
45 49
 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
46 50
 	var writtenOut uint64 = 0
47 51
 	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
@@ -55,9 +59,3 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
55 59
 }
56 60
 
57 61
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
58
-
59
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
60
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
61
-	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
62
-	return int(ioDesc.Len), err
63
-}

+ 8
- 0
vendor/golang.org/x/sys/unix/syscall_hurd.go View File

@@ -20,3 +20,11 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
20 20
 	}
21 21
 	return
22 22
 }
23
+
24
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
25
+	r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
26
+	if r0 == -1 && er != nil {
27
+		err = er
28
+	}
29
+	return
30
+}

+ 38
- 11
vendor/golang.org/x/sys/unix/syscall_linux.go View File

@@ -1015,8 +1015,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
1015 1015
 		for n < len(pp.Path) && pp.Path[n] != 0 {
1016 1016
 			n++
1017 1017
 		}
1018
-		bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
1019
-		sa.Name = string(bytes)
1018
+		sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
1020 1019
 		return sa, nil
1021 1020
 
1022 1021
 	case AF_INET:
@@ -1365,6 +1364,10 @@ func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
1365 1364
 	return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
1366 1365
 }
1367 1366
 
1367
+func SetsockoptTCPMD5Sig(fd, level, opt int, s *TCPMD5Sig) error {
1368
+	return setsockopt(fd, level, opt, unsafe.Pointer(s), unsafe.Sizeof(*s))
1369
+}
1370
+
1368 1371
 // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
1369 1372
 
1370 1373
 // KeyctlInt calls keyctl commands in which each argument is an int.
@@ -1579,6 +1582,7 @@ func BindToDevice(fd int, device string) (err error) {
1579 1582
 }
1580 1583
 
1581 1584
 //sys	ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
1585
+//sys	ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) = SYS_PTRACE
1582 1586
 
1583 1587
 func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
1584 1588
 	// 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
1596 1600
 	// boundary.
1597 1601
 	n := 0
1598 1602
 	if addr%SizeofPtr != 0 {
1599
-		err = ptrace(req, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
1603
+		err = ptracePtr(req, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
1600 1604
 		if err != nil {
1601 1605
 			return 0, err
1602 1606
 		}
@@ -1608,7 +1612,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
1608 1612
 	for len(out) > 0 {
1609 1613
 		// We use an internal buffer to guarantee alignment.
1610 1614
 		// It's not documented if this is necessary, but we're paranoid.
1611
-		err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
1615
+		err = ptracePtr(req, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
1612 1616
 		if err != nil {
1613 1617
 			return n, err
1614 1618
 		}
@@ -1640,7 +1644,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
1640 1644
 	n := 0
1641 1645
 	if addr%SizeofPtr != 0 {
1642 1646
 		var buf [SizeofPtr]byte
1643
-		err = ptrace(peekReq, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
1647
+		err = ptracePtr(peekReq, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
1644 1648
 		if err != nil {
1645 1649
 			return 0, err
1646 1650
 		}
@@ -1667,7 +1671,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
1667 1671
 	// Trailing edge.
1668 1672
 	if len(data) > 0 {
1669 1673
 		var buf [SizeofPtr]byte
1670
-		err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
1674
+		err = ptracePtr(peekReq, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
1671 1675
 		if err != nil {
1672 1676
 			return n, err
1673 1677
 		}
@@ -1696,11 +1700,11 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
1696 1700
 }
1697 1701
 
1698 1702
 func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
1699
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
1703
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
1700 1704
 }
1701 1705
 
1702 1706
 func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
1703
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
1707
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
1704 1708
 }
1705 1709
 
1706 1710
 func PtraceSetOptions(pid int, options int) (err error) {
@@ -1709,7 +1713,7 @@ func PtraceSetOptions(pid int, options int) (err error) {
1709 1713
 
1710 1714
 func PtraceGetEventMsg(pid int) (msg uint, err error) {
1711 1715
 	var data _C_long
1712
-	err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
1716
+	err = ptracePtr(PTRACE_GETEVENTMSG, pid, 0, unsafe.Pointer(&data))
1713 1717
 	msg = uint(data)
1714 1718
 	return
1715 1719
 }
@@ -1800,6 +1804,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
1800 1804
 //sysnb	Capset(hdr *CapUserHeader, data *CapUserData) (err error)
1801 1805
 //sys	Chdir(path string) (err error)
1802 1806
 //sys	Chroot(path string) (err error)
1807
+//sys	ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
1803 1808
 //sys	ClockGetres(clockid int32, res *Timespec) (err error)
1804 1809
 //sys	ClockGettime(clockid int32, time *Timespec) (err error)
1805 1810
 //sys	ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
@@ -1868,7 +1873,6 @@ func Getpgrp() (pid int) {
1868 1873
 //sys	OpenTree(dfd int, fileName string, flags uint) (r int, err error)
1869 1874
 //sys	PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
1870 1875
 //sys	PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
1871
-//sysnb	Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
1872 1876
 //sys	Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
1873 1877
 //sys	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
1874 1878
 //sys	read(fd int, p []byte) (n int, err error)
@@ -1882,6 +1886,15 @@ func Getpgrp() (pid int) {
1882 1886
 //sysnb	Settimeofday(tv *Timeval) (err error)
1883 1887
 //sys	Setns(fd int, nstype int) (err error)
1884 1888
 
1889
+//go:linkname syscall_prlimit syscall.prlimit
1890
+func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error
1891
+
1892
+func Prlimit(pid, resource int, newlimit, old *Rlimit) error {
1893
+	// Just call the syscall version, because as of Go 1.21
1894
+	// it will affect starting a new process.
1895
+	return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old))
1896
+}
1897
+
1885 1898
 // PrctlRetInt performs a prctl operation specified by option and further
1886 1899
 // optional arguments arg2 through arg5 depending on option. It returns a
1887 1900
 // non-negative integer that is returned by the prctl syscall.
@@ -1999,7 +2012,7 @@ func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
1999 2012
 // offs2lohi splits offs into its low and high order bits.
2000 2013
 func offs2lohi(offs int64) (lo, hi uintptr) {
2001 2014
 	const longBits = SizeofLong * 8
2002
-	return uintptr(offs), uintptr(uint64(offs) >> longBits)
2015
+	return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet
2003 2016
 }
2004 2017
 
2005 2018
 func Readv(fd int, iovs [][]byte) (n int, err error) {
@@ -2153,6 +2166,14 @@ func isGroupMember(gid int) bool {
2153 2166
 	return false
2154 2167
 }
2155 2168
 
2169
+func isCapDacOverrideSet() bool {
2170
+	hdr := CapUserHeader{Version: LINUX_CAPABILITY_VERSION_3}
2171
+	data := [2]CapUserData{}
2172
+	err := Capget(&hdr, &data[0])
2173
+
2174
+	return err == nil && data[0].Effective&(1<<CAP_DAC_OVERRIDE) != 0
2175
+}
2176
+
2156 2177
 //sys	faccessat(dirfd int, path string, mode uint32) (err error)
2157 2178
 //sys	Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
2158 2179
 
@@ -2188,6 +2209,12 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
2188 2209
 	var uid int
2189 2210
 	if flags&AT_EACCESS != 0 {
2190 2211
 		uid = Geteuid()
2212
+		if uid != 0 && isCapDacOverrideSet() {
2213
+			// If CAP_DAC_OVERRIDE is set, file access check is
2214
+			// done by the kernel in the same way as for root
2215
+			// (see generic_permission() in the Linux sources).
2216
+			uid = 0
2217
+		}
2191 2218
 	} else {
2192 2219
 		uid = Getuid()
2193 2220
 	}

+ 0
- 27
vendor/golang.org/x/sys/unix/syscall_linux_386.go View File

@@ -97,33 +97,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
97 97
 	return
98 98
 }
99 99
 
100
-//sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
101
-
102
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
103
-	err = Prlimit(0, resource, rlim, nil)
104
-	if err != ENOSYS {
105
-		return err
106
-	}
107
-
108
-	rl := rlimit32{}
109
-	if rlim.Cur == rlimInf64 {
110
-		rl.Cur = rlimInf32
111
-	} else if rlim.Cur < uint64(rlimInf32) {
112
-		rl.Cur = uint32(rlim.Cur)
113
-	} else {
114
-		return EINVAL
115
-	}
116
-	if rlim.Max == rlimInf64 {
117
-		rl.Max = rlimInf32
118
-	} else if rlim.Max < uint64(rlimInf32) {
119
-		rl.Max = uint32(rlim.Max)
120
-	} else {
121
-		return EINVAL
122
-	}
123
-
124
-	return setrlimit(resource, &rl)
125
-}
126
-
127 100
 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
128 101
 	newoffset, errno := seek(fd, offset, whence)
129 102
 	if errno != 0 {

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go View File

@@ -46,7 +46,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
46 46
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
47 47
 //sys	setfsgid(gid int) (prev int, err error)
48 48
 //sys	setfsuid(uid int) (prev int, err error)
49
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
50 49
 //sys	Shutdown(fd int, how int) (err error)
51 50
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
52 51
 

+ 0
- 27
vendor/golang.org/x/sys/unix/syscall_linux_arm.go View File

@@ -171,33 +171,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
171 171
 	return
172 172
 }
173 173
 
174
-//sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
175
-
176
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
177
-	err = Prlimit(0, resource, rlim, nil)
178
-	if err != ENOSYS {
179
-		return err
180
-	}
181
-
182
-	rl := rlimit32{}
183
-	if rlim.Cur == rlimInf64 {
184
-		rl.Cur = rlimInf32
185
-	} else if rlim.Cur < uint64(rlimInf32) {
186
-		rl.Cur = uint32(rlim.Cur)
187
-	} else {
188
-		return EINVAL
189
-	}
190
-	if rlim.Max == rlimInf64 {
191
-		rl.Max = rlimInf32
192
-	} else if rlim.Max < uint64(rlimInf32) {
193
-		rl.Max = uint32(rlim.Max)
194
-	} else {
195
-		return EINVAL
196
-	}
197
-
198
-	return setrlimit(resource, &rl)
199
-}
200
-
201 174
 func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
202 175
 
203 176
 func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }

+ 0
- 10
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go View File

@@ -39,7 +39,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
39 39
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
40 40
 //sys	setfsgid(gid int) (prev int, err error)
41 41
 //sys	setfsuid(uid int) (prev int, err error)
42
-//sysnb	setrlimit(resource int, rlim *Rlimit) (err error)
43 42
 //sys	Shutdown(fd int, how int) (err error)
44 43
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
45 44
 
@@ -143,15 +142,6 @@ func Getrlimit(resource int, rlim *Rlimit) error {
143 142
 	return getrlimit(resource, rlim)
144 143
 }
145 144
 
146
-// Setrlimit prefers the prlimit64 system call. See issue 38604.
147
-func Setrlimit(resource int, rlim *Rlimit) error {
148
-	err := Prlimit(0, resource, rlim, nil)
149
-	if err != ENOSYS {
150
-		return err
151
-	}
152
-	return setrlimit(resource, rlim)
153
-}
154
-
155 145
 func (r *PtraceRegs) PC() uint64 { return r.Pc }
156 146
 
157 147
 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }

+ 0
- 5
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go View File

@@ -126,11 +126,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
126 126
 	return
127 127
 }
128 128
 
129
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
130
-	err = Prlimit(0, resource, rlim, nil)
131
-	return
132
-}
133
-
134 129
 func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
135 130
 	if tv == nil {
136 131
 		return utimensat(dirfd, path, nil, 0)

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go View File

@@ -37,7 +37,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
37 37
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
38 38
 //sys	setfsgid(gid int) (prev int, err error)
39 39
 //sys	setfsuid(uid int) (prev int, err error)
40
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
41 40
 //sys	Shutdown(fd int, how int) (err error)
42 41
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
43 42
 //sys	Statfs(path string, buf *Statfs_t) (err error)

+ 0
- 27
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go View File

@@ -151,33 +151,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
151 151
 	return
152 152
 }
153 153
 
154
-//sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
155
-
156
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
157
-	err = Prlimit(0, resource, rlim, nil)
158
-	if err != ENOSYS {
159
-		return err
160
-	}
161
-
162
-	rl := rlimit32{}
163
-	if rlim.Cur == rlimInf64 {
164
-		rl.Cur = rlimInf32
165
-	} else if rlim.Cur < uint64(rlimInf32) {
166
-		rl.Cur = uint32(rlim.Cur)
167
-	} else {
168
-		return EINVAL
169
-	}
170
-	if rlim.Max == rlimInf64 {
171
-		rl.Max = rlimInf32
172
-	} else if rlim.Max < uint64(rlimInf32) {
173
-		rl.Max = uint32(rlim.Max)
174
-	} else {
175
-		return EINVAL
176
-	}
177
-
178
-	return setrlimit(resource, &rl)
179
-}
180
-
181 154
 func (r *PtraceRegs) PC() uint64 { return r.Epc }
182 155
 
183 156
 func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }

+ 0
- 27
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go View File

@@ -159,33 +159,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
159 159
 	return
160 160
 }
161 161
 
162
-//sysnb	setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
163
-
164
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
165
-	err = Prlimit(0, resource, rlim, nil)
166
-	if err != ENOSYS {
167
-		return err
168
-	}
169
-
170
-	rl := rlimit32{}
171
-	if rlim.Cur == rlimInf64 {
172
-		rl.Cur = rlimInf32
173
-	} else if rlim.Cur < uint64(rlimInf32) {
174
-		rl.Cur = uint32(rlim.Cur)
175
-	} else {
176
-		return EINVAL
177
-	}
178
-	if rlim.Max == rlimInf64 {
179
-		rl.Max = rlimInf32
180
-	} else if rlim.Max < uint64(rlimInf32) {
181
-		rl.Max = uint32(rlim.Max)
182
-	} else {
183
-		return EINVAL
184
-	}
185
-
186
-	return setrlimit(resource, &rl)
187
-}
188
-
189 162
 func (r *PtraceRegs) PC() uint32 { return r.Nip }
190 163
 
191 164
 func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go View File

@@ -34,7 +34,6 @@ package unix
34 34
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
35 35
 //sys	setfsgid(gid int) (prev int, err error)
36 36
 //sys	setfsuid(uid int) (prev int, err error)
37
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
38 37
 //sys	Shutdown(fd int, how int) (err error)
39 38
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
40 39
 //sys	Stat(path string, stat *Stat_t) (err error)

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go View File

@@ -38,7 +38,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
38 38
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
39 39
 //sys	setfsgid(gid int) (prev int, err error)
40 40
 //sys	setfsuid(uid int) (prev int, err error)
41
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
42 41
 //sys	Shutdown(fd int, how int) (err error)
43 42
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
44 43
 

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go View File

@@ -34,7 +34,6 @@ import (
34 34
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
35 35
 //sys	setfsgid(gid int) (prev int, err error)
36 36
 //sys	setfsuid(uid int) (prev int, err error)
37
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
38 37
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
39 38
 //sys	Stat(path string, stat *Stat_t) (err error)
40 39
 //sys	Statfs(path string, buf *Statfs_t) (err error)

+ 0
- 1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go View File

@@ -31,7 +31,6 @@ package unix
31 31
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
32 32
 //sys	setfsgid(gid int) (prev int, err error)
33 33
 //sys	setfsuid(uid int) (prev int, err error)
34
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
35 34
 //sys	Shutdown(fd int, how int) (err error)
36 35
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
37 36
 //sys	Stat(path string, stat *Stat_t) (err error)

+ 2
- 5
vendor/golang.org/x/sys/unix/syscall_netbsd.go View File

@@ -13,7 +13,6 @@
13 13
 package unix
14 14
 
15 15
 import (
16
-	"runtime"
17 16
 	"syscall"
18 17
 	"unsafe"
19 18
 )
@@ -178,13 +177,13 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
178 177
 }
179 178
 
180 179
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
180
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
181 181
 
182 182
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
183 183
 
184 184
 func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
185 185
 	var value Ptmget
186
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
187
-	runtime.KeepAlive(value)
186
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
188 187
 	return &value, err
189 188
 }
190 189
 
@@ -341,7 +340,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
341 340
 //sys	Setpriority(which int, who int, prio int) (err error)
342 341
 //sysnb	Setregid(rgid int, egid int) (err error)
343 342
 //sysnb	Setreuid(ruid int, euid int) (err error)
344
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
345 343
 //sysnb	Setsid() (pid int, err error)
346 344
 //sysnb	Settimeofday(tp *Timeval) (err error)
347 345
 //sysnb	Setuid(uid int) (err error)
@@ -502,7 +500,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
502 500
 // compat_43_osendmsg
503 501
 // compat_43_osethostid
504 502
 // compat_43_osethostname
505
-// compat_43_osetrlimit
506 503
 // compat_43_osigblock
507 504
 // compat_43_osigsetmask
508 505
 // compat_43_osigstack

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_openbsd.go View File

@@ -152,6 +152,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
152 152
 }
153 153
 
154 154
 //sys	ioctl(fd int, req uint, arg uintptr) (err error)
155
+//sys	ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
155 156
 
156 157
 //sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
157 158
 
@@ -293,7 +294,6 @@ func Uname(uname *Utsname) error {
293 294
 //sysnb	Setreuid(ruid int, euid int) (err error)
294 295
 //sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
295 296
 //sysnb	Setresuid(ruid int, euid int, suid int) (err error)
296
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
297 297
 //sysnb	Setrtable(rtable int) (err error)
298 298
 //sysnb	Setsid() (pid int, err error)
299 299
 //sysnb	Settimeofday(tp *Timeval) (err error)

+ 19
- 17
vendor/golang.org/x/sys/unix/syscall_solaris.go View File

@@ -408,8 +408,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
408 408
 		for n < len(pp.Path) && pp.Path[n] != 0 {
409 409
 			n++
410 410
 		}
411
-		bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
412
-		sa.Name = string(bytes)
411
+		sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
413 412
 		return sa, nil
414 413
 
415 414
 	case AF_INET:
@@ -546,22 +545,26 @@ func Minor(dev uint64) uint32 {
546 545
  * Expose the ioctl function
547 546
  */
548 547
 
549
-//sys	ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
548
+//sys	ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl
549
+//sys	ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
550 550
 
551
-func ioctl(fd int, req uint, arg uintptr) (err error) {
551
+func ioctl(fd int, req int, arg uintptr) (err error) {
552 552
 	_, err = ioctlRet(fd, req, arg)
553 553
 	return err
554 554
 }
555 555
 
556
-func IoctlSetTermio(fd int, req uint, value *Termio) error {
557
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
558
-	runtime.KeepAlive(value)
556
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
557
+	_, err = ioctlPtrRet(fd, req, arg)
559 558
 	return err
560 559
 }
561 560
 
562
-func IoctlGetTermio(fd int, req uint) (*Termio, error) {
561
+func IoctlSetTermio(fd int, req int, value *Termio) error {
562
+	return ioctlPtr(fd, req, unsafe.Pointer(value))
563
+}
564
+
565
+func IoctlGetTermio(fd int, req int) (*Termio, error) {
563 566
 	var value Termio
564
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
567
+	err := ioctlPtr(fd, req, unsafe.Pointer(&value))
565 568
 	return &value, err
566 569
 }
567 570
 
@@ -662,7 +665,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
662 665
 //sys	Setpriority(which int, who int, prio int) (err error)
663 666
 //sysnb	Setregid(rgid int, egid int) (err error)
664 667
 //sysnb	Setreuid(ruid int, euid int) (err error)
665
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
666 668
 //sysnb	Setsid() (pid int, err error)
667 669
 //sysnb	Setuid(uid int) (err error)
668 670
 //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
1077 1079
 	return retCl, retData, flags, nil
1078 1080
 }
1079 1081
 
1080
-func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
1082
+func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) {
1081 1083
 	return ioctlRet(fd, req, uintptr(arg))
1082 1084
 }
1083 1085
 
1084
-func IoctlSetString(fd int, req uint, val string) error {
1086
+func IoctlSetString(fd int, req int, val string) error {
1085 1087
 	bs := make([]byte, len(val)+1)
1086 1088
 	copy(bs[:len(bs)-1], val)
1087
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
1089
+	err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
1088 1090
 	runtime.KeepAlive(&bs[0])
1089 1091
 	return err
1090 1092
 }
@@ -1117,8 +1119,8 @@ func (l *Lifreq) GetLifruUint() uint {
1117 1119
 	return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
1118 1120
 }
1119 1121
 
1120
-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
1121
-	return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
1122
+func IoctlLifreq(fd int, req int, l *Lifreq) error {
1123
+	return ioctlPtr(fd, req, unsafe.Pointer(l))
1122 1124
 }
1123 1125
 
1124 1126
 // Strioctl Helpers
@@ -1128,6 +1130,6 @@ func (s *Strioctl) SetInt(i int) {
1128 1130
 	s.Dp = (*int8)(unsafe.Pointer(&i))
1129 1131
 }
1130 1132
 
1131
-func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
1132
-	return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
1133
+func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
1134
+	return ioctlPtrRet(fd, req, unsafe.Pointer(s))
1133 1135
 }

+ 8
- 1
vendor/golang.org/x/sys/unix/syscall_unix.go View File

@@ -578,7 +578,7 @@ func Lutimes(path string, tv []Timeval) error {
578 578
 	return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
579 579
 }
580 580
 
581
-// emptyIovec reports whether there are no bytes in the slice of Iovec.
581
+// emptyIovecs reports whether there are no bytes in the slice of Iovec.
582 582
 func emptyIovecs(iov []Iovec) bool {
583 583
 	for i := range iov {
584 584
 		if iov[i].Len > 0 {
@@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool {
587 587
 	}
588 588
 	return true
589 589
 }
590
+
591
+// Setrlimit sets a resource limit.
592
+func Setrlimit(resource int, rlim *Rlimit) error {
593
+	// Just call the syscall version, because as of Go 1.21
594
+	// it will affect starting a new process.
595
+	return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim))
596
+}

+ 3
- 3
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go View File

@@ -139,8 +139,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
139 139
 		for n < int(pp.Len) && pp.Path[n] != 0 {
140 140
 			n++
141 141
 		}
142
-		bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
143
-		sa.Name = string(bytes)
142
+		sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
144 143
 		return sa, nil
145 144
 
146 145
 	case AF_INET:
@@ -213,7 +212,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
213 212
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A
214 213
 //sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
215 214
 //sys   munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
216
-//sys   ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
215
+//sys   ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL
216
+//sys   ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL
217 217
 
218 218
 //sys   Access(path string, mode uint32) (err error) = SYS___ACCESS_A
219 219
 //sys   Chdir(path string) (err error) = SYS___CHDIR_A

+ 1
- 1
vendor/golang.org/x/sys/unix/timestruct.go View File

@@ -9,7 +9,7 @@ package unix
9 9
 
10 10
 import "time"
11 11
 
12
-// TimespecToNSec returns the time stored in ts as nanoseconds.
12
+// TimespecToNsec returns the time stored in ts as nanoseconds.
13 13
 func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
14 14
 
15 15
 // NsecToTimespec converts a number of nanoseconds into a Timespec.

+ 7
- 2
vendor/golang.org/x/sys/unix/xattr_bsd.go View File

@@ -36,9 +36,14 @@ func xattrnamespace(fullattr string) (ns int, attr string, err error) {
36 36
 func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
37 37
 	if len(dest) > idx {
38 38
 		return unsafe.Pointer(&dest[idx])
39
-	} else {
40
-		return unsafe.Pointer(_zero)
41 39
 	}
40
+	if dest != nil {
41
+		// extattr_get_file and extattr_list_file treat NULL differently from
42
+		// a non-NULL pointer of length zero. Preserve the property of nilness,
43
+		// even if we can't use dest directly.
44
+		return unsafe.Pointer(&_zero)
45
+	}
46
+	return nil
42 47
 }
43 48
 
44 49
 // FreeBSD and NetBSD implement their own syscalls to handle extended attributes

+ 19
- 0
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go View File

@@ -1270,6 +1270,16 @@ const (
1270 1270
 	SEEK_END                                = 0x2
1271 1271
 	SEEK_HOLE                               = 0x3
1272 1272
 	SEEK_SET                                = 0x0
1273
+	SF_APPEND                               = 0x40000
1274
+	SF_ARCHIVED                             = 0x10000
1275
+	SF_DATALESS                             = 0x40000000
1276
+	SF_FIRMLINK                             = 0x800000
1277
+	SF_IMMUTABLE                            = 0x20000
1278
+	SF_NOUNLINK                             = 0x100000
1279
+	SF_RESTRICTED                           = 0x80000
1280
+	SF_SETTABLE                             = 0x3fff0000
1281
+	SF_SUPPORTED                            = 0x9f0000
1282
+	SF_SYNTHETIC                            = 0xc0000000
1273 1283
 	SHUT_RD                                 = 0x0
1274 1284
 	SHUT_RDWR                               = 0x2
1275 1285
 	SHUT_WR                                 = 0x1
@@ -1543,6 +1553,15 @@ const (
1543 1553
 	TIOCTIMESTAMP                           = 0x40107459
1544 1554
 	TIOCUCNTL                               = 0x80047466
1545 1555
 	TOSTOP                                  = 0x400000
1556
+	UF_APPEND                               = 0x4
1557
+	UF_COMPRESSED                           = 0x20
1558
+	UF_DATAVAULT                            = 0x80
1559
+	UF_HIDDEN                               = 0x8000
1560
+	UF_IMMUTABLE                            = 0x2
1561
+	UF_NODUMP                               = 0x1
1562
+	UF_OPAQUE                               = 0x8
1563
+	UF_SETTABLE                             = 0xffff
1564
+	UF_TRACKED                              = 0x40
1546 1565
 	VDISCARD                                = 0xf
1547 1566
 	VDSUSP                                  = 0xb
1548 1567
 	VEOF                                    = 0x0

+ 19
- 0
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go View File

@@ -1270,6 +1270,16 @@ const (
1270 1270
 	SEEK_END                                = 0x2
1271 1271
 	SEEK_HOLE                               = 0x3
1272 1272
 	SEEK_SET                                = 0x0
1273
+	SF_APPEND                               = 0x40000
1274
+	SF_ARCHIVED                             = 0x10000
1275
+	SF_DATALESS                             = 0x40000000
1276
+	SF_FIRMLINK                             = 0x800000
1277
+	SF_IMMUTABLE                            = 0x20000
1278
+	SF_NOUNLINK                             = 0x100000
1279
+	SF_RESTRICTED                           = 0x80000
1280
+	SF_SETTABLE                             = 0x3fff0000
1281
+	SF_SUPPORTED                            = 0x9f0000
1282
+	SF_SYNTHETIC                            = 0xc0000000
1273 1283
 	SHUT_RD                                 = 0x0
1274 1284
 	SHUT_RDWR                               = 0x2
1275 1285
 	SHUT_WR                                 = 0x1
@@ -1543,6 +1553,15 @@ const (
1543 1553
 	TIOCTIMESTAMP                           = 0x40107459
1544 1554
 	TIOCUCNTL                               = 0x80047466
1545 1555
 	TOSTOP                                  = 0x400000
1556
+	UF_APPEND                               = 0x4
1557
+	UF_COMPRESSED                           = 0x20
1558
+	UF_DATAVAULT                            = 0x80
1559
+	UF_HIDDEN                               = 0x8000
1560
+	UF_IMMUTABLE                            = 0x2
1561
+	UF_NODUMP                               = 0x1
1562
+	UF_OPAQUE                               = 0x8
1563
+	UF_SETTABLE                             = 0xffff
1564
+	UF_TRACKED                              = 0x40
1546 1565
 	VDISCARD                                = 0xf
1547 1566
 	VDSUSP                                  = 0xb
1548 1567
 	VEOF                                    = 0x0

+ 31
- 9
vendor/golang.org/x/sys/unix/zerrors_linux.go View File

@@ -70,6 +70,7 @@ const (
70 70
 	ALG_SET_DRBG_ENTROPY                        = 0x6
71 71
 	ALG_SET_IV                                  = 0x2
72 72
 	ALG_SET_KEY                                 = 0x1
73
+	ALG_SET_KEY_BY_KEY_SERIAL                   = 0x7
73 74
 	ALG_SET_OP                                  = 0x3
74 75
 	ANON_INODE_FS_MAGIC                         = 0x9041934
75 76
 	ARPHRD_6LOWPAN                              = 0x339
@@ -457,7 +458,6 @@ const (
457 458
 	B600                                        = 0x8
458 459
 	B75                                         = 0x2
459 460
 	B9600                                       = 0xd
460
-	BALLOON_KVM_MAGIC                           = 0x13661366
461 461
 	BDEVFS_MAGIC                                = 0x62646576
462 462
 	BINDERFS_SUPER_MAGIC                        = 0x6c6f6f70
463 463
 	BINFMTFS_MAGIC                              = 0x42494e4d
@@ -563,6 +563,7 @@ const (
563 563
 	BUS_USB                                     = 0x3
564 564
 	BUS_VIRTUAL                                 = 0x6
565 565
 	CAN_BCM                                     = 0x2
566
+	CAN_BUS_OFF_THRESHOLD                       = 0x100
566 567
 	CAN_CTRLMODE_3_SAMPLES                      = 0x4
567 568
 	CAN_CTRLMODE_BERR_REPORTING                 = 0x10
568 569
 	CAN_CTRLMODE_CC_LEN8_DLC                    = 0x100
@@ -577,9 +578,12 @@ const (
577 578
 	CAN_EFF_FLAG                                = 0x80000000
578 579
 	CAN_EFF_ID_BITS                             = 0x1d
579 580
 	CAN_EFF_MASK                                = 0x1fffffff
581
+	CAN_ERROR_PASSIVE_THRESHOLD                 = 0x80
582
+	CAN_ERROR_WARNING_THRESHOLD                 = 0x60
580 583
 	CAN_ERR_ACK                                 = 0x20
581 584
 	CAN_ERR_BUSERROR                            = 0x80
582 585
 	CAN_ERR_BUSOFF                              = 0x40
586
+	CAN_ERR_CNT                                 = 0x200
583 587
 	CAN_ERR_CRTL                                = 0x4
584 588
 	CAN_ERR_CRTL_ACTIVE                         = 0x40
585 589
 	CAN_ERR_CRTL_RX_OVERFLOW                    = 0x1
@@ -771,6 +775,8 @@ const (
771 775
 	DEVLINK_GENL_MCGRP_CONFIG_NAME              = "config"
772 776
 	DEVLINK_GENL_NAME                           = "devlink"
773 777
 	DEVLINK_GENL_VERSION                        = 0x1
778
+	DEVLINK_PORT_FN_CAP_MIGRATABLE              = 0x2
779
+	DEVLINK_PORT_FN_CAP_ROCE                    = 0x1
774 780
 	DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX           = 0x14
775 781
 	DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS  = 0x3
776 782
 	DEVMEM_MAGIC                                = 0x454d444d
@@ -820,9 +826,9 @@ const (
820 826
 	DM_UUID_FLAG                                = 0x4000
821 827
 	DM_UUID_LEN                                 = 0x81
822 828
 	DM_VERSION                                  = 0xc138fd00
823
-	DM_VERSION_EXTRA                            = "-ioctl (2022-02-22)"
829
+	DM_VERSION_EXTRA                            = "-ioctl (2022-07-28)"
824 830
 	DM_VERSION_MAJOR                            = 0x4
825
-	DM_VERSION_MINOR                            = 0x2e
831
+	DM_VERSION_MINOR                            = 0x2f
826 832
 	DM_VERSION_PATCHLEVEL                       = 0x0
827 833
 	DT_BLK                                      = 0x6
828 834
 	DT_CHR                                      = 0x2
@@ -1049,6 +1055,7 @@ const (
1049 1055
 	ETH_P_CAIF                                  = 0xf7
1050 1056
 	ETH_P_CAN                                   = 0xc
1051 1057
 	ETH_P_CANFD                                 = 0xd
1058
+	ETH_P_CANXL                                 = 0xe
1052 1059
 	ETH_P_CFM                                   = 0x8902
1053 1060
 	ETH_P_CONTROL                               = 0x16
1054 1061
 	ETH_P_CUST                                  = 0x6006
@@ -1060,6 +1067,7 @@ const (
1060 1067
 	ETH_P_DNA_RT                                = 0x6003
1061 1068
 	ETH_P_DSA                                   = 0x1b
1062 1069
 	ETH_P_DSA_8021Q                             = 0xdadb
1070
+	ETH_P_DSA_A5PSW                             = 0xe001
1063 1071
 	ETH_P_ECONET                                = 0x18
1064 1072
 	ETH_P_EDSA                                  = 0xdada
1065 1073
 	ETH_P_ERSPAN                                = 0x88be
@@ -1194,8 +1202,10 @@ const (
1194 1202
 	FAN_MARK_EVICTABLE                          = 0x200
1195 1203
 	FAN_MARK_FILESYSTEM                         = 0x100
1196 1204
 	FAN_MARK_FLUSH                              = 0x80
1205
+	FAN_MARK_IGNORE                             = 0x400
1197 1206
 	FAN_MARK_IGNORED_MASK                       = 0x20
1198 1207
 	FAN_MARK_IGNORED_SURV_MODIFY                = 0x40
1208
+	FAN_MARK_IGNORE_SURV                        = 0x440
1199 1209
 	FAN_MARK_INODE                              = 0x0
1200 1210
 	FAN_MARK_MOUNT                              = 0x10
1201 1211
 	FAN_MARK_ONLYDIR                            = 0x8
@@ -1253,7 +1263,10 @@ const (
1253 1263
 	FSCRYPT_MODE_AES_128_CBC                    = 0x5
1254 1264
 	FSCRYPT_MODE_AES_128_CTS                    = 0x6
1255 1265
 	FSCRYPT_MODE_AES_256_CTS                    = 0x4
1266
+	FSCRYPT_MODE_AES_256_HCTR2                  = 0xa
1256 1267
 	FSCRYPT_MODE_AES_256_XTS                    = 0x1
1268
+	FSCRYPT_MODE_SM4_CTS                        = 0x8
1269
+	FSCRYPT_MODE_SM4_XTS                        = 0x7
1257 1270
 	FSCRYPT_POLICY_FLAGS_PAD_16                 = 0x2
1258 1271
 	FSCRYPT_POLICY_FLAGS_PAD_32                 = 0x3
1259 1272
 	FSCRYPT_POLICY_FLAGS_PAD_4                  = 0x0
@@ -1272,8 +1285,6 @@ const (
1272 1285
 	FS_ENCRYPTION_MODE_AES_256_GCM              = 0x2
1273 1286
 	FS_ENCRYPTION_MODE_AES_256_XTS              = 0x1
1274 1287
 	FS_ENCRYPTION_MODE_INVALID                  = 0x0
1275
-	FS_ENCRYPTION_MODE_SPECK128_256_CTS         = 0x8
1276
-	FS_ENCRYPTION_MODE_SPECK128_256_XTS         = 0x7
1277 1288
 	FS_IOC_ADD_ENCRYPTION_KEY                   = 0xc0506617
1278 1289
 	FS_IOC_GET_ENCRYPTION_KEY_STATUS            = 0xc080661a
1279 1290
 	FS_IOC_GET_ENCRYPTION_POLICY_EX             = 0xc0096616
@@ -1430,6 +1441,7 @@ const (
1430 1441
 	IFF_NOARP                                   = 0x80
1431 1442
 	IFF_NOFILTER                                = 0x1000
1432 1443
 	IFF_NOTRAILERS                              = 0x20
1444
+	IFF_NO_CARRIER                              = 0x40
1433 1445
 	IFF_NO_PI                                   = 0x1000
1434 1446
 	IFF_ONE_QUEUE                               = 0x2000
1435 1447
 	IFF_PERSIST                                 = 0x800
@@ -1761,6 +1773,7 @@ const (
1761 1773
 	LANDLOCK_ACCESS_FS_REFER                    = 0x2000
1762 1774
 	LANDLOCK_ACCESS_FS_REMOVE_DIR               = 0x10
1763 1775
 	LANDLOCK_ACCESS_FS_REMOVE_FILE              = 0x20
1776
+	LANDLOCK_ACCESS_FS_TRUNCATE                 = 0x4000
1764 1777
 	LANDLOCK_ACCESS_FS_WRITE_FILE               = 0x2
1765 1778
 	LANDLOCK_CREATE_RULESET_VERSION             = 0x1
1766 1779
 	LINUX_REBOOT_CMD_CAD_OFF                    = 0x0
@@ -1800,11 +1813,13 @@ const (
1800 1813
 	LWTUNNEL_IP_OPT_GENEVE_MAX                  = 0x3
1801 1814
 	LWTUNNEL_IP_OPT_VXLAN_MAX                   = 0x1
1802 1815
 	MADV_COLD                                   = 0x14
1816
+	MADV_COLLAPSE                               = 0x19
1803 1817
 	MADV_DODUMP                                 = 0x11
1804 1818
 	MADV_DOFORK                                 = 0xb
1805 1819
 	MADV_DONTDUMP                               = 0x10
1806 1820
 	MADV_DONTFORK                               = 0xa
1807 1821
 	MADV_DONTNEED                               = 0x4
1822
+	MADV_DONTNEED_LOCKED                        = 0x18
1808 1823
 	MADV_FREE                                   = 0x8
1809 1824
 	MADV_HUGEPAGE                               = 0xe
1810 1825
 	MADV_HWPOISON                               = 0x64
@@ -1846,7 +1861,7 @@ const (
1846 1861
 	MFD_ALLOW_SEALING                           = 0x2
1847 1862
 	MFD_CLOEXEC                                 = 0x1
1848 1863
 	MFD_HUGETLB                                 = 0x4
1849
-	MFD_HUGE_16GB                               = -0x78000000
1864
+	MFD_HUGE_16GB                               = 0x88000000
1850 1865
 	MFD_HUGE_16MB                               = 0x60000000
1851 1866
 	MFD_HUGE_1GB                                = 0x78000000
1852 1867
 	MFD_HUGE_1MB                                = 0x50000000
@@ -2153,6 +2168,7 @@ const (
2153 2168
 	PACKET_FANOUT_DATA                          = 0x16
2154 2169
 	PACKET_FANOUT_EBPF                          = 0x7
2155 2170
 	PACKET_FANOUT_FLAG_DEFRAG                   = 0x8000
2171
+	PACKET_FANOUT_FLAG_IGNORE_OUTGOING          = 0x4000
2156 2172
 	PACKET_FANOUT_FLAG_ROLLOVER                 = 0x1000
2157 2173
 	PACKET_FANOUT_FLAG_UNIQUEID                 = 0x2000
2158 2174
 	PACKET_FANOUT_HASH                          = 0x0
@@ -2212,6 +2228,11 @@ const (
2212 2228
 	PERF_AUX_FLAG_PARTIAL                       = 0x4
2213 2229
 	PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK          = 0xff00
2214 2230
 	PERF_AUX_FLAG_TRUNCATED                     = 0x1
2231
+	PERF_BR_ARM64_DEBUG_DATA                    = 0x7
2232
+	PERF_BR_ARM64_DEBUG_EXIT                    = 0x5
2233
+	PERF_BR_ARM64_DEBUG_HALT                    = 0x4
2234
+	PERF_BR_ARM64_DEBUG_INST                    = 0x6
2235
+	PERF_BR_ARM64_FIQ                           = 0x3
2215 2236
 	PERF_FLAG_FD_CLOEXEC                        = 0x8
2216 2237
 	PERF_FLAG_FD_NO_GROUP                       = 0x1
2217 2238
 	PERF_FLAG_FD_OUTPUT                         = 0x2
@@ -2232,6 +2253,8 @@ const (
2232 2253
 	PERF_MEM_LOCK_NA                            = 0x1
2233 2254
 	PERF_MEM_LOCK_SHIFT                         = 0x18
2234 2255
 	PERF_MEM_LVLNUM_ANY_CACHE                   = 0xb
2256
+	PERF_MEM_LVLNUM_CXL                         = 0x9
2257
+	PERF_MEM_LVLNUM_IO                          = 0xa
2235 2258
 	PERF_MEM_LVLNUM_L1                          = 0x1
2236 2259
 	PERF_MEM_LVLNUM_L2                          = 0x2
2237 2260
 	PERF_MEM_LVLNUM_L3                          = 0x3
@@ -2265,6 +2288,7 @@ const (
2265 2288
 	PERF_MEM_REMOTE_REMOTE                      = 0x1
2266 2289
 	PERF_MEM_REMOTE_SHIFT                       = 0x25
2267 2290
 	PERF_MEM_SNOOPX_FWD                         = 0x1
2291
+	PERF_MEM_SNOOPX_PEER                        = 0x2
2268 2292
 	PERF_MEM_SNOOPX_SHIFT                       = 0x26
2269 2293
 	PERF_MEM_SNOOP_HIT                          = 0x4
2270 2294
 	PERF_MEM_SNOOP_HITM                         = 0x10
@@ -2301,7 +2325,6 @@ const (
2301 2325
 	PERF_SAMPLE_BRANCH_PLM_ALL                  = 0x7
2302 2326
 	PERF_SAMPLE_WEIGHT_TYPE                     = 0x1004000
2303 2327
 	PIPEFS_MAGIC                                = 0x50495045
2304
-	PPC_CMM_MAGIC                               = 0xc7571590
2305 2328
 	PPPIOCGNPMODE                               = 0xc008744c
2306 2329
 	PPPIOCNEWUNIT                               = 0xc004743e
2307 2330
 	PRIO_PGRP                                   = 0x1
@@ -2999,6 +3022,7 @@ const (
2999 3022
 	STATX_BLOCKS                                = 0x400
3000 3023
 	STATX_BTIME                                 = 0x800
3001 3024
 	STATX_CTIME                                 = 0x80
3025
+	STATX_DIOALIGN                              = 0x2000
3002 3026
 	STATX_GID                                   = 0x10
3003 3027
 	STATX_INO                                   = 0x100
3004 3028
 	STATX_MNT_ID                                = 0x1000
@@ -3392,9 +3416,7 @@ const (
3392 3416
 	XDP_ZEROCOPY                                = 0x4
3393 3417
 	XENFS_SUPER_MAGIC                           = 0xabba1974
3394 3418
 	XFS_SUPER_MAGIC                             = 0x58465342
3395
-	Z3FOLD_MAGIC                                = 0x33
3396 3419
 	ZONEFS_MAGIC                                = 0x5a4f4653
3397
-	ZSMALLOC_MAGIC                              = 0x58295829
3398 3420
 	_HIDIOCGRAWNAME_LEN                         = 0x80
3399 3421
 	_HIDIOCGRAWPHYS_LEN                         = 0x40
3400 3422
 	_HIDIOCGRAWUNIQ_LEN                         = 0x40

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_386.go View File

@@ -133,6 +133,7 @@ const (
133 133
 	MEMGETREGIONCOUNT                = 0x80044d07
134 134
 	MEMISLOCKED                      = 0x80084d17
135 135
 	MEMLOCK                          = 0x40084d05
136
+	MEMREAD                          = 0xc03c4d1a
136 137
 	MEMREADOOB                       = 0xc00c4d04
137 138
 	MEMSETBADBLOCK                   = 0x40084d0c
138 139
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go View File

@@ -133,6 +133,7 @@ const (
133 133
 	MEMGETREGIONCOUNT                = 0x80044d07
134 134
 	MEMISLOCKED                      = 0x80084d17
135 135
 	MEMLOCK                          = 0x40084d05
136
+	MEMREAD                          = 0xc0404d1a
136 137
 	MEMREADOOB                       = 0xc0104d04
137 138
 	MEMSETBADBLOCK                   = 0x40084d0c
138 139
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x80044d07
132 132
 	MEMISLOCKED                      = 0x80084d17
133 133
 	MEMLOCK                          = 0x40084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc00c4d04
135 136
 	MEMSETBADBLOCK                   = 0x40084d0c
136 137
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go View File

@@ -134,6 +134,7 @@ const (
134 134
 	MEMGETREGIONCOUNT                = 0x80044d07
135 135
 	MEMISLOCKED                      = 0x80084d17
136 136
 	MEMLOCK                          = 0x40084d05
137
+	MEMREAD                          = 0xc0404d1a
137 138
 	MEMREADOOB                       = 0xc0104d04
138 139
 	MEMSETBADBLOCK                   = 0x40084d0c
139 140
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go View File

@@ -132,6 +132,7 @@ const (
132 132
 	MEMGETREGIONCOUNT                = 0x80044d07
133 133
 	MEMISLOCKED                      = 0x80084d17
134 134
 	MEMLOCK                          = 0x40084d05
135
+	MEMREAD                          = 0xc0404d1a
135 136
 	MEMREADOOB                       = 0xc0104d04
136 137
 	MEMSETBADBLOCK                   = 0x40084d0c
137 138
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc00c4d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc00c4d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc00c4d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x40044d07
132 132
 	MEMISLOCKED                      = 0x40084d17
133 133
 	MEMLOCK                          = 0x80084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x80084d0c
136 137
 	MEMUNLOCK                        = 0x80084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x80044d07
132 132
 	MEMISLOCKED                      = 0x80084d17
133 133
 	MEMLOCK                          = 0x40084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x40084d0c
136 137
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go View File

@@ -131,6 +131,7 @@ const (
131 131
 	MEMGETREGIONCOUNT                = 0x80044d07
132 132
 	MEMISLOCKED                      = 0x80084d17
133 133
 	MEMLOCK                          = 0x40084d05
134
+	MEMREAD                          = 0xc0404d1a
134 135
 	MEMREADOOB                       = 0xc0104d04
135 136
 	MEMSETBADBLOCK                   = 0x40084d0c
136 137
 	MEMUNLOCK                        = 0x40084d06

+ 1
- 0
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go View File

@@ -136,6 +136,7 @@ const (
136 136
 	MEMGETREGIONCOUNT                = 0x40044d07
137 137
 	MEMISLOCKED                      = 0x40084d17
138 138
 	MEMLOCK                          = 0x80084d05
139
+	MEMREAD                          = 0xc0404d1a
139 140
 	MEMREADOOB                       = 0xc0104d04
140 141
 	MEMSETBADBLOCK                   = 0x80084d0c
141 142
 	MEMUNLOCK                        = 0x80084d06

+ 4
- 4
vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go View File

@@ -15,12 +15,12 @@ type PtraceRegsArm struct {
15 15
 
16 16
 // PtraceGetRegsArm fetches the registers used by arm binaries.
17 17
 func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
18
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
19 19
 }
20 20
 
21 21
 // PtraceSetRegsArm sets the registers used by arm binaries.
22 22
 func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
23
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
24 24
 }
25 25
 
26 26
 // PtraceRegsArm64 is the registers used by arm64 binaries.
@@ -33,10 +33,10 @@ type PtraceRegsArm64 struct {
33 33
 
34 34
 // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
35 35
 func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
36
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
37 37
 }
38 38
 
39 39
 // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
40 40
 func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
41
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
42 42
 }

+ 2
- 2
vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go View File

@@ -7,11 +7,11 @@ import "unsafe"
7 7
 // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 8
 func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 9
 	iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10
-	return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
10
+	return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 11
 }
12 12
 
13 13
 // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 14
 func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 15
 	iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16
-	return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
16
+	return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 17
 }

+ 4
- 4
vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go View File

@@ -21,12 +21,12 @@ type PtraceRegsMips struct {
21 21
 
22 22
 // PtraceGetRegsMips fetches the registers used by mips binaries.
23 23
 func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
24
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
25 25
 }
26 26
 
27 27
 // PtraceSetRegsMips sets the registers used by mips binaries.
28 28
 func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
29
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
30 30
 }
31 31
 
32 32
 // PtraceRegsMips64 is the registers used by mips64 binaries.
@@ -42,10 +42,10 @@ type PtraceRegsMips64 struct {
42 42
 
43 43
 // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
44 44
 func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
45
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
46 46
 }
47 47
 
48 48
 // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
49 49
 func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
50
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
51 51
 }

+ 4
- 4
vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go View File

@@ -21,12 +21,12 @@ type PtraceRegsMipsle struct {
21 21
 
22 22
 // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
23 23
 func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
24
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
25 25
 }
26 26
 
27 27
 // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
28 28
 func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
29
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
30 30
 }
31 31
 
32 32
 // PtraceRegsMips64le is the registers used by mips64le binaries.
@@ -42,10 +42,10 @@ type PtraceRegsMips64le struct {
42 42
 
43 43
 // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
44 44
 func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
45
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
46 46
 }
47 47
 
48 48
 // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
49 49
 func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
50
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
51 51
 }

+ 4
- 4
vendor/golang.org/x/sys/unix/zptrace_x86_linux.go View File

@@ -31,12 +31,12 @@ type PtraceRegs386 struct {
31 31
 
32 32
 // PtraceGetRegs386 fetches the registers used by 386 binaries.
33 33
 func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {
34
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
34
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
35 35
 }
36 36
 
37 37
 // PtraceSetRegs386 sets the registers used by 386 binaries.
38 38
 func PtraceSetRegs386(pid int, regs *PtraceRegs386) error {
39
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
39
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
40 40
 }
41 41
 
42 42
 // PtraceRegsAmd64 is the registers used by amd64 binaries.
@@ -72,10 +72,10 @@ type PtraceRegsAmd64 struct {
72 72
 
73 73
 // PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
74 74
 func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {
75
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
75
+	return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
76 76
 }
77 77
 
78 78
 // PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
79 79
 func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {
80
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
80
+	return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
81 81
 }

+ 11
- 12
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go View File

@@ -124,7 +124,6 @@ int utime(uintptr_t, uintptr_t);
124 124
 unsigned long long getsystemcfg(int);
125 125
 int umount(uintptr_t);
126 126
 int getrlimit64(int, uintptr_t);
127
-int setrlimit64(int, uintptr_t);
128 127
 long long lseek64(int, long long, int);
129 128
 uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);
130 129
 
@@ -213,7 +212,7 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
213 212
 
214 213
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215 214
 
216
-func ioctl(fd int, req uint, arg uintptr) (err error) {
215
+func ioctl(fd int, req int, arg uintptr) (err error) {
217 216
 	r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
218 217
 	if r0 == -1 && er != nil {
219 218
 		err = er
@@ -223,6 +222,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
223 222
 
224 223
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
225 224
 
225
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
226
+	r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg)))
227
+	if r0 == -1 && er != nil {
228
+		err = er
229
+	}
230
+	return
231
+}
232
+
233
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
234
+
226 235
 func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
227 236
 	r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
228 237
 	r = int(r0)
@@ -1454,16 +1463,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
1454 1463
 
1455 1464
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1456 1465
 
1457
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
1458
-	r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
1459
-	if r0 == -1 && er != nil {
1460
-		err = er
1461
-	}
1462
-	return
1463
-}
1464
-
1465
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1466
-
1467 1466
 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1468 1467
 	r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))
1469 1468
 	off = int64(r0)

+ 12
- 12
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go View File

@@ -93,8 +93,18 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
93 93
 
94 94
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
95 95
 
96
-func ioctl(fd int, req uint, arg uintptr) (err error) {
97
-	_, e1 := callioctl(fd, int(req), arg)
96
+func ioctl(fd int, req int, arg uintptr) (err error) {
97
+	_, e1 := callioctl(fd, req, arg)
98
+	if e1 != 0 {
99
+		err = errnoErr(e1)
100
+	}
101
+	return
102
+}
103
+
104
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
105
+
106
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
107
+	_, e1 := callioctl_ptr(fd, req, arg)
98 108
 	if e1 != 0 {
99 109
 		err = errnoErr(e1)
100 110
 	}
@@ -1412,16 +1422,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
1412 1422
 
1413 1423
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1414 1424
 
1415
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
1416
-	_, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
1417
-	if e1 != 0 {
1418
-		err = errnoErr(e1)
1419
-	}
1420
-	return
1421
-}
1422
-
1423
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1424
-
1425 1425
 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1426 1426
 	r0, e1 := calllseek(fd, offset, whence)
1427 1427
 	off = int64(r0)

+ 7
- 10
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go View File

@@ -124,7 +124,6 @@ import (
124 124
 //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
125 125
 //go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o"
126 126
 //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
127
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
128 127
 //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
129 128
 //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o"
130 129
 
@@ -242,7 +241,6 @@ import (
242 241
 //go:linkname libc_getsystemcfg libc_getsystemcfg
243 242
 //go:linkname libc_umount libc_umount
244 243
 //go:linkname libc_getrlimit libc_getrlimit
245
-//go:linkname libc_setrlimit libc_setrlimit
246 244
 //go:linkname libc_lseek libc_lseek
247 245
 //go:linkname libc_mmap64 libc_mmap64
248 246
 
@@ -363,7 +361,6 @@ var (
363 361
 	libc_getsystemcfg,
364 362
 	libc_umount,
365 363
 	libc_getrlimit,
366
-	libc_setrlimit,
367 364
 	libc_lseek,
368 365
 	libc_mmap64 syscallFunc
369 366
 )
@@ -423,6 +420,13 @@ func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {
423 420
 
424 421
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
425 422
 
423
+func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {
424
+	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
425
+	return
426
+}
427
+
428
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
429
+
426 430
 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
427 431
 	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, fd, uintptr(cmd), arg, 0, 0, 0)
428 432
 	return
@@ -1172,13 +1176,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1172 1176
 
1173 1177
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1174 1178
 
1175
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1176
-	r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
1177
-	return
1178
-}
1179
-
1180
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1181
-
1182 1179
 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
1183 1180
 	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
1184 1181
 	return

+ 9
- 9
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go View File

@@ -123,7 +123,6 @@ int utime(uintptr_t, uintptr_t);
123 123
 unsigned long long getsystemcfg(int);
124 124
 int umount(uintptr_t);
125 125
 int getrlimit(int, uintptr_t);
126
-int setrlimit(int, uintptr_t);
127 126
 long long lseek(int, long long, int);
128 127
 uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
129 128
 
@@ -131,6 +130,7 @@ uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
131 130
 import "C"
132 131
 import (
133 132
 	"syscall"
133
+	"unsafe"
134 134
 )
135 135
 
136 136
 // 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) {
191 191
 
192 192
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193 193
 
194
+func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {
195
+	r1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))))
196
+	e1 = syscall.GetErrno()
197
+	return
198
+}
199
+
200
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
201
+
194 202
 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
195 203
 	r1 = uintptr(C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)))
196 204
 	e1 = syscall.GetErrno()
@@ -1047,14 +1055,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1047 1055
 
1048 1056
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1049 1057
 
1050
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1051
-	r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim)))
1052
-	e1 = syscall.GetErrno()
1053
-	return
1054
-}
1055
-
1056
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1057
-
1058 1058
 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
1059 1059
 	r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence)))
1060 1060
 	e1 = syscall.GetErrno()

+ 41
- 14
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go View File

@@ -725,6 +725,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
725 725
 	return
726 726
 }
727 727
 
728
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
729
+	_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
730
+	if e1 != 0 {
731
+		err = errnoErr(e1)
732
+	}
733
+	return
734
+}
735
+
728 736
 var libc_ioctl_trampoline_addr uintptr
729 737
 
730 738
 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
@@ -1984,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
1984 1992
 
1985 1993
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1986 1994
 
1995
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
1996
+	var _p0 *byte
1997
+	_p0, err = BytePtrFromString(path)
1998
+	if err != nil {
1999
+		return
2000
+	}
2001
+	var _p1 unsafe.Pointer
2002
+	if len(attrBuf) > 0 {
2003
+		_p1 = unsafe.Pointer(&attrBuf[0])
2004
+	} else {
2005
+		_p1 = unsafe.Pointer(&_zero)
2006
+	}
2007
+	_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
2008
+	if e1 != 0 {
2009
+		err = errnoErr(e1)
2010
+	}
2011
+	return
2012
+}
2013
+
2014
+var libc_setattrlist_trampoline_addr uintptr
2015
+
2016
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
2017
+
2018
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2019
+
1987 2020
 func Setegid(egid int) (err error) {
1988 2021
 	_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
1989 2022
 	if e1 != 0 {
@@ -2115,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
2115 2148
 
2116 2149
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2117 2150
 
2118
-func Setrlimit(which int, lim *Rlimit) (err error) {
2119
-	_, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2120
-	if e1 != 0 {
2121
-		err = errnoErr(e1)
2122
-	}
2123
-	return
2124
-}
2125
-
2126
-var libc_setrlimit_trampoline_addr uintptr
2127
-
2128
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
2129
-
2130
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2131
-
2132 2151
 func Setsid() (pid int, err error) {
2133 2152
 	r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
2134 2153
 	pid = int(r0)
@@ -2502,6 +2521,14 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
2502 2521
 	return
2503 2522
 }
2504 2523
 
2524
+func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
2525
+	_, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
2526
+	if e1 != 0 {
2527
+		err = errnoErr(e1)
2528
+	}
2529
+	return
2530
+}
2531
+
2505 2532
 var libc_ptrace_trampoline_addr uintptr
2506 2533
 
2507 2534
 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"

+ 5
- 6
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s View File

@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
705 705
 GLOBL	·libc_select_trampoline_addr(SB), RODATA, $8
706 706
 DATA	·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
707 707
 
708
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
709
+	JMP	libc_setattrlist(SB)
710
+GLOBL	·libc_setattrlist_trampoline_addr(SB), RODATA, $8
711
+DATA	·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
712
+
708 713
 TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
709 714
 	JMP	libc_setegid(SB)
710 715
 
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
759 764
 GLOBL	·libc_setreuid_trampoline_addr(SB), RODATA, $8
760 765
 DATA	·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
761 766
 
762
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
763
-	JMP	libc_setrlimit(SB)
764
-
765
-GLOBL	·libc_setrlimit_trampoline_addr(SB), RODATA, $8
766
-DATA	·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
767
-
768 767
 TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
769 768
 	JMP	libc_setsid(SB)
770 769
 

+ 41
- 14
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go View File

@@ -725,6 +725,14 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
725 725
 	return
726 726
 }
727 727
 
728
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
729
+	_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
730
+	if e1 != 0 {
731
+		err = errnoErr(e1)
732
+	}
733
+	return
734
+}
735
+
728 736
 var libc_ioctl_trampoline_addr uintptr
729 737
 
730 738
 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
@@ -1984,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
1984 1992
 
1985 1993
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1986 1994
 
1995
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
1996
+	var _p0 *byte
1997
+	_p0, err = BytePtrFromString(path)
1998
+	if err != nil {
1999
+		return
2000
+	}
2001
+	var _p1 unsafe.Pointer
2002
+	if len(attrBuf) > 0 {
2003
+		_p1 = unsafe.Pointer(&attrBuf[0])
2004
+	} else {
2005
+		_p1 = unsafe.Pointer(&_zero)
2006
+	}
2007
+	_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
2008
+	if e1 != 0 {
2009
+		err = errnoErr(e1)
2010
+	}
2011
+	return
2012
+}
2013
+
2014
+var libc_setattrlist_trampoline_addr uintptr
2015
+
2016
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
2017
+
2018
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2019
+
1987 2020
 func Setegid(egid int) (err error) {
1988 2021
 	_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
1989 2022
 	if e1 != 0 {
@@ -2115,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
2115 2148
 
2116 2149
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2117 2150
 
2118
-func Setrlimit(which int, lim *Rlimit) (err error) {
2119
-	_, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2120
-	if e1 != 0 {
2121
-		err = errnoErr(e1)
2122
-	}
2123
-	return
2124
-}
2125
-
2126
-var libc_setrlimit_trampoline_addr uintptr
2127
-
2128
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
2129
-
2130
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2131
-
2132 2151
 func Setsid() (pid int, err error) {
2133 2152
 	r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
2134 2153
 	pid = int(r0)
@@ -2502,6 +2521,14 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
2502 2521
 	return
2503 2522
 }
2504 2523
 
2524
+func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
2525
+	_, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
2526
+	if e1 != 0 {
2527
+		err = errnoErr(e1)
2528
+	}
2529
+	return
2530
+}
2531
+
2505 2532
 var libc_ptrace_trampoline_addr uintptr
2506 2533
 
2507 2534
 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"

+ 5
- 6
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s View File

@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
705 705
 GLOBL	·libc_select_trampoline_addr(SB), RODATA, $8
706 706
 DATA	·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
707 707
 
708
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
709
+	JMP	libc_setattrlist(SB)
710
+GLOBL	·libc_setattrlist_trampoline_addr(SB), RODATA, $8
711
+DATA	·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
712
+
708 713
 TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
709 714
 	JMP	libc_setegid(SB)
710 715
 
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
759 764
 GLOBL	·libc_setreuid_trampoline_addr(SB), RODATA, $8
760 765
 DATA	·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
761 766
 
762
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
763
-	JMP	libc_setrlimit(SB)
764
-
765
-GLOBL	·libc_setrlimit_trampoline_addr(SB), RODATA, $8
766
-DATA	·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
767
-
768 767
 TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
769 768
 	JMP	libc_setsid(SB)
770 769
 

+ 10
- 10
vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go View File

@@ -436,6 +436,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
436 436
 
437 437
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438 438
 
439
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
440
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
441
+	if e1 != 0 {
442
+		err = errnoErr(e1)
443
+	}
444
+	return
445
+}
446
+
447
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
448
+
439 449
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
440 450
 	var _p0 unsafe.Pointer
441 451
 	if len(mib) > 0 {
@@ -1400,16 +1410,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1400 1410
 
1401 1411
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1402 1412
 
1403
-func Setrlimit(which int, lim *Rlimit) (err error) {
1404
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1405
-	if e1 != 0 {
1406
-		err = errnoErr(e1)
1407
-	}
1408
-	return
1409
-}
1410
-
1411
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1412
-
1413 1413
 func Setsid() (pid int, err error) {
1414 1414
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1415 1415
 	pid = int(r0)

+ 20
- 10
vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go View File

@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
388 388
 
389 389
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390 390
 
391
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
392
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
393
+	if e1 != 0 {
394
+		err = errnoErr(e1)
395
+	}
396
+	return
397
+}
398
+
399
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
+
391 401
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
392 402
 	var _p0 unsafe.Pointer
393 403
 	if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
414 424
 
415 425
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
416 426
 
427
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
428
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
429
+	if e1 != 0 {
430
+		err = errnoErr(e1)
431
+	}
432
+	return
433
+}
434
+
435
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
+
417 437
 func Access(path string, mode uint32) (err error) {
418 438
 	var _p0 *byte
419 439
 	_p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1625 1645
 
1626 1646
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627 1647
 
1628
-func Setrlimit(which int, lim *Rlimit) (err error) {
1629
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1630
-	if e1 != 0 {
1631
-		err = errnoErr(e1)
1632
-	}
1633
-	return
1634
-}
1635
-
1636
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
-
1638 1648
 func Setsid() (pid int, err error) {
1639 1649
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1640 1650
 	pid = int(r0)

+ 20
- 10
vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go View File

@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
388 388
 
389 389
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390 390
 
391
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
392
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
393
+	if e1 != 0 {
394
+		err = errnoErr(e1)
395
+	}
396
+	return
397
+}
398
+
399
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
+
391 401
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
392 402
 	var _p0 unsafe.Pointer
393 403
 	if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
414 424
 
415 425
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
416 426
 
427
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
428
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
429
+	if e1 != 0 {
430
+		err = errnoErr(e1)
431
+	}
432
+	return
433
+}
434
+
435
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
+
417 437
 func Access(path string, mode uint32) (err error) {
418 438
 	var _p0 *byte
419 439
 	_p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1625 1645
 
1626 1646
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627 1647
 
1628
-func Setrlimit(which int, lim *Rlimit) (err error) {
1629
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1630
-	if e1 != 0 {
1631
-		err = errnoErr(e1)
1632
-	}
1633
-	return
1634
-}
1635
-
1636
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
-
1638 1648
 func Setsid() (pid int, err error) {
1639 1649
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1640 1650
 	pid = int(r0)

+ 20
- 10
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go View File

@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
388 388
 
389 389
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390 390
 
391
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
392
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
393
+	if e1 != 0 {
394
+		err = errnoErr(e1)
395
+	}
396
+	return
397
+}
398
+
399
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
+
391 401
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
392 402
 	var _p0 unsafe.Pointer
393 403
 	if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
414 424
 
415 425
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
416 426
 
427
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
428
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
429
+	if e1 != 0 {
430
+		err = errnoErr(e1)
431
+	}
432
+	return
433
+}
434
+
435
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
+
417 437
 func Access(path string, mode uint32) (err error) {
418 438
 	var _p0 *byte
419 439
 	_p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1625 1645
 
1626 1646
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627 1647
 
1628
-func Setrlimit(which int, lim *Rlimit) (err error) {
1629
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1630
-	if e1 != 0 {
1631
-		err = errnoErr(e1)
1632
-	}
1633
-	return
1634
-}
1635
-
1636
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
-
1638 1648
 func Setsid() (pid int, err error) {
1639 1649
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1640 1650
 	pid = int(r0)

+ 20
- 10
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go View File

@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
388 388
 
389 389
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390 390
 
391
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
392
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
393
+	if e1 != 0 {
394
+		err = errnoErr(e1)
395
+	}
396
+	return
397
+}
398
+
399
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
+
391 401
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
392 402
 	var _p0 unsafe.Pointer
393 403
 	if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
414 424
 
415 425
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
416 426
 
427
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
428
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
429
+	if e1 != 0 {
430
+		err = errnoErr(e1)
431
+	}
432
+	return
433
+}
434
+
435
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
+
417 437
 func Access(path string, mode uint32) (err error) {
418 438
 	var _p0 *byte
419 439
 	_p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1625 1645
 
1626 1646
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627 1647
 
1628
-func Setrlimit(which int, lim *Rlimit) (err error) {
1629
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1630
-	if e1 != 0 {
1631
-		err = errnoErr(e1)
1632
-	}
1633
-	return
1634
-}
1635
-
1636
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
-
1638 1648
 func Setsid() (pid int, err error) {
1639 1649
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1640 1650
 	pid = int(r0)

+ 20
- 10
vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go View File

@@ -388,6 +388,16 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
388 388
 
389 389
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390 390
 
391
+func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
392
+	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
393
+	if e1 != 0 {
394
+		err = errnoErr(e1)
395
+	}
396
+	return
397
+}
398
+
399
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
+
391 401
 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
392 402
 	var _p0 unsafe.Pointer
393 403
 	if len(mib) > 0 {
@@ -414,6 +424,16 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
414 424
 
415 425
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
416 426
 
427
+func ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {
428
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
429
+	if e1 != 0 {
430
+		err = errnoErr(e1)
431
+	}
432
+	return
433
+}
434
+
435
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
+
417 437
 func Access(path string, mode uint32) (err error) {
418 438
 	var _p0 *byte
419 439
 	_p0, err = BytePtrFromString(path)
@@ -1625,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
1625 1645
 
1626 1646
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627 1647
 
1628
-func Setrlimit(which int, lim *Rlimit) (err error) {
1629
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1630
-	if e1 != 0 {
1631
-		err = errnoErr(e1)
1632
-	}
1633
-	return
1634
-}
1635
-
1636
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
-
1638 1648
 func Setsid() (pid int, err error) {
1639 1649
 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1640 1650
 	pid = int(r0)

+ 21
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux.go View File

@@ -379,6 +379,16 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
379 379
 
380 380
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
381 381
 
382
+func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
383
+	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
384
+	if e1 != 0 {
385
+		err = errnoErr(e1)
386
+	}
387
+	return
388
+}
389
+
390
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
391
+
382 392
 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
383 393
 	var _p0 *byte
384 394
 	_p0, err = BytePtrFromString(arg)
@@ -537,6 +547,17 @@ func Chroot(path string) (err error) {
537 547
 
538 548
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
539 549
 
550
+func ClockAdjtime(clockid int32, buf *Timex) (state int, err error) {
551
+	r0, _, e1 := Syscall(SYS_CLOCK_ADJTIME, uintptr(clockid), uintptr(unsafe.Pointer(buf)), 0)
552
+	state = int(r0)
553
+	if e1 != 0 {
554
+		err = errnoErr(e1)
555
+	}
556
+	return
557
+}
558
+
559
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
560
+
540 561
 func ClockGetres(clockid int32, res *Timespec) (err error) {
541 562
 	_, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
542 563
 	if e1 != 0 {
@@ -1325,16 +1346,6 @@ func PivotRoot(newroot string, putold string) (err error) {
1325 1346
 
1326 1347
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327 1348
 
1328
-func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
1329
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
1330
-	if e1 != 0 {
1331
-		err = errnoErr(e1)
1332
-	}
1333
-	return
1334
-}
1335
-
1336
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1337
-
1338 1349
 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
1339 1350
 	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
1340 1351
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go View File

@@ -411,16 +411,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
411 411
 
412 412
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
413 413
 
414
-func setrlimit(resource int, rlim *rlimit32) (err error) {
415
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
416
-	if e1 != 0 {
417
-		err = errnoErr(e1)
418
-	}
419
-	return
420
-}
421
-
422
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
423
-
424 414
 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
425 415
 	var _p0 *byte
426 416
 	_p0, err = BytePtrFromString(path)

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go View File

@@ -334,16 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
334 334
 
335 335
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336 336
 
337
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
338
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
339
-	if e1 != 0 {
340
-		err = errnoErr(e1)
341
-	}
342
-	return
343
-}
344
-
345
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
346
-
347 337
 func Shutdown(fd int, how int) (err error) {
348 338
 	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
349 339
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go View File

@@ -578,16 +578,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
578 578
 
579 579
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
580 580
 
581
-func setrlimit(resource int, rlim *rlimit32) (err error) {
582
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
583
-	if e1 != 0 {
584
-		err = errnoErr(e1)
585
-	}
586
-	return
587
-}
588
-
589
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
590
-
591 581
 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
592 582
 	_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
593 583
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go View File

@@ -289,16 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
289 289
 
290 290
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
291 291
 
292
-func setrlimit(resource int, rlim *Rlimit) (err error) {
293
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
294
-	if e1 != 0 {
295
-		err = errnoErr(e1)
296
-	}
297
-	return
298
-}
299
-
300
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
301
-
302 292
 func Shutdown(fd int, how int) (err error) {
303 293
 	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
304 294
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go View File

@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
644 644
 
645 645
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
646 646
 
647
-func setrlimit(resource int, rlim *rlimit32) (err error) {
648
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
649
-	if e1 != 0 {
650
-		err = errnoErr(e1)
651
-	}
652
-	return
653
-}
654
-
655
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
656
-
657 647
 func Alarm(seconds uint) (remaining uint, err error) {
658 648
 	r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
659 649
 	remaining = uint(r0)

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go View File

@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
278 278
 
279 279
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
280 280
 
281
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
282
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
283
-	if e1 != 0 {
284
-		err = errnoErr(e1)
285
-	}
286
-	return
287
-}
288
-
289
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
290
-
291 281
 func Shutdown(fd int, how int) (err error) {
292 282
 	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
293 283
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go View File

@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
278 278
 
279 279
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
280 280
 
281
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
282
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
283
-	if e1 != 0 {
284
-		err = errnoErr(e1)
285
-	}
286
-	return
287
-}
288
-
289
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
290
-
291 281
 func Shutdown(fd int, how int) (err error) {
292 282
 	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
293 283
 	if e1 != 0 {

+ 0
- 10
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go View File

@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
644 644
 
645 645
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
646 646
 
647
-func setrlimit(resource int, rlim *rlimit32) (err error) {
648
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
649
-	if e1 != 0 {
650
-		err = errnoErr(e1)
651
-	}
652
-	return
653
-}
654
-
655
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
656
-
657 647
 func Alarm(seconds uint) (remaining uint, err error) {
658 648
 	r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
659 649
 	remaining = uint(r0)

+ 0
- 0
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save