On Sun, Oct 13, 2013 at 10:50:17AM +0100, Mark R V Murray wrote: > > On 13 Oct 2013, at 08:48, Konstantin Belousov <kostik...@gmail.com> wrote: > > > On Sat, Oct 12, 2013 at 12:57:57PM +0000, Mark Murray wrote: > >> Author: markm > >> Date: Sat Oct 12 12:57:57 2013 > >> New Revision: 256377 > >> URL: http://svnweb.freebsd.org/changeset/base/256377 > >> > >> Log: > >> Merge from project branch. Uninteresting commits are trimmed. > >> > >> Refactor of /dev/random device. Main points include: > > > > The random.ko is broken. On boot, I get > > link_elf_obj: symbol live_entropy_source_deregister undefined > > KLD file random.ko - could not finalize loading > > > > There are several files from dev/random which are listed as > > 'optional random' in conf/files but are not added to the SRCS in > > modules/random/Makefile. I do not know the intent of splitting the > > dev/random into the module and non-optional part of the kernel, so > > cannot provide the patch. > > > > Please fix. > > Here's the fix: > > Index: sys/modules/random/Makefile > =================================================================== > --- sys/modules/random/Makefile (revision 256427) > +++ sys/modules/random/Makefile (working copy) > @@ -10,7 +10,8 @@ > SRCS+= nehemiah.c > SRCS+= ivy.c > .endif > -SRCS+= randomdev_soft.c yarrow.c hash.c > +SRCS+= randomdev_soft.c random_harvestq.c live_entropy_sources.c > +SRCS+= yarrow.c hash.c rwfile.c > SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c > SRCS+= bus_if.h device_if.h vnode_if.h opt_cpu.h opt_random.h >
Surely this works, thank you. The rwfile.c content probably should be taken under the #ifdef RANDOM_RWFILE. But I do not see much use for the randomdev_read_file() and randomdev_write_file() functions. It would be better to directly code the VFS calls in the random_harvestq_cache(). For one thing, it would eliminate unneccessary close and open of the entropy file.
pgps8rjAHXMbe.pgp
Description: PGP signature