Hi Jason, Ted, Would you mind having a look at these thread? The random(7/4) pages need some updates. I'd need some expert in the random subsystem to work on these patches. Mingye has been unresponsive since november. Have a lovely day! Alex On 2026-01-18T23:21:10+0100, Alejandro Colomar wrote: > Ping. :) > > On Mon, Nov 24, 2025 at 05:44:17PM +0100, Alejandro Colomar wrote: > > Hi Mingye, > > > > On Mon, Nov 10, 2025 at 11:51:30AM +0800, Mingye Wang wrote: > > > On Mon, Nov 10, 2025 at 11:05 AM Mingye Wang wrote: > > > > > > > > > Does /dev/urandom block when reading with read(2) before the pool is > > > > ready? I assume it blocks. > > > > > > > > From what I've heard it does not. Working on other comments. > > > > > [...] > > > > > > I am sending only the revised version of the patch you commented on > > > (the one that touches three files, random.{4,7}, getrandom.2). You > > > might notice that this patch is much larger. This is because when > > > editing the table I noticed that there's really no reason to keep the > > > "Pool" column around for 5.6+, but removing it also felt off. In the > > > end I just made two separate tables, but with identical cell-width > > > settings. > > > > Please split into more patches. I think this patch could be broken into > > a set of many small patches, each of which does one thing. 5 or 10 > > patches would be okay. > > > > > Speaking of cell-width settings, the existing version was not filling > > > the entire screen, which contravenes what man-pages(7) says about > > > using lbx. Adding an "x" does make it look nicer too. > > > > > > (I have no idea whether this is the fourth version, but it's > > > definitely after the third and five seems too many. In any case, I > > > will be incrementing this number in future patch submissions to keep > > > things navigable.) > > > > > > Regards, > > > Mingye Wang (Artoria2e5) > > > > Some review of v4: > > > > diff --git a/man/man4/random.4 b/man/man4/random.4 > > index 0a651b03f..071fc99ef 100644 > > --- a/man/man4/random.4 > > +++ b/man/man4/random.4 > > @@ -56,17 +56,29 @@ .SH DESCRIPTION > > .I /dev/random > > instead. > > .P > > -The > > +.\" commit 30c08efec8884fb106b8e57094baa51bb4c44e32 > > +Since Linux 5.6, > > .I /dev/random > > -device is a legacy interface which dates back to > > +is identical to > > +.IR /dev/urandom , > > +except that it blocks during early boot. > > +A jitter-based seeding technique added in Linux 5.4 should help reduce > > +block time. > > +.\" commit 50ee7529ec4500c88f8664560770a7a1b65db72b > > +.P > > +The pre-Linux 5.6 > > +.I /dev/random > > +device was a legacy interface which dates back to > > > > I'd prefer 'Before Linux 5.6,' instead of 'The pre-Linux 5.6'. > > > > a time where the cryptographic primitives used in the implementation > > of > > .I /dev/urandom > > were not widely trusted. > > -It will return random bytes only within the estimated number of > > -bits of fresh noise in the entropy pool, blocking if necessary. > > +It would return random bytes only within the estimated number of bits of fresh > > +noise in the entropy pool, blocking until additional environmental noise is > > +gathered. > > +This old > > .I /dev/random > > > > Please use semantic newlines. See man-pages(7): > > > > $ MANWIDTH=72 man man-pages | sed -n '/Use semantic newlines/,/^$/p' > > Use semantic newlines > > In the source of a manual page, new sentences should be started on > > new lines, long sentences should be split into lines at clause > > breaks (commas, semicolons, colons, and so on), and long clauses > > should be split at phrase boundaries. This convention, sometimes > > known as "semantic newlines", makes it easier to see the effect of > > patches, which often operate at the level of individual sentences, > > clauses, or phrases. > > > > I'd write it as: > > > > ``` > > It would return random bytes > > only within the estimated number of bits of fresh noise > > in the entropy pool, > > blocking until additional environmental noise is gathered. > > ``` > > > > Same here: > > > > @@ -121,7 +133,8 @@ .SH DESCRIPTION > > .BR read (2) > > from > > .I /dev/random > > -will return at most 512 bytes > > +has the same maximum size since Linux 5.6. Between Linux 3.16 and 5.5, > > +the maximum size was 512 bytes > > .\" SEC_XFER_SIZE in drivers/char/random.c > > (340 bytes before Linux 2.6.12). > > .P > > > > Use .P instead of .PP here: > > > > diff --git a/man/man7/random.7 b/man/man7/random.7 > > index fda408d38..65e21a07e 100644 > > --- a/man/man7/random.7 > > +++ b/man/man7/random.7 > > @@ -54,17 +54,16 @@ .SS Initialization of the entropy pool > > When a sufficient number of random bits has been collected, the > > entropy pool is considered to be initialized. > > .SS Choice of random source > > -Unless you are doing long-term key generation (and most likely not even > > -then), you probably shouldn't be reading from the > > +Unless your program may run at early-boot, before the entropy pool > > +is initialized, there is no longer any palpable difference between > > .I /dev/random > > -device or employing > > -.BR getrandom (2) > > -with the > > -.B GRND_RANDOM > > -flag. > > -Instead, either read from the > > +and > > .I /dev/urandom > > -device or employ > > +since Linux 5.6 (see the table below). > > +.PP > > +On older kernels, either read from the > > +.I /dev/urandom > > +device or (especially if you are concerned with early boot) employ > > .BR getrandom (2) > > without the > > .B GRND_RANDOM > > > > > > Have a lovely day! > > Alex > > > > -- > > > > Use port 80 (that is, <...:80/>). > > > > -- > --