|
|
Message-Id: <B30B8811-35AB-4F2D-839E-0785F6F5867E@icloud.com> Date: Fri, 14 Aug 2026 15:19:56 +0200 From: Jonas Böttiger <jonasboettiger@...oud.com> To: musl@...ts.openwall.com Subject: vDSO-based getrandom Please CC me on any responses, I’m not subscribed to the mailing list. Dear all, I’m a member of the T-libs team maintaining Rust's standard library. We’re in the process of stabilising support for random number generation (see [1]). The proposed API works quite similar to OpenBSD’s arc4random_buf[2] function in that it allows users to fill a buffer with random data suited for cryptography. To provide the best security (and make our job as maintainers easier), the Linux implementation of this (see [3]) tries to call getrandom and falls back to reading from /dev/urandom if the syscall doesn’t exist. The recent addition of vDSO acceleration for getrandom[4] makes this implementation sufficiently performant on glibc even in the face of users making loads of tiny requests – which they’ll probably do given that the proposed SystemRng is the de-facto default that we point people towards. Thus my request: would it be possible to add vDSO support to musl’s getrandom shim? glibc already has support for it[5], but musl is quite a popular target among Rust developers too… Thank you so much! [1] https://github.com/rust-lang/rust/pull/157168 [2] https://manned.org/man/arc4random_buf [3] https://github.com/rust-lang/rust/blob/059bf4a660ddea5bd8302ecdd4f7e40dd7a04313/library/std/src/sys/random/linux.rs [4] https://lwn.net/ml/linux-kernel/20240521111958.2384173-1-Jason@zx2c4.com/ [5] https://inbox.sourceware.org/libc-alpha/20240730132440.1181819-1-Jason@zx2c4.com/
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.