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

Add (opt-in) vDSO support for getrandom? #1185

Open
newpavlov opened this issue Oct 16, 2024 · 1 comment
Open

Add (opt-in) vDSO support for getrandom? #1185

newpavlov opened this issue Oct 16, 2024 · 1 comment

Comments

@newpavlov
Copy link
Contributor

This Go issue can be used as a reference: golang/go#69577

@sunfishcode
Copy link
Member

sunfishcode commented Oct 16, 2024

I'm not familar with this feature yet, so I'd appreciate any guidance from anyone who is is.

At a quick glance at the glibc patch, it has special handling in pthread_create and fork. If rustix has its own implementation, it's not immediately clear how rustix should handle this, since it isn't in charge of thread creation and cleanup.

One option would be for rustix to just have a minimal wrapper around the vDSO function, rather than providing a full-service getrandom, and just require the main state management code to live elsewhere. That's relatively easy to do, and I imagine something like origin would be able to do the state management because it can assume it's in charge of all thread and process creation, however it's not clear that anything else could.

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

No branches or pull requests

2 participants