7 Commits
Author SHA1 Message Date
Adin ScannellandgVisor bot bd561fd3f9 Move from facts render to facts validation.
This allows fact information to be validated in the underlying source files,
but requires us to explicitly maintain this in appropriate version-tagged, and
architecture-tagged files. This is more explicit and safer.

This mechanism uses a special regular expression for matching a +checkconst
stanza to validate constant values, sizes and offsets. This applies to both Go
source files and assembly files.

PiperOrigin-RevId: 511867507
2023-02-23 13:17:49 -08:00
Rahat MahmoodandgVisor bot ef96e9328e Disable io_uring syscalls by default.
The current io_uring support is very limited and experimental. Disable
it by default, and add a flag to enable it for testing.

PiperOrigin-RevId: 500760451
2023-01-09 11:11:57 -08:00
Sergey MadaminovandgVisor bot 60f83d99ea io_uring_enter: adding support for READV operation.
Handling NOP operations helped us to introduce facilities to process submission
requests. Now we can proceed to adding more meaningful operations. The logical
choice for the first one is the READV operation as it is a next operation after
NOP and it is also used for the cat-like application example based of IO_URING.

PiperOrigin-RevId: 487615618
2022-11-10 12:54:50 -08:00
Sergey MadaminovandgVisor bot 9ae2eea3ba io_uring_enter with NOP implementation for the IO_URING.
With io_uring_setup() and mmap() we can proceed with implementing a simplest
operation, namely, NOP. Once we make sure that we can send this command and
receive a response from the gVisor, we can move forward to read operation.

PiperOrigin-RevId: 485106019
2022-10-31 11:39:18 -07:00
Adin ScannellandgVisor bot 2928c19239 Move to code generation rather than reflection for io_uring offsets.
This avoids the cost at startup time and allows the resulting function to
be more effectively inlined to call sites. Although these are not widely
used at the moment, this change may also be used as an example for code
generation in similar cases.

PiperOrigin-RevId: 477597333
2022-09-28 17:53:21 -07:00
Sergey MadaminovandgVisor bot 05e7c2fceb mmap() implementation for the IO_URING.
Once the user receives a file descriptor from `io_uring_setup()`, it will be
used for the subsequent `mmap()` calls. Thus, we need to add support for it in
our iouringfs.

PiperOrigin-RevId: 477318038
2022-09-27 17:44:25 -07:00
Sergey MadaminovandgVisor bot 31d8668e51 Pseudo-filesystem iouringfs for IO_URING.
Similar to Linux, we should add pseudo-filesystem iouringfs in gVisor to back
IO_URING's file descriptors. We start with stubbing `io_uring_setup(2)` so it
provides a file descriptor backed by anonfs.

PiperOrigin-RevId: 473384042
2022-09-09 18:09:29 -07:00