Skip to content

Fix broken rdrand implementation - #154

Merged
bors[bot] merged 1 commit into
hermit-os:masterfrom
josephlr:master
Jan 15, 2021
Merged

bors[bot] merged 1 commit into
hermit-os:masterfrom
josephlr:master

Conversation

@josephlr

Copy link
Copy Markdown
Contributor

_rdrand{32,64}_step returns 1 on success and zero on failure. See:
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rdrand64_step&expand=4539

This means that the current implementation will actually hang on most processors:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=716f8f6a77ab6be76800ff7ee5d37970

This fixes the implementation to use the reccomdendation from the Intel SDM.

Signed-off-by: Joe Richey joerichey@google.com

_rdrand{32,64}_step returns 1 on success and zero on failure. See:
  https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rdrand64_step&expand=4539

This means that the current implementation will actually hang on most processors:
  https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=716f8f6a77ab6be76800ff7ee5d37970

This fixes the implementation to use the reccomdendation from the Intel SDM.

Signed-off-by: Joe Richey <joerichey@google.com>
@stlankes

Copy link
Copy Markdown
Contributor

bors r+

@bors

bors Bot commented Jan 15, 2021

Copy link
Copy Markdown
Contributor

@bors
bors Bot merged commit e843dac into hermit-os:master Jan 15, 2021
simonschoening pushed a commit to simonschoening/libhermit-rs that referenced this pull request Aug 26, 2021
154: Fix broken rdrand implementation r=stlankes a=josephlr

_rdrand{32,64}_step returns 1 on success and zero on failure. See:
  https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rdrand64_step&expand=4539

This means that the current implementation will actually hang on most processors:
  https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=716f8f6a77ab6be76800ff7ee5d37970

This fixes the implementation to use the reccomdendation from the Intel SDM.

Signed-off-by: Joe Richey <joerichey@google.com>

Co-authored-by: Joe Richey <joerichey@google.com>
artyomevgrafov pushed a commit to artyomevgrafov/kernel that referenced this pull request Nov 19, 2026
154: build(deps): bump anyhow from 1.0.58 to 1.0.59 r=mkroening a=dependabot[bot]

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.58 to 1.0.59.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.59</h2>
<ul>
<li>Update crates.io metadata to include <code>no-std</code> category</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dtolnay/anyhow/commit/fb9fb18436c9394830211abaa8060be45fcdf65c"><code>fb9fb18</code></a> Release 1.0.59</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/f58e803c49d81f75b88f45364d2ded671eb5e2ca"><code>f58e803</code></a> Add no-std category to crates.io metadata</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/8f268ac7b14d6f6901a7b21494fb2961327fbcdc"><code>8f268ac</code></a> Sort package entries in Cargo.toml</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/c0e78544a68353edfb417f3a6e58d127e4348ac7"><code>c0e7854</code></a> Ignore assertions_on_result_states clippy lint</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/b5946687724afb6d24ba55fc5e8ad79e824b5d83"><code>b594668</code></a> Update ui test suite to nightly-2022-07-28</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/13e7a901517873e8122605fa729bb0aea54c06e9"><code>13e7a90</code></a> Revert &quot;Disable backtrace test on miri&quot;</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/8d25d6b2c9bb04c9f0d222ed6b900f696c0e7ebe"><code>8d25d6b</code></a> Disable backtrace test on miri</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/ffb25df68acb80ddf195f5e3a91eeb0b66e2b014"><code>ffb25df</code></a> Update ui test suite to nightly-2022-07-20</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/38c883ba1fbab64f5017ec5a06055973d2021ea2"><code>38c883b</code></a> Ignore explicit_auto_deref clippy lint</li>
<li><a href="https://github.com/dtolnay/anyhow/commit/90545992d8408dcd08a7942096641187985af2ad"><code>9054599</code></a> Update ui test suite to nightly-2022-07-02</li>
<li>Additional commits viewable in <a href="https://github.com/dtolnay/anyhow/compare/1.0.58...1.0.59">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.58&new-version=1.0.59)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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