unix: add Getrandom syscall bindings and flags
This CL introduces the Getrandom syscall. Allowing users of
sufficiently new kernels (3.17) to detect when the operating system
lacks enough entropy to generate cryptographic random data. See:
As we have updated the syscall numbers, the Getrandom function can
just be generated normally. The only other change is to mkerrors.sh
to include the GRND_* flags for getrandom from <linux/random.h>.
It is important to note that currently the mkerrors.sh script cannot
actually be run as it has fallen behind the 4.10 kernel. The GRND_*
flags were added manually.
This was originally part of a larger commit that was split up.
See CL: https://go-review.googlesource.com/37570
Reviewed-by: Matt Layher <firstname.lastname@example.org>
Reviewed-by: Ian Lance Taylor <email@example.com>
Run-TryBot: Matt Layher <firstname.lastname@example.org>
Run-TryBot: Ian Lance Taylor <email@example.com>
TryBot-Result: Gobot Gobot <firstname.lastname@example.org>
26 files changed