Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entropy adjustments: check return value of rdrand/rdseed (and retry up to 10 times), cope with AMD ryzen 3000 bug #17

Merged
merged 4 commits into from
Feb 27, 2020

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Feb 26, 2020

check rdrand and rdseed return values (CR=1), as recommended by Intel (https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide)

detect bad rdrand on ryzen 3000 (which returns all-ones) and disable there

src/native/entropy_cpu_stubs.c Outdated Show resolved Hide resolved
src/native/entropy_cpu_stubs.c Show resolved Hide resolved
@hannesm hannesm requested a review from cfcs February 27, 2020 09:16
Copy link
Collaborator

@cfcs cfcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this, LGTM :)

src/native/entropy_cpu_stubs.c Show resolved Hide resolved
@hannesm hannesm merged commit 8505050 into mirage:master Feb 27, 2020
@hannesm hannesm deleted the entropy-fixes branch February 27, 2020 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants