vDSO getrandom() Ported To Five More CPU Architectures With Linux 6.12
Linux 6.11 introduced the getrandom() in the vDSO support for faster yet secure user-space random number generation needs. Initially that was focused on Linux x86_64 while for Linux 6.12 is ported to five more architectures.
For Linux 6.12 the vDSO getrandom() is expected to support ARM64 (AArch64), PowerPC 64-bit, PowerPC 32-bit, s390x, and LoongArch 64-bit architectures. Thus this means for speedy yet secure user-space RNG is now more widely available. In porting the code to more architectures it's also uncovered some bugs and areas for improvement within the common code.
Jason Donenfeld submitted all the RNG updates last week for the Linux 6.12 merge window. He explained in the RNG pull request all of the interesting changes:
The notable CPU architecture not yet seeing a vDSO getrandom() port is RISC-V, but that might happen for Linux v6.13.
All of the RNG changes have since been merged for Linux 6.12.
For Linux 6.12 the vDSO getrandom() is expected to support ARM64 (AArch64), PowerPC 64-bit, PowerPC 32-bit, s390x, and LoongArch 64-bit architectures. Thus this means for speedy yet secure user-space RNG is now more widely available. In porting the code to more architectures it's also uncovered some bugs and areas for improvement within the common code.
Jason Donenfeld submitted all the RNG updates last week for the Linux 6.12 merge window. He explained in the RNG pull request all of the interesting changes:
- Numerous fixups to the vDSO selftest infrastructure, getting it running successfully on more platforms, and fixing bugs in it.
- Additions to the vDSO getrandom & chacha selftests. Basically every time manual review unearthed a bug in a revision of an arch patch, or an ambiguity, the tests were augmented. By the time the last arch was submitted for review, s390x, v1 of the series was essentially fine right out of the gate.
- Fixes to the the generic C implementation of vDSO getrandom, to build and run successfully on all archs, decoupling it from assumptions we had (unintentionally) made on x86_64 that didn't carry through to the other architectures.
- Port of vDSO getrandom to LoongArch64, from Xi Ruoyao and acked by Huacai Chen.
- Port of vDSO getrandom to ARM64, from Adhemerval Zanella and acked by Will Deacon.
- Port of vDSO getrandom to PowerPC, in both 32-bit and 64-bit varieties, from Christophe Leroy and acked by Michael Ellerman.
- Port of vDSO getrandom to S390X from Heiko Carstens, the arch maintainer.
The notable CPU architecture not yet seeing a vDSO getrandom() port is RISC-V, but that might happen for Linux v6.13.
All of the RNG changes have since been merged for Linux 6.12.
2 Comments