diff --git a/include/sys/random.h b/include/sys/random.h index 0e472d2d3eb..2d496c09bf1 100644 --- a/include/sys/random.h +++ b/include/sys/random.h @@ -50,12 +50,10 @@ * Name: getrandom * * Description: - * Fill a buffer of arbitrary length with randomness. This is the - * preferred interface for getting random numbers. The traditional - * /dev/random approach is susceptible for things like the attacker - * exhausting file descriptors on purpose. - * - * Note that this function cannot fail, other than by asserting. + * Fill a buffer of arbitrary length with randomness. This uses + * either /dev/random (if GRND_RANDOM flag) or /dev/urandom device and + * is therefore susceptible for things like the attacker exhausting file + * descriptors on purpose. * * Input Parameters: * bytes - Buffer for returned random bytes diff --git a/libs/libc/misc/lib_getrandom.c b/libs/libc/misc/lib_getrandom.c index 9b288f36064..c4e38f1eacb 100644 --- a/libs/libc/misc/lib_getrandom.c +++ b/libs/libc/misc/lib_getrandom.c @@ -36,12 +36,10 @@ * Name: getrandom * * Description: - * Fill a buffer of arbitrary length with randomness. This is the - * preferred interface for getting random numbers. The traditional - * /dev/random approach is susceptible for things like the attacker - * exhausting file descriptors on purpose. - * - * Note that this function cannot fail, other than by asserting. + * Fill a buffer of arbitrary length with randomness. This uses + * either /dev/random (if GRND_RANDOM flag) or /dev/urandom device and + * is therefore susceptible for things like the attacker exhausting file + * descriptors on purpose. * * Input Parameters: * bytes - Buffer for returned random bytes