-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VDSO: Implements v6.11 vdso getrandom
This is an interesting vdso implementation because it only exists in x86-64 with kernel v6.11. For Arm64 the implementation is likely to land in a couple kernel versions from now. Some differences with vdso_getrandom versus the regular getrandom syscall - Has two additional arguments, opaque_state and opaque_len - Expects the userspace to mmap/munmap this opaque state structure - Lets userspace query information about this structure upfront - If the opaque data structure isn't provided then it falls back to regular SYS_getrandom With the "glibc" implementation, we can tell the interface to allocate a single page that gets unused (otherwise glibc ends up not using the interface), and fallback to the regular SYS_getrandom. In the case of the vdso interface, currently the arguments just get passed through. Keeping this as a WIP until the ARM64 kernel patches land and I can actually test the things. Running the "glibc" path works today with the selftest, but the vdso path is currently completely untested.
- Loading branch information
1 parent
f640dcc
commit 0f54369
Showing
6 changed files
with
82 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ VERSION { | |
clock_getres; | ||
__vdso_getcpu; | ||
getcpu; | ||
__vdso_getrandom; | ||
getrandom; | ||
local: *; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters