mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
76cc09b634294339fa19ec41b5f2a0b3932cea8b
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: http://man7.org/linux/man-pages/man2/getrandom.2.html 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 Change-Id: I464088a9c9f7224abdcdae476b30a4f2f412d9f5 Reviewed-on: https://go-review.googlesource.com/37589 Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Matt Layher <mdlayher@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This repository holds supplemental Go packages for low-level interactions with the operating system. To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
Languages
Go
85.8%
Assembly
12.3%
Shell
1.7%
C
0.1%