[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v1] libxl: use getrandom() syscall for random data extraction


On 26/05/2021 10:31, Sergiy Kibrik wrote:
Hi Julien,

  From the man:

         getrandom() was introduced in version 3.17 of the Linux kernel.
   Support was added to glibc in version 2.25.

If I am not mistaken glibc 2.25 was released in 2017. Also, the call was only
introduced in FreeBSD 12.

So I think we want to check if getrandom() can be used. We may also want to
consider to fallback to read /dev/urandom if the call return ENOSYS.

You mean its availability should be checked both at build and runtime?

Correct. You can have a libc suporting getrandom() but a kernel that doesn't provide the syscall.


Julien Grall



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.