rust-random / getrandom

A small cross-platform library for retrieving random data from (operating) system source
Apache License 2.0
264 stars 166 forks source link

Potential improvements to use of `/dev/random` on Linux/Android #451

Open briansmith opened 1 month ago

briansmith commented 1 month ago
briansmith commented 1 month ago
briansmith commented 1 month ago
briansmith commented 1 month ago
briansmith commented 1 month ago
josephlr commented 1 month ago
  1. See https://github.com/llvm/llvm-project/blob/3b2df5b6ee81cf2685c95728ff1baf795051c926/compiler-rt/include/sanitizer/linux_syscall_hooks.h#L1182-L1185. When sanitizers are enabled, it seems like we should be calling __sanitizer_syscall_pre_impl_poll and __sanitizer_syscall_post_impl_poll?

It seems like they also have methods in there for read, open, and close. I'm wondering if sanitizers being enabled just requires using a libc that has been modified to make those particular calls