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

os.rs: fix wrong syscall number for PowerPC #589

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

LionNatsu
Copy link
Contributor

__NR_getrandom is 359 on PowerPC, added from torvalds/linux@7d59deb50aa v3.17-rc5.
The bug was introduced from 05f23d2 3 years ago, affecting from 0.1.1 to before 0.5.0-pre.0.
It has already been fixed on the 0.5 branch at 00713a6 so this is a backport.

__NR_getrandom is 359 on PowerPC, added from torvalds/linux@7d59deb50aa v3.17-rc5.
The bug was introduced from 05f23d2 3 years ago, affecting from 0.1.1 to before 0.5.0-pre.0.
It has already been fixed on the 0.5 branch at 00713a6 so this is a backport.
@dhardy
Copy link
Member

dhardy commented Aug 15, 2018

Looks okay. But presumably this means you want a fix against the 0.4 branch — is there a reason you haven't migrated to 0.5 yet?

@AppVeyorBot
Copy link

Build rand 1.0.62 completed (commit 6c83d3bc12 by @LionNatsu)

@LionNatsu
Copy link
Contributor Author

AFAICT, https://static.rust-lang.org/rustup/dist/powerpc-unknown-linux-gnu/rustup-init installs a rustc (1.28.0 (9634041f0 2018-07-30)) with rand 0.4 so it just simply doesn't work at all.

@LionNatsu
Copy link
Contributor Author

LionNatsu commented Aug 15, 2018

You may want to see this, what I got with RUST_BACKTRACE=full compiling a simple Hello World program: https://pastebin.aosc.io/paste/N8gtYUiT2eVgTpEu1145Vw

"Operation not permitted (os error 1)" is because the number was wrong and it actually called pkey_alloc() which is another syscall added to kernel 7 months ago.

@dhardy
Copy link
Member

dhardy commented Aug 15, 2018

Okay. I don't understand why there's a dependency on Rand 0.4 there, but it looks like a hot-fix for that series is the easiest option. (This also requires updating the version number and changelog.)

@dhardy dhardy merged commit ada66a8 into rust-random:0.4 Aug 16, 2018
@LionNatsu LionNatsu deleted the patch-2 branch August 16, 2018 11:24
@dhardy
Copy link
Member

dhardy commented Aug 16, 2018

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.

3 participants