go
go copied to clipboard
all: stop using indirect system calls on openbsd
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.
Change https://go.dev/cl/538736 mentions this issue: syscall: call getfsstat via libc on openbsd
Change https://go.dev/cl/468095 mentions this issue: unix: use libc stubs for OpenBSD pledge+unveil
Change https://go.dev/cl/538995 mentions this issue: unix: use fcntl(2) libc stub on OpenBSD
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.
Change https://go.dev/cl/538976 mentions this issue: syscall: call getfsstat via libc on openbsd
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.
Naming and descriptions are hard - in this case, we are moving from "indirect system calls" (i.e. syscall(2)
) to "direct system calls" albeit ones via the libc stubs. In this case we're already using the libc system call stubs, it is just that we're using syscall(2)
which provides indirect system calls, rather than using the libc system call stub for a specific system call.
I've retitled #36435 to explicitly state "non-libc system calls", which is hopefully clearer.
Change https://go.dev/cl/540020 mentions this issue: os/signal,syscall: avoid calling ioctl via syscall.Syscall on BSDs
Change https://go.dev/cl/540019 mentions this issue: syscall: provide and use ioctlPtr for all BSD platforms
Change https://go.dev/cl/540018 mentions this issue: syscall: provide and use fcntlPtr for all BSD platforms
Change https://go.dev/cl/572155 mentions this issue: syscall: export Tc{get,set}pgrp for testing
Change https://go.dev/cl/582255 mentions this issue: cmd/dist,internal/platform: temporarily disable race detector on openbsd/amd64
Change https://go.dev/cl/582257 mentions this issue: syscall: remove references to SYS_syscall on openbsd
Change https://go.dev/cl/582256 mentions this issue: syscall: reroute SYS_IOCTL and SYS_SYSCTL on openbsd