Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2013 18:13:59 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mark R V Murray <mark@grondar.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray <markm@FreeBSD.org>
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>
In-Reply-To: <3B77143C-7D82-4E62-9974-BC2C6846893F@grondar.org>
References:  <201310121257.r9CCvvjO006546@svn.freebsd.org> <20131013074825.GO41229@kib.kiev.ua> <3B77143C-7D82-4E62-9974-BC2C6846893F@grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <kostikbel@gmail.com> 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--



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