Re: [PATCH v6 2/3] random: introduce generic vDSO getrandom() implementation

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

 



* Jason A. Donenfeld:

>   static void *vgetrandom_alloc(size_t *num, size_t *size_per_each, unsigned int flags)
>   {
>     unsigned long ret = syscall(__NR_vgetrandom_alloc, num, size_per_each, flags);
>     return ret > -4096UL ? NULL : (void *)ret;
>   }

The traditional syscall function returns -1 on error and set errors, so
using unsing long and the 4096 is quite misleading.

Thanks,
Florian




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux