From owner-freebsd-arch Mon Jun 5 10:20:10 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gratis.grondar.za (grouter.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id 7742F37C0A2 for ; Mon, 5 Jun 2000 10:20:04 -0700 (PDT) (envelope-from mark@grimreaper.grondar.za) Received: from grimreaper.grondar.za (gratis.grondar.za [196.7.18.133]) by gratis.grondar.za (8.9.3/8.9.3) with ESMTP id TAA18713 for ; Mon, 5 Jun 2000 19:20:00 +0200 (SAST) (envelope-from mark@grimreaper.grondar.za) Message-Id: <200006051720.TAA18713@gratis.grondar.za> To: arch@FreeBSD.org Subject: (2nd iteration) New /dev/(random|null|zero) - review, please From: Mark Murray Date: Mon, 05 Jun 2000 19:20:11 +0200 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ 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