[PATCH v2] seedrng: import SeedRNG utility for kernel RNG seed files

Jason A. Donenfeld Jason at zx2c4.com
Sun Apr 10 12:43:16 UTC 2022


Hi Bernhard,

Thanks for the review.

On Sun, Apr 10, 2022 at 10:44 AM Bernhard Reutner-Fischer
<rep.dot.nop at gmail.com> wrote:
> Please also provide bloatcheck stats.
> $ make baseline
> # apply patch
> $ make bloatcheck

Oh, very neat feature. Will include that in v3.

> We have open_read_close() which should considerably reduce size.
> And there's a xopen_xwrite_close
> strtoul: We have several checking conversion routines in include/xatonum.h
> RUNSTATEDIR is probably PID_FILE_PATH
> poll: maybe safe_poll()
> non_creditable_seed = xasprintf("%s/%s"): concat_path_file

Very nice set of helpers. Used all of those.

> mkdir: bb_make_directory

This one wasn't so useful: I don't actually want _recursive_ directory
creation, I don't think.

> Why do you open(), flock() instead of using O_EXCL?

So that if the system crashes, the next boot can still move forward,
or if the process crashes, the next run can still move forward.
flock() is a runtime thing, where as O_EXCL is a "must be in
filesystem" thing, which is much weaker.

v3 coming right up! Thanks again for the feedback.

Jason


More information about the busybox mailing list