-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all: stop using indirect system calls on openbsd #63900
Comments
Change https://go.dev/cl/538736 mentions this issue: |
On openbsd, call getfsstat directly via libc, instead of calling it via syscall.Syscall. Updates #63900 Change-Id: Ib4c581160b170e6cc6017c42e959e647d97ac993 Reviewed-on: https://go-review.googlesource.com/c/go/+/538736 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Josh Rickmar <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Joel Sing <[email protected]>
Change https://go.dev/cl/468095 mentions this issue: |
Change https://go.dev/cl/538995 mentions this issue: |
I would perhaps reword this issue, as "direct system calls" could be misinterpreted to mean applications performing syscall instructions in their text, instead of using the particular libc stubs. When we started requiring libc for system calls in dynamically linked executables, that was also referred to switching away from "direct system calls": #36435. |
Future OpenBSD releases will remove the syscall(2) interface. This converts the Pledge and Unveil calls to use pledge(2) and unveil(2) from libc, rather than indirectly through syscall(2). Updates golang/go#63900. Change-Id: I61e22d8f52f16c8f5e4c0717acae0d5bf4271503 GitHub-Last-Rev: ebc0461 GitHub-Pull-Request: #146 Reviewed-on: https://go-review.googlesource.com/c/sys/+/468095 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]> Reviewed-by: Joel Sing <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Run-TryBot: Joel Sing <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Aaron Bieber <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
Change https://go.dev/cl/538976 mentions this issue: |
On openbsd, call getfsstat directly via libc, instead of calling it via syscall.Syscall. Updates golang/go#63900 Change-Id: I99a3555b3207754b107dbabf63440569fca93eea Reviewed-on: https://go-review.googlesource.com/c/sys/+/538976 Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Joel Sing <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Josh Rickmar <[email protected]> Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Future OpenBSD releases will remove the syscall(2) interface. This converts the Fcntl functions to use fcntl(2) from libc, rather than indirectly through syscall(2). Updates golang/go#63900.
Future OpenBSD releases will remove the syscall(2) interface. This converts the Fcntl functions to use fcntl(2) from libc, rather than indirectly through syscall(2). Updates golang/go#63900. Change-Id: I50c3b91cb40245653c772e65b0b15c625974bebe GitHub-Last-Rev: 9c62104 GitHub-Pull-Request: #179 Reviewed-on: https://go-review.googlesource.com/c/sys/+/538995 Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Joel Sing <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Joel Sing <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]>
Naming and descriptions are hard - in this case, we are moving from "indirect system calls" (i.e. I've retitled #36435 to explicitly state "non-libc system calls", which is hopefully clearer. |
Change https://go.dev/cl/540020 mentions this issue: |
Change https://go.dev/cl/540019 mentions this issue: |
Change https://go.dev/cl/540018 mentions this issue: |
Provide fcntlPtr for all BSD platforms, then use this for FcntlFlock. This reduces darwin and openbsd specific code, as well as avoiding the use of an indirect system call on OpenBSD. Updates #63900 Change-Id: I5c701f0d8413fab5477b9e21381395621d1fb6d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/540018 Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Run-TryBot: Joel Sing <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Josh Rickmar <[email protected]>
Provide ioctlPtr for all BSD platforms, then use this for BPF. This reduces darwin specific code, as well as avoiding the use of an indirect system call on OpenBSD. Updates #63900 Change-Id: I81f3e74a3149150abe972f106903310e3cf26929 Reviewed-on: https://go-review.googlesource.com/c/go/+/540019 Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Joel Sing <[email protected]> Reviewed-by: Josh Rickmar <[email protected]>
Change https://go.dev/cl/572155 mentions this issue: |
Provide appropriate implementations of internal/syscall/unix.Tcsetpgrp and use this for runSessionLeader in os/signal/signal_cgo_test.go. This avoids calling syscall.Syscall with SYS_IOCTL on BSDs. Updates #59667 Updates #63900 Change-Id: Ifa4696bba9f1eb68e81e7103f030bc254adaf0af Reviewed-on: https://go-review.googlesource.com/c/go/+/540020 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Joel Sing <[email protected]>
Provide appropriate implementations of Tc{get,set}pgrp and export these for use in the TestForeground* tests in exec_unix_test.go. This avoids calling ioctl via syscall.Syscall on BSDs. Fixes #59667 Updates #63900 Change-Id: Ice4dcedae1f0931c026bddf33043d3864a52d44e Reviewed-on: https://go-review.googlesource.com/c/go/+/572155 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Joel Sing <[email protected]>
Change https://go.dev/cl/582255 mentions this issue: |
Change https://go.dev/cl/582257 mentions this issue: |
Change https://go.dev/cl/582256 mentions this issue: |
…bsd/amd64 Unfortunately, LLVM TSAN decided to remove OpenBSD support, which means that the syso files cannot currently be regenerated (see #52090). The race_openbsd.syso contains a reference to the syscall symbol, which has been removed from OpenBSD's libc in 7.5. As such, this means that the race detector no longer works on openbsd/amd64 (at least until LLVM TSAN support is reinstated for OpenBSD). Updates #63900 Change-Id: I3474fc43a94e5197815862b7dc420b71d5e08815 Reviewed-on: https://go-review.googlesource.com/c/go/+/582255 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Joel Sing <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
OpenBSD 7.5 no longer supports indirect syscalls. A number of Go packages make use of syscall.Syscall with SYS_IOCTL or SYS_SYSCTL, since neither is well supported by golang.org/x/sys/unix. Reroute calls with either of these system call numbers to the respective libc stub so that they continue to work. Updates #63900 Change-Id: I3323a3fa311ee9227e6220417834253763866881 Reviewed-on: https://go-review.googlesource.com/c/go/+/582256 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
The indirect syscall call interface (syscall(2)) will be removed from OpenBSD, most likely before the 7.5 release. This effectively means that Go's
syscall.Syscall*
interfaces will no longer work on this platform and that direct system calls (using the appropriate libc system call stub) will need to be used instead.The text was updated successfully, but these errors were encountered: