File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22079,12 +22079,8 @@ Long dis_ESC_0F (
2207922079 if (fAddr == &amd64g_dirtyhelper_CPUID_avx2
2208022080 || fAddr == &amd64g_dirtyhelper_CPUID_avx_and_cx16) {
2208122081 Bool hasF16C = (archinfo->hwcaps & VEX_HWCAPS_AMD64_F16C) != 0;
22082- /* A deterministic RNG still serves RDRAND/RDSEED but hides them. */
22083- Bool advertiseRng = vex_random32 == NULL;
22084- Bool hasRDRAND = advertiseRng
22085- && (archinfo->hwcaps & VEX_HWCAPS_AMD64_RDRAND) != 0;
22086- Bool hasRDSEED = advertiseRng
22087- && (archinfo->hwcaps & VEX_HWCAPS_AMD64_RDSEED) != 0;
22082+ Bool hasRDRAND = (archinfo->hwcaps & VEX_HWCAPS_AMD64_RDRAND) != 0;
22083+ Bool hasRDSEED = (archinfo->hwcaps & VEX_HWCAPS_AMD64_RDSEED) != 0;
2208822084 args = mkIRExprVec_4(IRExpr_GSPTR(),
2208922085 mkIRExpr_HWord(hasF16C ? 1 : 0),
2209022086 mkIRExpr_HWord(hasRDRAND ? 1 : 0),
Original file line number Diff line number Diff line change @@ -689,8 +689,7 @@ extern void LibVEX_Init (
689689);
690690
691691/* Install before guest execution. NULL preserves host RDRAND/RDSEED.
692- Otherwise CPUID hides them, and they return bits from this callback,
693- which runs on the executing guest thread. */
692+ The callback runs on the executing guest thread and returns 32 random bits. */
694693extern void LibVEX_SetRandom32 ( UInt (* random32 )(void ) );
695694
696695
Original file line number Diff line number Diff line change @@ -810,11 +810,10 @@ in most cases. We group the available options by rough categories.</para>
810810 <computeroutput >/dev/random</computeroutput > and
811811 <computeroutput >/dev/urandom</computeroutput > (resolved
812812 through <computeroutput >/proc/self/fd</computeroutput >, so
813- symlinks count). On amd64, CPUID does not report
814- <computeroutput >RDRAND</computeroutput > and
815- <computeroutput >RDSEED</computeroutput >. On hosts that support them,
816- programs that execute them anyway draw from the calling thread's PRNG
817- stream, which always reports success. On arm64,
813+ symlinks count). On amd64, <computeroutput >RDRAND</computeroutput >
814+ and <computeroutput >RDSEED</computeroutput > draw from the calling
815+ thread's PRNG stream and always report success. CPUID still
816+ reports them only when the host supports them. On arm64,
818817 <computeroutput >RNDR</computeroutput > and
819818 <computeroutput >RNDRRS</computeroutput > draw from the same stream and
820819 always report success, also on hosts without FEAT_RNG.
Original file line number Diff line number Diff line change 1- cpuid rdrand: 0
2- cpuid rdseed: 0
1+ cpuid rdrand: 1
2+ cpuid rdseed: 1
33rdrand16: 555555555555d78e
44rdrand16: 555555555555b519
55rdrand32: 00000000131a7a6b
You can’t perform that action at this time.
0 commit comments