Instead of truncating iovecs when len(iovecs) > MaxReadWriteIov, we should
attempt a full write. There are multiple users of hostfd:
- tmpfs (when using file backend)
- gofer client
- hostinet
- fsimpl/host
These callers use hostfd to implement all read/write operations. Even though
read/write syscall semantics allow for short IO, Linux seems to be doing full
reads/writes. For compatibility, hostfd should attempt full IO.
PiperOrigin-RevId: 582050290
Starting with Go 1.21, build tags select the language version. We currently
have several `go:build go1.1` tags, which were intended to act as "true" tags.
But that will break with 1.21. So replace them with "!false".
Fixes#9568.
PiperOrigin-RevId: 576020779
The syscall package has been deprecated in favor of golang.org/x/sys.
Note that syscall is still used in the following places:
- pkg/sentry/socket/hostinet/stack.go: some netlink related functionalities
are not yet available in golang.org/x/sys.
- syscall.Stat_t is still used in some places because os.FileInfo.Sys() still
returns it and not unix.Stat_t.
Updates #214
PiperOrigin-RevId: 360701387
Some code paths needed these syscalls anyways, so they should be included in
the filters. Given that we depend on these syscalls in some cases, there's no
real reason to avoid them any more.
PiperOrigin-RevId: 310829126