Skip to content

Use vDSO on Linux 6.11 #503

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
ericlagergren opened this issue Sep 28, 2024 · 3 comments
Closed

Use vDSO on Linux 6.11 #503

ericlagergren opened this issue Sep 28, 2024 · 3 comments

Comments

@ericlagergren
Copy link

See golang/go#69577

@newpavlov newpavlov transferred this issue from rust-random/rand Sep 28, 2024
@briansmith
Copy link
Contributor

I think this would be good to have opt-in for a while, while the DSO feature is being tested in the real world.

@newpavlov
Copy link
Member

This may be interesting in the context of #424, but otherwise I think we should just use libc::getrandom (maybe through dlopen in the backend with /dev/urandom fallback) and let it decide how the syscall is handled.

@newpavlov
Copy link
Member

Closing in favor of #508 and bytecodealliance/rustix#1185.

newpavlov added a commit that referenced this issue Oct 16, 2024
Use of `libc::getrandom` will automatically give us optimizations like
vDSO (#503) and can help with testing of fallback logic (#289).

It was also requested in #285. In that discussion we decided against
using this approach, but in the light of the vDSO optimization it may be
worth to reconsider it.

In `linux_android_with_fallback` use of `libc::syscall` is replaced by
`dlsym`-based code similar to what we use in the `netbsd` backend.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants