← Commit list

b5624be6d

Denys Vlasenko
Denys Vlasenko
2022-05-01
SUCCESS Duration: 158s

Subject

seedrng: reduce MAX_SEED_LEN from 512 to 256

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/seedrng.c+5 -1
@@ -56,7 +56,11 @@
enum {
MIN_SEED_LEN = SHA256_OUTSIZE,
- MAX_SEED_LEN = 512
+ /* kernels < 5.18 could return short reads from getrandom()
+ * if signal is pending and length is > 256.
+ * Let's limit our reads to 256 bytes.
+ */
+ MAX_SEED_LEN = 256,
};
static size_t determine_optimal_seed_len(void)