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
runtime, syscall: use get_random_bytes syscall instead of SRPC on NaCl #9870
Comments
I think this is a good idea. I'm almost certain that the nacl/arm builder On Sat, Feb 14, 2015 at 9:40 AM, James Robinson notifications@github.com
|
Great! Do you know if the other builders require something that new? |
I had a quick look at the scripts which generate the base vm image for the https://github.com/golang/build/blob/master/env/linux-x86-nacl/scripts/build-go-builder.sh @bradfiz which pepper version were those components taken from ? As for the nacl/arm build, that runs on a dev board on my desk, I can On Sat, Feb 14, 2015 at 10:00 AM, James Robinson notifications@github.com
|
I wrote a patch: https://go-review.googlesource.com/#/c/4860/ but gerrit gold me somebody already did this: https://go-review.googlesource.com/#/c/1755/1 (probably better) |
And this issue is a dupe of issue 9261 (which I didn't find since it doesn't have the os-nativeclient label). |
Yes, it's a dupe of #9261. |
Native Client has a get_random_bytes syscall supported since pepper_39 that can be used to generate random bytes:
https://code.google.com/p/chromium/codesearch#chromium/src/native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h&sq=package:chromium&type=cs&l=128&rcl=1423805234
The nacl IRT calls it thusly:
https://code.google.com/p/chromium/codesearch#chromium/src/native_client/src/untrusted/irt/irt_random.c&sq=package:chromium&type=cs&q=get_random_bytes&l=20
If we're OK with depending on this (which means running on sel_ldrs from pepper_39 or newer) then we can call this directly instead of going through SRPC to look up the SecureRandom service. It appears that this is the only use of srpc in go, so we could additionally remove the SRPC support entirely as newer nacl features are not exported in this manner.
The text was updated successfully, but these errors were encountered: