Re: Patch: CPU RNG framework with stub x86 implementation
Thor Lancelot Simon <[email protected]> Mon, 11 Jan 2016 21:59:20 -0500
| Newsgroups | gmane.os.netbsd.devel.crypto,gmane.os.netbsd.devel.security,gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jan 11, 2016 at 07:58:09PM -0500, Andrew Cagney wrote: > 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. That's not a variable-length array. -- Thor Lancelot Simon [email protected] "We cannot usually in social life pursue a single value or a single moral aim, untroubled by the need to compromise with others." - H.L.A. Hart