RocksDB development finds a CPU bug

23 points by eatonphil


bitshift

AMD was notified of a bug in “Zen 5” processors that may cause the RDSEED instruction to return 0 at a rate inconsistent with randomness [...] AMD has determined that the 16-bit and 32-bit forms of the RDSEED instruction on “Zen 5” processors are affected. The 64-bit form of RDSEED is not affected.

I'm really curious what's going on there! I would naively expect generating 32 random bits would be the same as generating 64 and masking off half of them. It's surprising that asking for less would increase the chance of failure.

Maybe because it's RDSEED and not RDRAND, they're trying to conserve entropy? And that makes the microcode for the 16/32-bit instructions more complex because they can't discard the unused bits?