You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't fall back to file I/O on Linux when Rust only supports kernels guaranteed to have it #376
According to https://doc.rust-lang.org/beta/rustc/platform-support.html, there are only a handful of target architectures where Rust supports kernels that are so old that they would not have the getrandom syscall. Notably riscv64gc and aarch64 are guaranteed to have getrandom according to the Rust kernel support policy. For those architectures we should not have enable the fallback logic at all. I suggest in particular that we have an allowlist of target architectures where we allow the fallback, which would be i686, x86_64, arm, armv7, powerpc, powerpc64, powerpc64le. s390x, i586, according to the Rust documents.
So we probably can disable file fallback for Android targets as per our platform support policy?
I have been assuming getrandom's platform support is that of its MSRV, not the latest stable Rust version. We we need to go back and look at what the kernel support policy of Rust 1.36 was.
Activity
josephlr commentedon Oct 14, 2023
I like this idea, it also serves as a bit of a test run for removing such file-based support once rust increases its supported kernel version.
newpavlov commentedon Oct 16, 2023
Sounds good to me!
newpavlov commentedon Feb 19, 2024
What about Android targets?
In this issue @josephlr wrote
So we probably can disable file fallback for Android targets as per our platform support policy?
briansmith commentedon Feb 19, 2024
I have been assuming
getrandom's platform support is that of its MSRV, not the latest stable Rust version. We we need to go back and look at what the kernel support policy of Rust 1.36 was.workingjubilee commentedon Mar 12, 2024
That documentation was introduced in 1.47.0: https://doc.rust-lang.org/1.47.0/rustc/platform-support.html