Support vgetrandom
on Linux 6.11+
#21590
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
os-linux
standard library
This issue involves writing Zig code for the standard library.
Milestone
Linux 6.11 added
getrandom
to the vdso. The supported architectures are:The API is:
Note that it isn't as simple as calling
vgetrandom
, callers need to pre-allocate memory to pass to the syscall.Go recently implemented support in golang/go/issues/69577 (see https://go-review.googlesource.com/c/go/+/614835 for the patchset). Note that this impl allocates a pool of states per the number of CPUs, and uses a lock to fetch an unused state.
The text was updated successfully, but these errors were encountered: