----- Mail original ----- > De: "Andy Polyakov" <[email protected]> > À: [email protected] > Envoyé: Mercredi 5 Juin 2013 11:27:43 > Objet: Re: [PATCH][RFC] CPU Jitter random number generator > > > And do switch on optimization. > > Ironically other references found elsewhere suffer from very same > problem. E.g. HAVEGE discussed possibilities of "collecting > uncertainty > from branch predictor" with "if (A==0) A++; else A--;" but fails to > recognize that compiler is free to use conditional move instruction, > i.e. generate branch-free code. Another discusses > > for(j=0; j< w; j++){ > x1=l; > x2=x1*l; > x3=x1*l; > x3--; > dummy+=x3*x2/4; > } > > but fails to recognize that compiler is free to *eliminate* the loop > as > dummy+=w*(l*l*(l*l-1)/4).
This page http://www.issihosts.com/haveged/history.html#havege talk a bit about the optimization issue that may happen with haveged. Gilles ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
