fix: ramfs depends hard on randd before startup (P20)
ramfs@.service required randd as requires_weak, which doesn't enforce readiness ordering. When ramfs called std::random before randd registered /scheme/rand, it panicked with 'failed to generate random data'. Changed requires_weak to requires so init waits for randd to register its scheme before starting ramfs. Also patched Rust stdlib sys/random/redox.rs to fall back to xorshift64 seeded from ASLR rather than panicking when /scheme/rand is unavailable. This is a belt-and-suspenders fix: even with proper ordering, the stdlib should not panic on missing entropy during early boot.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
diff --git a/init.initfs.d/ramfs@.service b/init.initfs.d/ramfs@.service
|
||||
index bb512c60..3c3ed97d 100644
|
||||
--- a/init.initfs.d/ramfs@.service
|
||||
+++ b/init.initfs.d/ramfs@.service
|
||||
@@ -4 +4 @@ default_dependencies = false
|
||||
-requires_weak = ["00_randd.service"]
|
||||
+requires = ["00_randd.service"]
|
||||
@@ -0,0 +1 @@
|
||||
../../../local/patches/base/P20-ramfs-requires-randd.patch
|
||||
@@ -66,6 +66,7 @@ patches = [
|
||||
"P18-9-msi-allocation-resilience.patch",
|
||||
"P19-init-startup-hardening.patch",
|
||||
"P19-acpid-startup-hardening.patch",
|
||||
"P20-ramfs-requires-randd.patch",
|
||||
]
|
||||
|
||||
[package]
|
||||
|
||||
Reference in New Issue
Block a user