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

Don't block in getrandom() detection #26

Merged
merged 1 commit into from
Jun 10, 2019

Commits on Jun 10, 2019

  1. Don't block in getrandom() detection

    On Linux, we detect if `getrandom` is present by calling getrandom with
    an empty buffer and seeing if `ENOSYS` is returned. However, even with
    an empty buffer, this call will block unless we explicitly pass a flag.
    
    This can be seen in the source for `getrandom`:
      https://elixir.bootlin.com/linux/v5.1.8/source/drivers/char/random.c#L2043
    
    This change adds a boolean parameter to `syscall_getrandom` to control
    the blocking behavior. We now don't block in initialization, but do
    block when actually reading random data.
    josephlr committed Jun 10, 2019
    Configuration menu
    Copy the full SHA
    7e21aee View commit details
    Browse the repository at this point in the history