Re: Patch: CPU RNG framework with stub x86 implementation

Andrew Cagney <[email protected]> Mon, 11 Jan 2016 19:58:09 -0500
Newsgroups gmane.os.netbsd.devel.crypto,gmane.os.netbsd.devel.security,gmane.os.netbsd.devel.kernel
Message-ID <CAJeAr6uU_XyssH5Dm0h0UHome=Q9manKrjvP3RegbUhDGjTczw@mail.gmail.com>
On 10 January 2016 at 21:08, Thor Lancelot Simon <[email protected]> wrote:
> As requested - here's just "cpu_rng" itself for review.  I believe this
> version addresses all comments received so far except that I _like_ the
> construct "size_t cnt = <constant>; type_t foo[x]" so I've retained
> that.

According to that ever reliable wikipedia :-)

+ size_t cnt = 2 * RND_ENTROPY_THRESHOLD / sizeof(cpu_rng_t);
+ cpu_rng_t buf[cnt];

variable-length arrays were added in C99, but subsequently, in C11,
were relegated to a conditional feature which implementations are not
required to support.