From owner-svn-src-all@FreeBSD.ORG Sun Oct 13 15:14:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84AD27CE; Sun, 13 Oct 2013 15:14:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC3A72774; Sun, 13 Oct 2013 15:14:12 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r9DFDxtj098941; Sun, 13 Oct 2013 18:13:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r9DFDxtj098941 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r9DFDxHA098940; Sun, 13 Oct 2013 18:13:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 13 Oct 2013 18:13:59 +0300 From: Konstantin Belousov To: Mark R V Murray Subject: Re: svn commit: r256377 - in head: etc/defaults etc/rc.d share/examples/kld/random_adaptor share/man/man4 sys/boot/forth sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe ... Message-ID: <20131013151359.GR41229@kib.kiev.ua> References: <201310121257.r9CCvvjO006546@svn.freebsd.org> <20131013074825.GO41229@kib.kiev.ua> <3B77143C-7D82-4E62-9974-BC2C6846893F@grondar.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7SOjPJ0BYkVZ7T67" Content-Disposition: inline In-Reply-To: <3B77143C-7D82-4E62-9974-BC2C6846893F@grondar.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 15:14:13 -0000 --7SOjPJ0BYkVZ7T67 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 13, 2013 at 10:50:17AM +0100, Mark R V Murray wrote: >=20 > On 13 Oct 2013, at 08:48, Konstantin Belousov wrote: >=20 > > 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 > >>=20 > >> Log: > >> Merge from project branch. Uninteresting commits are trimmed. > >>=20 > >> Refactor of /dev/random device. Main points include: > >=20 > > 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 > >=20 > > 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. > >=20 > > Please fix. >=20 > Here's the fix: >=20 > Index: sys/modules/random/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/modules/random/Makefile (revision 256427) > +++ sys/modules/random/Makefile (working copy) > @@ -10,7 +10,8 @@ > SRCS+=3D nehemiah.c > SRCS+=3D ivy.c > .endif > -SRCS+=3D randomdev_soft.c yarrow.c hash.c > +SRCS+=3D randomdev_soft.c random_harvestq.c live_entropy_sources.c > +SRCS+=3D yarrow.c hash.c rwfile.c > SRCS+=3D rijndael-alg-fst.c rijndael-api-fst.c sha2.c > SRCS+=3D bus_if.h device_if.h vnode_if.h opt_cpu.h opt_random.h >=20 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. --7SOjPJ0BYkVZ7T67 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSWri2AAoJEJDCuSvBvK1BWdUQAIrY/2ShiYQ78YH8ChtsDnSc Dz21UdZ2MnqKHrdu9LIeyUiPsRQRdOSI+TQAj8jEgTN9gDIodqQaPmqd3J+KpwH0 DNgfeIrbTRuvF3aEvDc8NAN9VUtOL69iqNF6iJlRV1gtShb6Zl0txp8Vd9D4I8+g 979gwFuv0s6hCa3goIfQjwniOU3spDFbPPEeadU2WvzvvPr4bbOZBysTRGbVrZcv YzpR4nn8zWijkwGNW5PeeGXM3PvQg1hXYrAghJZKc7HpeQlFGKLijOQXISkv78XN b6s3RXC4nxqDeHcoy6amXkJtVyuu+Id5fMEjws3Tl87M2dB5WJn1C7lIFl3g4k7g FI9hQXnjTWBzDgi5Cv7KF3LFKqoZQLcPB/armguiM8rxgIpB2ahJzDYcHY26Xbm7 zdj2bZsymz0jS6B8IvoD98OQ7B5AT/Pu87xzm5lFDJS66QM3O8bDF4RxtqoSEkcG K1SI0tI+Xxc/YbyPTANTIqyEve610x0t71g158dEI4iFxzMwc+eZ8BHE1t0y7AWV Lf35l/UOg/jbVkdv4dFGjvqnSq3IPCxid/cOm3N+GNJXC/lbR01AZZJcVdcyczz7 YbEB/Rv4snEcZydA/UftVkJc6dY2jnQHIfG/M5ROJC03deLIDS+GrM/meX6/b7nK InrdjUT4mTQdMrnMbKho =4RN0 -----END PGP SIGNATURE----- --7SOjPJ0BYkVZ7T67--