> See > https://github.com/openssl/openssl/commit/d6482a82bc2228327aa4ba98aeeecd9979542a31#diff-3aca3afd18ad75a8f6a09a9860bc6ef5R631 > > + volatile BN_ULONG *table = (volatile BN_ULONG *)buf; > > Why is `volatile` used here? Is it to work around the effective type > (strict aliasing) violations or for some other reason?
Isn't it obvious? Volatile is there to discourage compiler from reordering loads from the the table. I mean concern is that if reordered in specific manner loads might give away the information we are trying to conceal. > I think it would > be good to document this, or better, find a way to avoid needing to use > `volatile` in the first place. Well, the only guaranteed way is to implement it in assembly. Note that on most popular/relevant platform it *is* implemented in assembly. -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev