Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jun 2000 19:20:11 +0200
From:      Mark Murray <mark@grondar.za>
To:        arch@FreeBSD.org
Subject:   (2nd iteration) New /dev/(random|null|zero) - review, please
Message-ID:  <200006051720.TAA18713@gratis.grondar.za>

next in thread | raw e-mail | index | archive | help
[ Sent to arch at the suggestion of David O'Brien ]
(Some improvements have been done - 2nd iteration)

Hi

I have finished doing a MI /dev/null and /dev/zero, and I have got a
new /dev/random. I'm looking for reviewers.

The code is in freefall:~markm/NEWDEVS/*. There is a tar file and diffs
(all for the sys/ area). Some other supplementary patches are needed in
userland, these are not included.

2nd Iteration Improvements:

o /dev/null and /dev/zero or no longer optional; they are "standard".

o /dev/zero uses malloc(9) to get its space, not a hard-coded block
  of zeros. Malloc is done once; at device startup.

NOTES:

o The devices are (can be) modules, or by setting options, they can be
  hard coded into the kernel. I would like to make them autoload
  somehow, but I'm not sure how.

o I'd like to make the devices "pseudo-devices", rather than options.
  Comments?

o The random number generator will give random-looking output, but does
  absolutely no harvesting of entropy at the moment. Because I want
  it to be a loadable module, I need some way of registering the entropy
  harvesting routines. Something like weak-symboled routines that are
  overridden when the module is loaded would be ideal. Suggestions?

o I am using Brice Schneier's "Yarrow" algorithm for the RNG; I have
  only supplied enough of it now to give "sort of" random numbers. As
  I solve the harvesting problem, I'll improve on that.

o The RNG is slow; the others are much faster than their originals.

o I intend to use sysctl(9) to set most of yarrow's "tweakables".

Thanks to Jeroen van Gelderen for some excellent ideas on optimization!

M


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006051720.TAA18713>