btashton opened a new pull request #971: URL: https://github.com/apache/incubator-nuttx/pull/971
## Summary This restores the functionally of `/dev/random` for x86_64 which was using the rdrand intrinsics incorrectly. They are defined by Intel here: https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-rdrand16-step-rdrand32-step-rdrand64-step ## Impact rdrand was checking the wrong return value for the intrinsics so it would block forever. The read function was also not returning the actual number of bytes read, if you read 8 you would get 2 back. ## Testing This was tested by running the rand example application NuttShell (NSH) NuttX-9.0.0 nsh>rand Reading 8 random numbers Random values (0x101584f70): 0000: 019a172df7d539f2df8550362e2d3f74 9b467c51ebe30b9f6510e540e34fabcc ...-..9...P6.-?t .F|[email protected].. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
