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

RFE: add vgetrandom_alloc() #395

Closed
wants to merge 1 commit into from

Conversation

zx2c4
Copy link

@zx2c4 zx2c4 commented Nov 24, 2022

This is required to use vDSO-accelerated getrandom().

Don't merge this yet. It hasn't landed upstream, and as of writing is at v17: https://lore.kernel.org/lkml/[email protected]/

zx2c4 added a commit to zx2c4-forks/systemd that referenced this pull request Nov 24, 2022
This is required to use vDSO-accelerated getrandom().

Don't merge this yet. It hasn't landed upstream, and as of writing is at
v7: https://lore.kernel.org/lkml/[email protected]/T

This also needs seccomp/libseccomp#395.
@drakenclimber drakenclimber marked this pull request as draft December 30, 2022 19:53
@drakenclimber
Copy link
Member

Per @zx2c4's comment, I'm moving this to draft. @zx2c4 - feel free to move this back to "ready to review" when it lands upstream. Thanks

@pcmoore pcmoore changed the title syscalls: add vgetrandom_alloc RFE: add vgetrandom_alloc() Jan 11, 2023
@pcmoore
Copy link
Member

pcmoore commented Feb 6, 2023

@drakenclimber @zx2c4 given the (relative) ease of updating the libseccomp syscall tables these days, one might as well do a full syscall table update instead of adding just a single syscall.

For example, the following can be used to update the syscall table for the kernel sources checked out in <kernel_source_dir>. The only gotcha is that syscalls that are not universally supported on all arches need a manual PNR define in "include/seccomp-syscalls.h".

% make check-build
% cd src
% ./arch-syscall-validate -c syscall.csv <kernel_source_dir>

@pcmoore
Copy link
Member

pcmoore commented Mar 31, 2023

@zx2c4 any updates on this? I'm tempted to close this out as it looks like it still hasn't landed in Linus' tree and we would normally just pick this up via the usual syscall update process, but it would be nice to hear from you first.

@zx2c4
Copy link
Author

zx2c4 commented Mar 31, 2023

No not yet. I'll let you know when it is.

This is required to use vDSO-accelerated getrandom().

Don't merge this yet. It hasn't landed upstream, and as of writing is at
v16: https://lore.kernel.org/lkml/[email protected]/

Signed-off-by: Jason A. Donenfeld <[email protected]>
semaphore-ci-cd bot pushed a commit to systemd/systemd that referenced this pull request May 28, 2024
This is required to use vDSO-accelerated getrandom().

Don't merge this yet. It hasn't landed upstream, and as of writing is at
v7: https://lore.kernel.org/lkml/[email protected]/T

This also needs seccomp/libseccomp#395.
@zx2c4
Copy link
Author

zx2c4 commented Jul 29, 2024

The syscall side of things wasn't required in the end.

@zx2c4 zx2c4 closed this Jul 29, 2024
@zx2c4 zx2c4 deleted the vgetrandom_alloc branch July 29, 2024 14:34
@pcmoore
Copy link
Member

pcmoore commented Jul 29, 2024

Thanks for this regardless. It ended up just being a new mmap() flag, yes?

@zx2c4
Copy link
Author

zx2c4 commented Jul 29, 2024

https://lwn.net/SubscriberLink/983186/d37da11dfd53f1c4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants