From owner-freebsd-arch@FreeBSD.ORG Thu Aug 8 19:20:24 2013 Return-Path: Delivered-To: freebsd-arch@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 C50E0D4E for ; Thu, 8 Aug 2013 19:20:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A1B92D4D for ; Thu, 8 Aug 2013 19:20:24 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id s9so2563786iec.20 for ; Thu, 08 Aug 2013 12:20:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=HhecRwGi3fow4yuYtK/G75k7dPD9ESOqfkGmjPaw1cY=; b=Rr9qIGgwyFIskIo3apbyHIv1pTXmiC1fXmo9uiLkHwE824Ir6hnubmjiwh0l3eiwXi 0zX8apK4EEGDPbUzjWEIb8rWvR9Qq7XMOjG3uoqgeoRJzz0ruIOLPTaBEj25QxWETO5u 7T6xGHXVgDiayNo+3Ev74szwEHG2zV1qn+OS/ePAy1n62UemmBGTQT/JNOBWZwnxH2Ha Q4O7DZnIHjnwRSYus/eK9HSKpn7kZLOVJ3t4V5witT3TsWgo+mUqiCU3II3ULnHeXFDD 07JLkuiu5i0Sd/Ml7wHdLZe2SEyzftafugar8PORPqAtYQVEyQ+/kIFvJcrB0eFJJBp7 JB6w== X-Gm-Message-State: ALoCoQm9qqhl9sVxtolihjncOH9Iu/kCJl5JjBHrmuDMgnI/zmAED8+5YekxsEdLdGbxmvvAnlRh X-Received: by 10.50.12.5 with SMTP id u5mr201379igb.58.1375989623290; Thu, 08 Aug 2013 12:20:23 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id kj5sm7849348igb.7.2013.08.08.12.20.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 12:20:22 -0700 (PDT) Sender: Warner Losh Subject: Re: random(4) plugin infrastructure for mulitple RNG in a modular fashion Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130807182858.GA79286@dragon.NUXI.org> Date: Thu, 8 Aug 2013 13:20:19 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <223174A5-A146-4969-A3CF-6923EF7ECCF2@bsdimp.com> References: <20130807182858.GA79286@dragon.NUXI.org> To: obrien@freebsd.org X-Mailer: Apple Mail (2.1085) Cc: Arthur Mesh , secteam@freebsd.org, freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 19:20:24 -0000 The sheer number of config files you changed says this is a bad idea, or = you are during something very wrong. Also, you bogusly changed way too many config files rather than the = underlying std.* files for the ARM port. That would, at least, solve the = 'working today, broken tomorrow' problem you're introducing with this = patch. Moving the options to the std.* files also is the proper way to = select a default RNG doohicky. What's wrong with having yarrow as the default, fallback mechanism. And = why do you have a design that seems to force one, and only one, into the = kernel? The way it is now we fail bad rather than fail to yarrow = fallback. This seems unwise. I haven't read the code in detail, but I don't see how I'd override the = CPU's random number unit with one from a plug-in board when it is = present. I'd argue that the bootverbose if statment plus #ifdef is wrong as well. There's likely other changes too, but with so many high level things = wrong with the patch, I think it would be a waste of time going through = it in more detail until those are addressed (hence my top posting rather = than doing all this inline). So while the goal may be a good one, this patch is no where near = committable as is. Warner On Aug 7, 2013, at 12:28 PM, David O'Brien wrote: > Here is a patch that improves the ability to add RNG's to the system, > even /usr/src-external as a kernel modules by creating a random(4) = plugin > infrastructure. >=20 > thoughts? >=20 > ----------%<----------%<----------%<----------%<----------%<---------- > random(4) plugin infrastructure improvement. Provides ability to = plugin > RNGs other than yarrow in a more modular fashion. >=20 > * Add random_adaptors.[ch] which is basically a store of = random_adaptor's. > random_adaptor is basically an adapter that plugs in to random(4). > random_adaptor can only be plugged in to random(4) very early in = bootup. > Unplugging random_adaptor from random(4) is not supported, and is = probably a > bad idea anyway, due to potential loss of entropy pools. > We currently have 3 random_adaptors: > + yarrow > + rdrand (ivy.c) > + nehemeiah >=20 > * Remove platform dependent logic from probe.c, and move it into > corresponding registration routines of each random_adaptor provider. > probe.c doesn't do anything other than picking a specific = random_adaptor > from a list of registered ones. >=20 > * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" = option. > The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise = yarrow. > random(4) device doesn't really depend on rijndael-*. Yarrow, = however, does. >=20 > * If the kernel doesn't have any random_adaptor adapters present then = the > creation of /dev/random is postponed until next random_adaptor is = kldload'ed. >=20 > * Fix randomdev_soft.c to refer to its own random_adaptor, instead of = a > system wide one. >=20 > Submitted by: arthurmesh@gmail.com, obrien > Obtained from: Juniper Networks > Reviewed by: obrien >=20 > ----------%<----------%<----------%<----------%<----------%<---------- >=20 > Index: UPDATING > =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 > --- UPDATING (revision 253845) > +++ UPDATING (working copy) > @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +201308xx: > + random(4) and actual RNG implementations (aka, adaptors) have = been > + further decoupled. If you are running a custom kernel, you may > + need to explicitly enable at least one RNG adaptor in your = kernel > + config. For example, to use Yarrow, add "options YARROW_RNG" to > + your kernel config. For hardware backed RNGs, use either > + "RDRAND_RNG" or "PADLOCK_RNG" options. > + If you use random.ko via 'random_load=3D"YES"' in = /boot/loader.conf > + instead of "device random", you will need to change that to > + 'yarrow_rng_load=3D"YES"', 'rdrand_rng_load=3D"YES"', or > + 'padlock_rng_load=3D"YES"'. random.ko will be loaded = automatically > + as a dependency module. > + > 20130726: > Behavior of devfs rules path matching has been changed. > Pattern is now always matched against fully qualified devfs > Index: share/man/man4/random.4 > =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 > --- share/man/man4/random.4 (revision 253845) > +++ share/man/man4/random.4 (working copy) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 7, 2012 > +.Dd August xx, 2013 > .Dt RANDOM 4 > .Os > .Sh NAME > @@ -43,6 +43,13 @@ The device will probe for > certain hardware entropy sources, > and use these in preference to the fallback, > which is a generator implemented in software. > +If the kernel environment MIB's > +.Va hw.nehemiah_rng_enable > +or > +.Va hw.ivy_rng_enable > +are set to > +.Dq Li 0 , > +the associated hardware entropy source will be ignored. > .Pp > If the device is using > the software generator, > @@ -74,6 +81,7 @@ device, use the command line: > .Pp > which results in something like: > .Bd -literal -offset indent > +kern.random.adaptors: yarrow > kern.random.sys.seeded: 1 > kern.random.sys.harvest.ethernet: 1 > kern.random.sys.harvest.point_to_point: 1 > @@ -89,7 +97,9 @@ kern.random.yarrow.slowoverthresh: 2 > (These would not be seen if a > hardware generator is present.) > .Pp > -All settings are read/write. > +Other than > +.Dl kern.random.adaptors > +all settings are read/write. > .Pp > The > .Va kern.random.sys.seeded > Index: sys/amd64/conf/GENERIC > =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/amd64/conf/GENERIC (revision 253845) > +++ sys/amd64/conf/GENERIC (working copy) > @@ -295,6 +295,7 @@ device loop # Network = loopback > device random # Entropy device > options PADLOCK_RNG # VIA Padlock RNG > options RDRAND_RNG # Intel Bull Mountain RNG > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/arm/conf/AC100 > =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/arm/conf/AC100 (revision 253845) > +++ sys/arm/conf/AC100 (working copy) > @@ -61,6 +61,7 @@ options MUTEX_DEBUG >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device md > Index: sys/arm/conf/ARMADAXP > =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/arm/conf/ARMADAXP (revision 253845) > +++ sys/arm/conf/ARMADAXP (working copy) > @@ -61,6 +61,7 @@ options KDB_TRACE >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device md > Index: sys/arm/conf/ARNDALE > =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/arm/conf/ARNDALE (revision 253845) > +++ sys/arm/conf/ARNDALE (working copy) > @@ -88,6 +88,7 @@ options ROOTDEVNAME=3D\"ufs:/dev/da0\" >=20 > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device md > device gpio > Index: sys/arm/conf/ATMEL > =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/arm/conf/ATMEL (revision 253845) > +++ sys/arm/conf/ATMEL (working copy) > @@ -134,6 +134,7 @@ device geom_map # GEOM partition = mappin > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/arm/conf/AVILA > =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/arm/conf/AVILA (revision 253845) > +++ sys/arm/conf/AVILA (working copy) > @@ -107,6 +107,7 @@ device if_bridge >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Wireless NIC cards > device wlan # 802.11 support > Index: sys/arm/conf/BEAGLEBONE > =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/arm/conf/BEAGLEBONE (revision 253845) > +++ sys/arm/conf/BEAGLEBONE (working copy) > @@ -90,6 +90,7 @@ device pty > device snp > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # I2C support > device iicbus > Index: sys/arm/conf/BWCT > =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/arm/conf/BWCT (revision 253845) > +++ sys/arm/conf/BWCT (working copy) > @@ -68,6 +68,7 @@ options NO_FFS_SNAPSHOT > options NO_SWAPPING > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device ether > device vlan > device uart > Index: sys/arm/conf/CAMBRIA > =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/arm/conf/CAMBRIA (revision 253845) > +++ sys/arm/conf/CAMBRIA (working copy) > @@ -110,6 +110,7 @@ device if_bridge >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Wireless NIC cards > device wlan # 802.11 support > Index: sys/arm/conf/CNS11XXNAS > =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/arm/conf/CNS11XXNAS (revision 253845) > +++ sys/arm/conf/CNS11XXNAS (working copy) > @@ -102,6 +102,7 @@ device loop >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > #options ARM_USE_SMALL_ALLOC >=20 > Index: sys/arm/conf/CRB > =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/arm/conf/CRB (revision 253845) > +++ sys/arm/conf/CRB (working copy) > @@ -105,6 +105,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > device iopwdog > options ARM_USE_SMALL_ALLOC > Index: sys/arm/conf/CUBIEBOARD > =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/arm/conf/CUBIEBOARD (revision 253845) > +++ sys/arm/conf/CUBIEBOARD (working copy) > @@ -92,6 +92,7 @@ device pty > device snp > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # I2C support > #device iicbus > @@ -130,4 +131,3 @@ device miibus > options FDT > options FDT_DTB_STATIC > makeoptions FDT_DTS_FILE=3Dcubieboard.dts > - > Index: sys/arm/conf/DB-78XXX > =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/arm/conf/DB-78XXX (revision 253845) > +++ sys/arm/conf/DB-78XXX (working copy) > @@ -55,6 +55,7 @@ device pci > device loop > device md > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart > Index: sys/arm/conf/DB-88F5XXX > =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/arm/conf/DB-88F5XXX (revision 253845) > +++ sys/arm/conf/DB-88F5XXX (working copy) > @@ -54,6 +54,7 @@ device pci > device md > device loop > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart > Index: sys/arm/conf/DB-88F6XXX > =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/arm/conf/DB-88F6XXX (revision 253845) > +++ sys/arm/conf/DB-88F6XXX (working copy) > @@ -55,6 +55,7 @@ device pci > device loop > device md > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart > Index: sys/arm/conf/DOCKSTAR > =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/arm/conf/DOCKSTAR (revision 253845) > +++ sys/arm/conf/DOCKSTAR (working copy) > @@ -46,6 +46,7 @@ options KDB > # Pseudo devices > device md > device random > +options YARROW_RNG # Yarrow software RNG > device loop >=20 > # Serial ports > Index: sys/arm/conf/DREAMPLUG-1001 > =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/arm/conf/DREAMPLUG-1001 (revision 253845) > +++ sys/arm/conf/DREAMPLUG-1001 (working copy) > @@ -62,6 +62,7 @@ device loop #Network = loopback > device md #Memory/malloc disk > device pty #BSD-style compatibility = pseudo ttys > device random #Entropy device > +options YARROW_RNG # Yarrow software RNG > device tun #Packet tunnel. > device ether #Required for all = ethernet devices > device vlan #802.1Q VLAN support > Index: sys/arm/conf/EA3250 > =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/arm/conf/EA3250 (revision 253845) > +++ sys/arm/conf/EA3250 (working copy) > @@ -54,6 +54,7 @@ device loop > device md > device pty > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart > Index: sys/arm/conf/EB9200 > =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/arm/conf/EB9200 (revision 253845) > +++ sys/arm/conf/EB9200 (working copy) > @@ -60,6 +60,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart > Index: sys/arm/conf/EFIKA_MX > =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/arm/conf/EFIKA_MX (revision 253845) > +++ sys/arm/conf/EFIKA_MX (working copy) > @@ -96,6 +96,7 @@ device bpf # Berkeley = packet filter > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. > Index: sys/arm/conf/EP80219 > =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/arm/conf/EP80219 (revision 253845) > +++ sys/arm/conf/EP80219 (working copy) > @@ -101,6 +101,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > options ARM_USE_SMALL_ALLOC > # Floppy drives > Index: sys/arm/conf/ETHERNUT5 > =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/arm/conf/ETHERNUT5 (revision 253845) > +++ sys/arm/conf/ETHERNUT5 (working copy) > @@ -126,6 +126,7 @@ device geom_map # GEOM partition = mappin > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. > Index: sys/arm/conf/GUMSTIX > =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/arm/conf/GUMSTIX (revision 253845) > +++ sys/arm/conf/GUMSTIX (working copy) > @@ -88,3 +88,4 @@ options DDB #Enable the = kernel debugg >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > Index: sys/arm/conf/HL200 > =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/arm/conf/HL200 (revision 253845) > +++ sys/arm/conf/HL200 (working copy) > @@ -65,6 +65,7 @@ options RWLOCK_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart > Index: sys/arm/conf/HL201 > =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/arm/conf/HL201 (revision 253845) > +++ sys/arm/conf/HL201 (working copy) > @@ -67,6 +67,7 @@ options RWLOCK_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart > @@ -129,4 +130,3 @@ device pass # Passthrough = device (dire > #device wlan_tkip # 802.11 TKIP support > #device wlan_amrr # AMRR transmit rate control = algorithm > options ROOTDEVNAME=3D\"ufs:da0s1a\" > - > Index: sys/arm/conf/IQ31244 > =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/arm/conf/IQ31244 (revision 253845) > +++ sys/arm/conf/IQ31244 (working copy) > @@ -106,6 +106,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > options ARM_USE_SMALL_ALLOC > # Floppy drives > Index: sys/arm/conf/KB920X > =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/arm/conf/KB920X (revision 253845) > +++ sys/arm/conf/KB920X (working copy) > @@ -66,6 +66,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart > Index: sys/arm/conf/LN2410SBC > =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/arm/conf/LN2410SBC (revision 253845) > +++ sys/arm/conf/LN2410SBC (working copy) > @@ -62,6 +62,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG >=20 > device loop > device ether > @@ -83,4 +84,3 @@ device ohci > device umass > device scbus # SCSI bus (required for da) > device da # Direct Access (disks) > - > Index: sys/arm/conf/NSLU > =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/arm/conf/NSLU (revision 253845) > +++ sys/arm/conf/NSLU (working copy) > @@ -105,6 +105,7 @@ device loop >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > #options ARM_USE_SMALL_ALLOC >=20 > Index: sys/arm/conf/PANDABOARD > =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/arm/conf/PANDABOARD (revision 253845) > +++ sys/arm/conf/PANDABOARD (working copy) > @@ -110,6 +110,7 @@ device md > #options MD_ROOT_SIZE=3D7560 >=20 > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # USB support > device usb > Index: sys/arm/conf/QILA9G20 > =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/arm/conf/QILA9G20 (revision 253845) > +++ sys/arm/conf/QILA9G20 (working copy) > @@ -77,6 +77,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether > Index: sys/arm/conf/RPI-B > =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/arm/conf/RPI-B (revision 253845) > +++ sys/arm/conf/RPI-B (working copy) > @@ -86,6 +86,7 @@ options INVARIANT_SUPPORT #Extra sanity >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # USB support > device usb > Index: sys/arm/conf/SAM9260EK > =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/arm/conf/SAM9260EK (revision 253845) > +++ sys/arm/conf/SAM9260EK (working copy) > @@ -134,6 +134,7 @@ device mmcsd # MMC/SD memory = card > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. > Index: sys/arm/conf/SAM9G20EK > =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/arm/conf/SAM9G20EK (revision 253845) > +++ sys/arm/conf/SAM9G20EK (working copy) > @@ -76,6 +76,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether > Index: sys/arm/conf/SAM9X25EK > =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/arm/conf/SAM9X25EK (revision 253845) > +++ sys/arm/conf/SAM9X25EK (working copy) > @@ -77,6 +77,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device bpf > @@ -150,4 +151,3 @@ device miibus > #device wlan_ccmp # 802.11 CCMP support > #device wlan_tkip # 802.11 TKIP support > #device wlan_amrr # AMRR transmit rate control = algorithm > - > Index: sys/arm/conf/SHEEVAPLUG > =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/arm/conf/SHEEVAPLUG (revision 253845) > +++ sys/arm/conf/SHEEVAPLUG (working copy) > @@ -45,6 +45,7 @@ options KDB >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device loop >=20 > # Serial ports > Index: sys/arm/conf/SN9G45 > =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/arm/conf/SN9G45 (revision 253845) > +++ sys/arm/conf/SN9G45 (working copy) > @@ -76,6 +76,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether > Index: sys/arm/conf/TS7800 > =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/arm/conf/TS7800 (revision 253845) > +++ sys/arm/conf/TS7800 (working copy) > @@ -48,6 +48,7 @@ device pci > device md > device loop > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart > Index: sys/arm/conf/VERSATILEPB > =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/arm/conf/VERSATILEPB (revision 253845) > +++ sys/arm/conf/VERSATILEPB (working copy) > @@ -94,6 +94,7 @@ options INVARIANT_SUPPORT #Extra sanity >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Flattened Device Tree > options FDT > Index: sys/arm/conf/ZEDBOARD > =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/arm/conf/ZEDBOARD (revision 253845) > +++ sys/arm/conf/ZEDBOARD (working copy) > @@ -66,6 +66,7 @@ options KDB >=20 > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device ether > device if_cgem # Zynq-7000 gig ethernet = device > device mii > Index: sys/conf/NOTES > =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/conf/NOTES (revision 253845) > +++ sys/conf/NOTES (working copy) > @@ -1132,6 +1132,9 @@ options VFS_AIO > # Cryptographically secure random number generator; /dev/random > device random >=20 > +# Yarrow software RNG adapter for random > +options YARROW_RNG > + > # The system memory devices; /dev/mem, /dev/kmem > device mem >=20 > Index: sys/conf/files > =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/conf/files (revision 253845) > +++ sys/conf/files (working copy) > @@ -540,8 +540,8 @@ crypto/des/des_ecb.c optional crypto = |=20 > crypto/des/des_setkey.c optional crypto | ipsec | netsmb > crypto/rc4/rc4.c optional netgraph_mppc_encryption | = kgssapi > crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \ > - ipsec | random | wlan_ccmp > -crypto/rijndael/rijndael-api-fst.c optional geom_bde | random > + ipsec | yarrow_rng | wlan_ccmp > +crypto/rijndael/rijndael-api-fst.c optional geom_bde | yarrow_rng > crypto/rijndael/rijndael-api.c optional crypto | ipsec | = wlan_ccmp > crypto/sha1.c optional carp | crypto | ipsec | \ > netgraph_mppc_encryption | sctp > @@ -2030,11 +2030,12 @@ rt2860.fw optional = rt2860fw | ralfw \ > no-obj no-implicit-rule = \ > clean "rt2860.fw" > dev/random/harvest.c standard > -dev/random/hash.c optional random > +dev/random/hash.c optional yarrow_rng > dev/random/probe.c optional random > +dev/random/random_adaptors.c standard > dev/random/randomdev.c optional random > -dev/random/randomdev_soft.c optional random > -dev/random/yarrow.c optional random > +dev/random/randomdev_soft.c optional yarrow_rng > +dev/random/yarrow.c optional yarrow_rng > dev/rc/rc.c optional rc > dev/re/if_re.c optional re > dev/rndtest/rndtest.c optional rndtest > Index: sys/conf/options > =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/conf/options (revision 253845) > +++ sys/conf/options (working copy) > @@ -905,3 +905,6 @@ RACCT opt_global.h >=20 > # Resource Limits > RCTL opt_global.h > + > +# Software random number generators for random(4) > +YARROW_RNG opt_dontuse.h > Index: sys/dev/random/ivy.c > =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/dev/random/ivy.c (revision 253846) > +++ sys/dev/random/ivy.c (working copy) > @@ -28,16 +28,19 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#include "opt_cpu.h" > - > -#ifdef RDRAND_RNG > - > #include > #include > +#include > #include > +#include > #include > #include > #include > + > +#include > +#include > + > +#include > #include >=20 > #define RETRY_COUNT 10 > @@ -46,7 +49,7 @@ static void random_ivy_init(void); > static void random_ivy_deinit(void); > static int random_ivy_read(void *, int); >=20 > -struct random_systat random_ivy =3D { > +struct random_adaptor random_ivy =3D { > .ident =3D "Hardware, Intel IvyBridge+ RNG", > .init =3D random_ivy_init, > .deinit =3D random_ivy_deinit, > @@ -114,4 +117,32 @@ random_ivy_read(void *buf, int c) > return (c - count); > } >=20 > +static int > +rdrand_modevent(module_t mod, int type, void *unused) > +{ > + > + switch (type) { > + case MOD_LOAD: > + if (cpu_feature2 & CPUID2_RDRAND) { > + random_adaptor_register("rdrand", &random_ivy); > + EVENTHANDLER_INVOKE(random_adaptor_attach, = &random_ivy); > + return (0); > + } else { > +#ifndef KLD_MODULE > + if (bootverbose) > +#endif > + printf( > + "%s: RDRAND feature is not present on this = CPU\n", > + random_ivy.ident); > +#ifdef KLD_MODULE > + return (ENXIO); > +#else > + return (0); > #endif > + } > + } > + > + return (EINVAL); > +} > + > +RANDOM_ADAPTOR_MODULE(random_rdrand, rdrand_modevent, 1); > Index: sys/dev/random/nehemiah.c > =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/dev/random/nehemiah.c (revision 253846) > +++ sys/dev/random/nehemiah.c (working copy) > @@ -28,19 +28,20 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#include "opt_cpu.h" > - > -#ifdef PADLOCK_RNG > - > #include > #include > #include > #include > +#include > #include > #include > +#include >=20 > #include > +#include > +#include >=20 > +#include > #include >=20 > #define RANDOM_BLOCK_SIZE 256 > @@ -50,7 +51,7 @@ static void random_nehemiah_init(void); > static void random_nehemiah_deinit(void); > static int random_nehemiah_read(void *, int); >=20 > -struct random_systat random_nehemiah =3D { > +struct random_adaptor random_nehemiah =3D { > .ident =3D "Hardware, VIA Nehemiah", > .init =3D random_nehemiah_init, > .deinit =3D random_nehemiah_deinit, > @@ -208,4 +209,33 @@ random_nehemiah_read(void *buf, int c) > return (c); > } >=20 > +static int > +nehemiah_modevent(module_t mod, int type, void *unused) > +{ > + > + switch (type) { > + case MOD_LOAD: > + if (via_feature_rng & VIA_HAS_RNG) { > + random_adaptor_register("nehemiah", = &random_nehemiah); > + EVENTHANDLER_INVOKE(random_adaptor_attach, > + &random_nehemiah); > + return (0); > + } else { > +#ifndef KLD_MODULE > + if (bootverbose) > +#endif > + printf( > + "%s: VIA RNG feature is not present on this = CPU\n", > + random_nehemiah.ident); > +#ifdef KLD_MODULE > + return (ENXIO); > +#else > + return (0); > #endif > + } > + } > + > + return (EINVAL); > +} > + > +RANDOM_ADAPTOR_MODULE(nehemiah, nehemiah_modevent, 1); > Index: sys/dev/random/probe.c > =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/dev/random/probe.c (revision 253846) > +++ sys/dev/random/probe.c (working copy) > @@ -28,66 +28,35 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > +#if defined(__amd64__) || defined(__i386__) > #include "opt_cpu.h" > #endif >=20 > -#include > #include > #include > #include > -#include > -#include > #include > -#include > - > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#include > -#include > -#include > -#include > -#endif >=20 > +#include > #include > -#include > - > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#ifdef PADLOCK_RNG > -extern struct random_systat random_nehemiah; > -#endif > -#ifdef RDRAND_RNG > -extern struct random_systat random_ivy; > -#endif > -#endif >=20 > void > -random_ident_hardware(struct random_systat **systat) > +random_ident_hardware(struct random_adaptor **adaptor) > { > + struct random_adaptor *tmp; > + int enable; >=20 > - /* Set default to software */ > - *systat =3D &random_yarrow; > + /* Set default to software (yarrow) */ > + *adaptor =3D random_adaptor_get("yarrow"); >=20 > /* Then go looking for hardware */ > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#ifdef PADLOCK_RNG > - if (via_feature_rng & VIA_HAS_RNG) { > - int enable; > - > - enable =3D 1; > - TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); > - if (enable) > - *systat =3D &random_nehemiah; > - } > -#endif > -#ifdef RDRAND_RNG > - if (cpu_feature2 & CPUID2_RDRAND) { > - int enable; > + enable =3D 1; > + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); > + if (enable && (tmp =3D random_adaptor_get("nehemiah"))) > + *adaptor =3D tmp; >=20 > - enable =3D 1; > - TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); > - if (enable) > - *systat =3D &random_ivy; > - } > -#endif > -#endif > + enable =3D 1; > + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); > + if (enable && (tmp =3D random_adaptor_get("rdrand"))) > + *adaptor =3D tmp; > } > Index: sys/dev/random/random_adaptors.c > =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/dev/random/random_adaptors.c (revision 0) > +++ sys/dev/random/random_adaptors.c (working copy) > @@ -0,0 +1,137 @@ > +/*- > + * Copyright (c) 2013 Arthur Mesh > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer > + * in this position and unchanged. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS = OR > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED = WARRANTIES > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE = DISCLAIMED. > + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES = (INCLUDING, BUT > + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS = OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON = ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR = TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE = USE OF > + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +LIST_HEAD(adaptors_head, random_adaptors); > +static struct adaptors_head adaptors =3D = LIST_HEAD_INITIALIZER(adaptors); > +static struct sx adaptors_lock; /* need a sleepable lock */ > + > +/* List for the dynamic sysctls */ > +static struct sysctl_ctx_list random_clist; > + > +MALLOC_DEFINE(M_RANDOM_ADAPTORS, "random_adaptors", "Random adaptors = buffers"); > + > +int > +random_adaptor_register(const char *name, struct random_adaptor *rsp) > +{ > + struct random_adaptors *rpp; > + > + KASSERT(name !=3D NULL && rsp !=3D NULL, ("invalid input to %s", = __func__)); > + > + rpp =3D malloc(sizeof(struct random_adaptors), = M_RANDOM_ADAPTORS, M_WAITOK); > + rpp->name =3D name; > + rpp->rsp =3D rsp; > + > + sx_xlock(&adaptors_lock); > + LIST_INSERT_HEAD(&adaptors, rpp, entries); > + sx_xunlock(&adaptors_lock); > + > + return (0); > +} > + > +struct random_adaptor * > +random_adaptor_get(const char *name) > +{ > + struct random_adaptors *rpp; > + struct random_adaptor *rsp; > + > + rsp =3D NULL; > + > + sx_slock(&adaptors_lock); > + > + LIST_FOREACH(rpp, &adaptors, entries) > + if (strcmp(rpp->name, name) =3D=3D 0) > + rsp =3D rpp->rsp; > + > + sx_sunlock(&adaptors_lock); > + > + return (rsp); > +} > + > +static void > +random_adaptors_deinit(void *unused) > +{ > + > + sx_destroy(&adaptors_lock); > + sysctl_ctx_free(&random_clist); > +} > + > +static int > +random_sysctl_adaptors_handler(SYSCTL_HANDLER_ARGS) > +{ > + struct random_adaptors *rpp; > + int error; > + > + error =3D 0; > + > + sx_slock(&adaptors_lock); > + > + if (LIST_EMPTY(&adaptors)) > + error =3D SYSCTL_OUT(req, "", strlen("")); > + > + LIST_FOREACH(rpp, &adaptors, entries) { > + if (0 !=3D SYSCTL_OUT(req, rpp->name, = strlen(rpp->name))) > + break; > + } > + > + sx_sunlock(&adaptors_lock); > + > + return (error); > +} > + > +static void > +random_adaptors_init(void *unused) > +{ > + > + SYSCTL_PROC(_kern_random, OID_AUTO, adaptors, > + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, > + NULL, 0, random_sysctl_adaptors_handler, "", > + "Random Number Generator adaptors"); > + > + sx_init(&adaptors_lock, "random_adaptors"); > +} > + > +SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, "Random Number = Generator"); > + > +SYSINIT(random_adaptors, SI_SUB_DRIVERS, SI_ORDER_FIRST, = random_adaptors_init, > + NULL); > +SYSUNINIT(random_adaptors, SI_SUB_DRIVERS, SI_ORDER_FIRST, > + random_adaptors_deinit, NULL); >=20 > Property changes on: sys/dev/random/random_adaptors.c > ___________________________________________________________________ > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property > Index: sys/dev/random/random_adaptors.h > =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/dev/random/random_adaptors.h (revision 0) > +++ sys/dev/random/random_adaptors.h (working copy) > @@ -0,0 +1,66 @@ > +/*- > + * Copyright (c) 2013 Arthur Mesh > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer > + * in this position and unchanged. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS = OR > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED = WARRANTIES > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE = DISCLAIMED. > + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES = (INCLUDING, BUT > + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS = OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON = ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR = TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE = USE OF > + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef __RANDOM_ADAPTORS_H__ > +#define __RANDOM_ADAPTORS_H__ > + > +#include > + > +struct random_adaptors { > + LIST_ENTRY(random_adaptors) entries; /* list of providesr */ > + const char *name; /* name of random = adaptor */ > + struct random_adaptor *rsp; > +}; > + > +struct random_adaptor *random_adaptor_get(const char *); > +int random_adaptor_register(const char *, struct random_adaptor *); > + > +/* > + * random_adaptor's should be registered prior to > + * random module (SI_SUB_DRIVERS/SI_ORDER_MIDDLE) > + */ > +#define RANDOM_ADAPTOR_MODULE(name, modevent, ver) \ > + static moduledata_t name##_mod =3D { = \ > + #name, \ > + modevent, \ > + 0 \ > + }; = \ > + DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, \ > + SI_ORDER_SECOND); \ > + MODULE_VERSION(name, ver); = \ > + MODULE_DEPEND(name, random, 1, 1, 1); > + > +typedef void (*random_adaptor_attach_hook)(void *, struct = random_adaptor *); > +EVENTHANDLER_DECLARE(random_adaptor_attach, = random_adaptor_attach_hook); > + > +/* kern.random sysctls */ > +#ifdef SYSCTL_DECL /* from sysctl.h */ > +SYSCTL_DECL(_kern_random); > +#endif /* SYSCTL_DECL */ > + > +#endif /* __RANDOM_ADAPTORS_H__ */ >=20 > Property changes on: sys/dev/random/random_adaptors.h > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Index: sys/dev/random/randomdev.c > =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/dev/random/randomdev.c (revision 253846) > +++ sys/dev/random/randomdev.c (working copy) > @@ -70,12 +70,15 @@ static struct cdevsw random_cdevsw =3D { > .d_name =3D "random", > }; >=20 > -struct random_systat *random_systat; > +static struct random_adaptor *random_adaptor; > +static eventhandler_tag attach_tag; > +static int random_inited; > + >=20 > /* For use with make_dev(9)/destroy_dev(9). */ > static struct cdev *random_dev; >=20 > -/* Used to fake out unused random calls in random_systat */ > +/* Used to fake out unused random calls in random_adaptor */ > void > random_null_func(void) > { > @@ -88,8 +91,8 @@ random_close(struct cdev *dev __unused,=20 > { > if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) =3D=3D= 0) > && (securelevel_gt(td->td_ucred, 0) =3D=3D 0)) { > - (*random_systat->reseed)(); > - random_systat->seeded =3D 1; > + (*random_adaptor->reseed)(); > + random_adaptor->seeded =3D 1; > arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ > } >=20 > @@ -104,8 +107,8 @@ random_read(struct cdev *dev __unused, s > void *random_buf; >=20 > /* Blocking logic */ > - if (!random_systat->seeded) > - error =3D (*random_systat->block)(flag); > + if (!random_adaptor->seeded) > + error =3D (*random_adaptor->block)(flag); >=20 > /* The actual read */ > if (!error) { > @@ -114,7 +117,7 @@ random_read(struct cdev *dev __unused, s >=20 > while (uio->uio_resid > 0 && !error) { > c =3D MIN(uio->uio_resid, PAGE_SIZE); > - c =3D (*random_systat->read)(random_buf, c); > + c =3D (*random_adaptor->read)(random_buf, c); > error =3D uiomove(random_buf, c, uio); > } >=20 > @@ -139,7 +142,7 @@ random_write(struct cdev *dev __unused,=20 > error =3D uiomove(random_buf, c, uio); > if (error) > break; > - (*random_systat->write)(random_buf, c); > + (*random_adaptor->write)(random_buf, c); > } >=20 > free(random_buf, M_TEMP); > @@ -172,14 +175,37 @@ random_poll(struct cdev *dev __unused, i > int revents =3D 0; >=20 > if (events & (POLLIN | POLLRDNORM)) { > - if (random_systat->seeded) > + if (random_adaptor->seeded) > revents =3D events & (POLLIN | POLLRDNORM); > else > - revents =3D (*random_systat->poll) (events,td); > + revents =3D (*random_adaptor->poll) (events,td); > } > return (revents); > } >=20 > +static void > +random_initialize(void *p, struct random_adaptor *s) > +{ > + if (random_inited) { > + printf("random: <%s> already initialized\n", > + random_adaptor->ident); > + return; > + } > + > + random_adaptor =3D s; > + > + (s->init)(); > + > + printf("random: <%s> initialized\n", s->ident); > + > + random_dev =3D make_dev_credf(MAKEDEV_ETERNAL_KLD, = &random_cdevsw, > + RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); > + make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ > + > + /* mark random(4) as initialized, to avoid being called again */ > + random_inited =3D 1; > +} > + > /* ARGSUSED */ > static int > random_modevent(module_t mod __unused, int type, void *data __unused) > @@ -188,23 +214,29 @@ random_modevent(module_t mod __unused, i >=20 > switch (type) { > case MOD_LOAD: > - random_ident_hardware(&random_systat); > - (*random_systat->init)(); > - > - if (bootverbose) > - printf("random: \n", > - random_systat->ident); > + random_ident_hardware(&random_adaptor); >=20 > - random_dev =3D make_dev_credf(MAKEDEV_ETERNAL_KLD, = &random_cdevsw, > - RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, = "random"); > - make_dev_alias(random_dev, "urandom"); /* XXX = Deprecated */ > + if (random_adaptor =3D=3D NULL) { > + printf( > + "random: No random adaptor attached, postponing = initialization\n"); > + attach_tag =3D = EVENTHANDLER_REGISTER(random_adaptor_attach, > + random_initialize, NULL, = EVENTHANDLER_PRI_ANY); > + } else { > + random_initialize(NULL, random_adaptor); > + } >=20 > break; >=20 > case MOD_UNLOAD: > - (*random_systat->deinit)(); > - > - destroy_dev(random_dev); > + if (random_adaptor !=3D NULL) { > + (*random_adaptor->deinit)(); > + destroy_dev(random_dev); > + } > + /* Unregister the event handler */ > + if (attach_tag !=3D NULL) { > + EVENTHANDLER_DEREGISTER(random_adaptor_attach, > + attach_tag); > + } >=20 > break; >=20 > Index: sys/dev/random/randomdev.h > =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/dev/random/randomdev.h (revision 253846) > +++ sys/dev/random/randomdev.h (working copy) > @@ -38,7 +38,7 @@ typedef void random_write_func_t(void *, > typedef int random_poll_func_t(int, struct thread *); > typedef void random_reseed_func_t(void); >=20 > -struct random_systat { > +struct random_adaptor { > struct selinfo rsel; > const char *ident; > int seeded; > @@ -51,7 +51,5 @@ struct random_systat { > random_reseed_func_t *reseed; > }; >=20 > -extern struct random_systat *random_systat; > - > -extern void random_ident_hardware(struct random_systat **); > +extern void random_ident_hardware(struct random_adaptor **); > extern void random_null_func(void); > Index: sys/dev/random/randomdev_soft.c > =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/dev/random/randomdev_soft.c (revision 253846) > +++ sys/dev/random/randomdev_soft.c (working copy) > @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -50,6 +51,7 @@ __FBSDID("$FreeBSD$"); > #include > #include >=20 > +#include > #include > #include >=20 > @@ -63,7 +65,7 @@ static int random_yarrow_poll(int event, > static int random_yarrow_block(int flag); > static void random_yarrow_flush_reseed(void); >=20 > -struct random_systat random_yarrow =3D { > +struct random_adaptor random_yarrow =3D { > .ident =3D "Software, Yarrow", > .init =3D random_yarrow_init, > .deinit =3D random_yarrow_deinit, > @@ -103,7 +105,7 @@ static int random_kthread_control =3D 0; > static struct proc *random_kthread_proc; >=20 > /* List for the dynamic sysctls */ > -struct sysctl_ctx_list random_clist; > +static struct sysctl_ctx_list random_clist; >=20 > /* ARGSUSED */ > static int > @@ -120,25 +122,20 @@ random_yarrow_init(void) > { > int error, i; > struct harvest *np; > - struct sysctl_oid *random_o, *random_sys_o, = *random_sys_harvest_o; > + struct sysctl_oid *random_sys_o, *random_sys_harvest_o; > enum esource e; >=20 > - random_o =3D SYSCTL_ADD_NODE(&random_clist, > - SYSCTL_STATIC_CHILDREN(_kern), > - OID_AUTO, "random", CTLFLAG_RW, 0, > - "Software Random Number Generator"); > - > - random_yarrow_init_alg(&random_clist, random_o); > + random_yarrow_init_alg(&random_clist); >=20 > random_sys_o =3D SYSCTL_ADD_NODE(&random_clist, > - SYSCTL_CHILDREN(random_o), > + SYSCTL_STATIC_CHILDREN(_kern_random), > OID_AUTO, "sys", CTLFLAG_RW, 0, > "Entropy Device Parameters"); >=20 > SYSCTL_ADD_PROC(&random_clist, > SYSCTL_CHILDREN(random_sys_o), > OID_AUTO, "seeded", CTLTYPE_INT | CTLFLAG_RW, > - &random_systat->seeded, 1, random_check_boolean, "I", > + &random_yarrow.seeded, 1, random_check_boolean, "I", > "Seeded State"); >=20 > random_sys_harvest_o =3D SYSCTL_ADD_NODE(&random_clist, > @@ -362,10 +359,10 @@ random_yarrow_write(void *buf, int count > void > random_yarrow_unblock(void) > { > - if (!random_systat->seeded) { > - random_systat->seeded =3D 1; > - selwakeuppri(&random_systat->rsel, PUSER); > - wakeup(random_systat); > + if (!random_yarrow.seeded) { > + random_yarrow.seeded =3D 1; > + selwakeuppri(&random_yarrow.rsel, PUSER); > + wakeup(&random_yarrow); > } > (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, > ARC4_ENTR_HAVE); > @@ -377,10 +374,10 @@ random_yarrow_poll(int events, struct th > int revents =3D 0; > mtx_lock(&random_reseed_mtx); >=20 > - if (random_systat->seeded) > + if (random_yarrow.seeded) > revents =3D events & (POLLIN | POLLRDNORM); > else > - selrecord(td, &random_systat->rsel); > + selrecord(td, &random_yarrow.rsel); >=20 > mtx_unlock(&random_reseed_mtx); > return revents; > @@ -394,12 +391,12 @@ random_yarrow_block(int flag) > mtx_lock(&random_reseed_mtx); >=20 > /* Blocking logic */ > - while (!random_systat->seeded && !error) { > + while (!random_yarrow.seeded && !error) { > if (flag & O_NONBLOCK) > error =3D EWOULDBLOCK; > else { > printf("Entropy device is blocking.\n"); > - error =3D msleep(random_systat, > + error =3D msleep(&random_yarrow, > &random_reseed_mtx, > PUSER | PCATCH, "block", 0); > } > @@ -420,3 +417,30 @@ random_yarrow_flush_reseed(void) >=20 > random_yarrow_reseed(); > } > + > +static int > +yarrow_modevent(module_t mod, int type, void *unused) > +{ > + > + switch (type) { > + case MOD_LOAD: > + random_adaptor_register("yarrow", &random_yarrow); > + /* > + * For statically built kernels that contain both = random.ko and > + * *_rng.ko, this event handler will do nothing, since > + * random.ko is loaded after *_rng.ko's, and hence = hasn't yet > + * registered for this event. > + * > + * In case where both random.ko and *_rng.ko are built = as > + * modules, random.ko is loaded prior to *_rng.ko's (by > + * dependency). This event handler is there to delay = creation > + * of /dev/{u,}random and attachment of this *_rng.ko. > + */ > + EVENTHANDLER_INVOKE(random_adaptor_attach, = &random_yarrow); > + return (0); > + } > + > + return (EINVAL); > +} > + > +RANDOM_ADAPTOR_MODULE(yarrow, yarrow_modevent, 1); > Index: sys/dev/random/randomdev_soft.h > =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/dev/random/randomdev_soft.h (revision 253846) > +++ sys/dev/random/randomdev_soft.h (working copy) > @@ -72,10 +72,10 @@ void random_process_event(struct harvest > void random_yarrow_reseed(void); > void random_yarrow_unblock(void); >=20 > -void random_yarrow_init_alg(struct sysctl_ctx_list *, struct = sysctl_oid *); > +void random_yarrow_init_alg(struct sysctl_ctx_list *); > void random_yarrow_deinit_alg(void); >=20 > -extern struct random_systat random_yarrow; > +extern struct random_adaptor random_yarrow; > extern struct mtx random_reseed_mtx; >=20 > /* If this was c++, this would be a template */ > Index: sys/dev/random/yarrow.c > =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/dev/random/yarrow.c (revision 253846) > +++ sys/dev/random/yarrow.c (working copy) > @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); > #include >=20 > #include > +#include > #include > #include >=20 > @@ -101,7 +102,7 @@ random_process_event(struct harvest *eve > } >=20 > void > -random_yarrow_init_alg(struct sysctl_ctx_list *clist, struct = sysctl_oid *in_o) > +random_yarrow_init_alg(struct sysctl_ctx_list *clist) > { > int i; > struct sysctl_oid *random_yarrow_o; > @@ -110,7 +111,7 @@ random_yarrow_init_alg(struct sysctl_ctx > * have a very good clue about what they do! > */ > random_yarrow_o =3D SYSCTL_ADD_NODE(clist, > - SYSCTL_CHILDREN(in_o), > + SYSCTL_STATIC_CHILDREN(_kern_random), > OID_AUTO, "yarrow", CTLFLAG_RW, 0, > "Yarrow Parameters"); >=20 > Index: sys/i386/conf/GENERIC > =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/i386/conf/GENERIC (revision 253845) > +++ sys/i386/conf/GENERIC (working copy) > @@ -309,6 +309,7 @@ device loop # Network = loopback > device random # Entropy device > options PADLOCK_RNG # VIA Padlock RNG > options RDRAND_RNG # Intel Bull Mountain RNG > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/i386/conf/XBOX > =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/i386/conf/XBOX (revision 253845) > +++ sys/i386/conf/XBOX (working copy) > @@ -62,6 +62,7 @@ device pass # Passthrough = device (dire > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device tun # Packet tunnel. > #device md # Memory "disks" > Index: sys/i386/conf/XEN > =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/i386/conf/XEN (revision 253845) > +++ sys/i386/conf/XEN (working copy) > @@ -76,6 +76,7 @@ device pci > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device tun # Packet tunnel. > device md # Memory "disks" > @@ -90,4 +91,3 @@ options AH_SUPPORT_AR5416 > # Be aware of the administrative consequences of enabling this! > # Note that 'bpf' is required for DHCP. > device bpf # Berkeley packet filter > - > Index: sys/ia64/conf/GENERIC > =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/ia64/conf/GENERIC (revision 253845) > +++ sys/ia64/conf/GENERIC (working copy) > @@ -198,6 +198,7 @@ device loop # Network = loopback > device md # Memory "disks" > device puc # Multi I/O cards and = multi-channel UARTs > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device tun # Packet tunnel. > device uart # Serial port (UART) > device vlan # 802.1Q VLAN support > Index: sys/mips/conf/AR71XX_BASE > =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/mips/conf/AR71XX_BASE (revision 253845) > +++ sys/mips/conf/AR71XX_BASE (working copy) > @@ -24,7 +24,7 @@ makeoptions DEBUG=3D-g #Build kernel = with >=20 > # Build these as modules so small platform builds will have the > # modules already built. > -makeoptions MODULES_OVERRIDE=3D"random gpio ar71xx if_gif if_gre = if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip = wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" > +makeoptions MODULES_OVERRIDE=3D"random yarrow_rng gpio ar71xx if_gif = if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep = wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" >=20 > options DDB > options KDB > @@ -115,6 +115,7 @@ device ether > device md > device bpf > device random > +options YARROW_RNG # Yarrow software RNG > device if_bridge > device gif # ip[46] in ip[46] tunneling = protocol > device gre # generic encapsulation - only = for IPv4 in IPv4 though atm > Index: sys/mips/conf/AR724X_BASE > =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/mips/conf/AR724X_BASE (revision 253845) > +++ sys/mips/conf/AR724X_BASE (working copy) > @@ -25,7 +25,7 @@ makeoptions DEBUG=3D-g #Build kernel = with >=20 > # Build these as modules so small platform builds will have the > # modules already built. > -makeoptions MODULES_OVERRIDE=3D"random gpio ar71xx if_gif if_gre = if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip = wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" > +makeoptions MODULES_OVERRIDE=3D"random yarrow_rng gpio ar71xx if_gif = if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep = wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" >=20 > options DDB > options KDB > Index: sys/mips/conf/AR91XX_BASE > =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/mips/conf/AR91XX_BASE (revision 253845) > +++ sys/mips/conf/AR91XX_BASE (working copy) > @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" > hints "AR91XX_BASE.hints" >=20 > makeoptions DEBUG=3D-g #Build kernel with gdb(1) debug = symbols > -makeoptions MODULES_OVERRIDE=3D"random gpio ar71xx if_gif if_gre = if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip = wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" > +makeoptions MODULES_OVERRIDE=3D"random yarrow_rng gpio ar71xx if_gif = if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep = wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" >=20 > options DDB > options KDB > @@ -113,6 +113,7 @@ device ether > device md > device bpf > device random > +options YARROW_RNG # Yarrow software RNG > device if_bridge > device gpio > device gpioled > Index: sys/mips/conf/AR933X_BASE > =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/mips/conf/AR933X_BASE (revision 253845) > +++ sys/mips/conf/AR933X_BASE (working copy) > @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" > hints "AR933X_BASE.hints" >=20 > makeoptions DEBUG=3D-g #Build kernel with gdb(1) debug = symbols > -# makeoptions MODULES_OVERRIDE=3D"random gpio ar71xx if_gif = if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep = wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" > +# makeoptions MODULES_OVERRIDE=3D"random yarrow_rng gpio = ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl = wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" > makeoptions MODULES_OVERRIDE=3D"" >=20 > options DDB > @@ -119,6 +119,7 @@ device ether > device md > device bpf > device random > +options YARROW_RNG # Yarrow software RNG > device if_bridge > device gpio > device gpioled > Index: sys/mips/conf/BERI_TEMPLATE > =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/mips/conf/BERI_TEMPLATE (revision 253845) > +++ sys/mips/conf/BERI_TEMPLATE (working copy) > @@ -55,4 +55,5 @@ device md > device ether > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device snp > Index: sys/mips/conf/DIR-825 > =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/mips/conf/DIR-825 (revision 253845) > +++ sys/mips/conf/DIR-825 (working copy) > @@ -20,6 +20,7 @@ hints "DIR-825.hints" > # Since the kernel image must fit inside 1024KiB, we have to build = almost > # everything as modules. > nodevice random > +nooptions YARROW_RNG > nodevice gpio > nodevice gpioled > nodevice gif > Index: sys/mips/conf/GXEMUL > =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/mips/conf/GXEMUL (revision 253845) > +++ sys/mips/conf/GXEMUL (working copy) > @@ -51,6 +51,7 @@ device gxemul_ether > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device tun # Packet tunnel. > device md # Memory "disks" > Index: sys/mips/conf/OCTEON1 > =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/mips/conf/OCTEON1 (revision 253845) > +++ sys/mips/conf/OCTEON1 (working copy) > @@ -256,6 +256,7 @@ device wi # = WaveLAN/Intersil/Symbol 80 > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/mips/conf/PB92 > =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/mips/conf/PB92 (revision 253845) > +++ sys/mips/conf/PB92 (working copy) > @@ -22,7 +22,7 @@ options AR71XX_ENV_UBOOT > # who already are using it without modifying the default flash layout) > # we need to cut down on a lot of things. >=20 > -makeoptions MODULES_OVERRIDE=3D"ath ath_pci ath_ahb bridgestp = if_bridge if_gif if_gre random wlan wlan_acl wlan_amrr wlan_ccmp = wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" > +makeoptions MODULES_OVERRIDE=3D"ath ath_pci ath_ahb bridgestp = if_bridge if_gif if_gre random yarrow_rng wlan wlan_acl wlan_amrr = wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" >=20 > hints "PB92.hints" > include "../atheros/std.ar71xx" > Index: sys/mips/conf/RT305X > =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/mips/conf/RT305X (revision 253845) > +++ sys/mips/conf/RT305X (working copy) > @@ -24,7 +24,7 @@ makeoptions MIPS_LITTLE_ENDIAN=3Ddefined > makeoptions KERNLOADADDR=3D0x80001000 >=20 > # Don't build any modules yet. > -makeoptions MODULES_OVERRIDE=3D"wlan_xauth wlan_wep wlan_tkip = wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt random if_bridge bridgestp = msdosfs md ipfw dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g = usb/umodem usb/umass usb/ucom cam zlib" > +makeoptions MODULES_OVERRIDE=3D"wlan_xauth wlan_wep wlan_tkip = wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt random yarrow_rng if_bridge = bridgestp msdosfs md ipfw dummynet libalias geom/geom_label ufs = usb/uplcom usb/u3g usb/umodem usb/umass usb/ucom cam zlib" > makeoptions RT3052F >=20 > include "../rt305x/std.rt305x" > @@ -90,6 +90,7 @@ options MROUTING =20 > options IPFIREWALL_DEFAULT_TO_ACCEPT >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > # RT3050F, RT3052F have only pseudo PHYs, so mii not required > device rt > Index: sys/mips/conf/XLR64 > =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/mips/conf/XLR64 (revision 253845) > +++ sys/mips/conf/XLR64 (working copy) > @@ -84,6 +84,7 @@ device uart > # Pseudo > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device md > device bpf >=20 > Index: sys/mips/conf/XLRN32 > =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/mips/conf/XLRN32 (revision 253845) > +++ sys/mips/conf/XLRN32 (working copy) > @@ -85,6 +85,7 @@ device uart > # Pseudo > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device md > device bpf >=20 > Index: sys/mips/conf/std.SWARM > =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/mips/conf/std.SWARM (revision 253845) > +++ sys/mips/conf/std.SWARM (working copy) > @@ -42,6 +42,7 @@ device loop > device ether > device md > device random > +options YARROW_RNG # Yarrow software RNG >=20 > options USB_DEBUG > device usb > Index: sys/mips/conf/std.XLP > =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/mips/conf/std.XLP (revision 253845) > +++ sys/mips/conf/std.XLP (working copy) > @@ -65,6 +65,7 @@ makeoptions FDT_DTS_FILE=3Dxlp-basic.dts > # Pseudo > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device md > device bpf >=20 > Index: sys/modules/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/Makefile (revision 253845) > +++ sys/modules/Makefile (working copy) > @@ -254,6 +254,7 @@ SUBDIR=3D \ > ${_opensolaris} \ > oce \ > ${_padlock} \ > + ${_padlock_rng} \ > patm \ > ${_pccard} \ > ${_pcfclock} \ > @@ -280,6 +281,7 @@ SUBDIR=3D \ > ${_random} \ > rc4 \ > ${_rdma} \ > + ${_rdrand_rng} \ > re \ > reiserfs \ > rl \ > @@ -363,11 +365,14 @@ SUBDIR=3D \ > ${_x86bios} \ > ${_xe} \ > xl \ > + yarrow_rng \ > ${_zfs} \ > zlib \ >=20 > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" > _filemon=3D filemon > +_padlock_rng=3D padlock_rng > +_rdrand_rng=3D rdrand_rng > .endif >=20 > .if ${MACHINE_CPUARCH} !=3D "powerpc" && ${MACHINE_CPUARCH} !=3D "arm" = && \ > Index: sys/modules/padlock_rng/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/padlock_rng/Makefile (revision 0) > +++ sys/modules/padlock_rng/Makefile (working copy) > @@ -0,0 +1,10 @@ > +# $FreeBSD$ > + > +.PATH: ${.CURDIR}/../../dev/random > + > +KMOD=3D padlock_rng > + > +SRCS+=3D \ > + nehemiah.c > + > +.include >=20 > Property changes on: sys/modules/padlock_rng/Makefile > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Index: sys/modules/rdrand_rng/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/rdrand_rng/Makefile (revision 0) > +++ sys/modules/rdrand_rng/Makefile (working copy) > @@ -0,0 +1,10 @@ > +# $FreeBSD$ > + > +.PATH: ${.CURDIR}/../../dev/random > + > +KMOD=3D rdrand_rng > + > +SRCS+=3D \ > + ivy.c > + > +.include >=20 > Property changes on: sys/modules/rdrand_rng/Makefile > ___________________________________________________________________ > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property > Index: sys/modules/yarrow_rng/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/yarrow_rng/Makefile (revision 0) > +++ sys/modules/yarrow_rng/Makefile (working copy) > @@ -0,0 +1,19 @@ > +# $FreeBSD$ > + > +.PATH: ${.CURDIR}/../../dev/random > +.PATH: ${.CURDIR}/../../crypto/rijndael > + > +KMOD=3D yarrow_rng > + > +SRCS+=3D \ > + hash.c \ > + randomdev_soft.c \ > + rijndael-alg-fst.c \ > + rijndael-api-fst.c \ > + yarrow.c > + > +SRCS+=3D bus_if.h device_if.h > + > +CFLAGS+=3D -I${.CURDIR}/../.. > + > +.include >=20 > Property changes on: sys/modules/yarrow_rng/Makefile > ___________________________________________________________________ > Added: svn:mime-type > ## -0,0 +1 ## > +text/plain > \ No newline at end of property > Added: svn:keywords > ## -0,0 +1 ## > +FreeBSD=3D%H > \ No newline at end of property > Added: svn:eol-style > ## -0,0 +1 ## > +native > \ No newline at end of property > Index: sys/pc98/conf/GENERIC > =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/pc98/conf/GENERIC (revision 253845) > +++ sys/pc98/conf/GENERIC (working copy) > @@ -217,6 +217,7 @@ options AH_SUPPORT_AR5416 # enable AR54 > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/powerpc/conf/GENERIC > =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/powerpc/conf/GENERIC (revision 253845) > +++ sys/powerpc/conf/GENERIC (working copy) > @@ -144,6 +144,7 @@ device fxp # Intel = EtherExpress PRO/10 > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/powerpc/conf/GENERIC64 > =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/powerpc/conf/GENERIC64 (revision 253845) > +++ sys/powerpc/conf/GENERIC64 (working copy) > @@ -141,6 +141,7 @@ device fxp # Intel = EtherExpress PRO/10 > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/powerpc/conf/MPC85XX > =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/powerpc/conf/MPC85XX (revision 253845) > +++ sys/powerpc/conf/MPC85XX (working copy) > @@ -76,6 +76,7 @@ device pass > device pci > device quicc > device random > +options YARROW_RNG # Yarrow software RNG > #device rl > device scbus > device scc > Index: sys/powerpc/conf/WII > =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/powerpc/conf/WII (revision 253845) > +++ sys/powerpc/conf/WII (working copy) > @@ -72,6 +72,7 @@ makeoptions SC_DFLT_FONT=3Dcp437 > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: sys/sparc64/conf/GENERIC > =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/sparc64/conf/GENERIC (revision 253845) > +++ sys/sparc64/conf/GENERIC (working copy) > @@ -215,6 +215,7 @@ device ath_rate_sample # SampleRate tx=20= > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. > Index: tools/tools/sysdoc/sysdoc.sh > =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 > --- tools/tools/sysdoc/sysdoc.sh (revision 253845) > +++ tools/tools/sysdoc/sysdoc.sh (working copy) > @@ -88,7 +88,7 @@ EOF > # tunables in our tunables.mdoc file and generate > # the final 'inner circle' of our manual page. > markup_create() { > - sort < _names | \ > + sort -u < _names | \ > xargs -n 1 /bin/sh ./sysctl.sh \ > > markup.file \ > 2> tunables.TODO > @@ -238,9 +238,13 @@ if [ -z "$LOCATION" ] ; > && for x in `find $LOCATION -name '*.kld'` \ > $LOCATION/kernel; \ > do nm $x | \ > - grep ' sysctl___' | uniq | \ > - sed 's/sysctl___//g' | sed 's/_/./g' | \ > - awk {'print $3'} > _names; > + sed -n '/sysctl___/ { > + 's/[\.a-z_]*sysctl___//g' > + 's/_/./g' > + p > + }' | \ > + awk {'print $3'} | \ > + sort -u > _names; > done; > markup_create > page_create > Index: tools/tools/sysdoc/tunables.mdoc > =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 > --- tools/tools/sysdoc/tunables.mdoc (revision 253845) > +++ tools/tools/sysdoc/tunables.mdoc (working copy) > @@ -1093,6 +1093,13 @@ line programs. > kern.quantum >=20 > --- > +kern.random.adaptors > +str > + > +Displays registered PRNG adaptors (sources). > +This is a read-only variable. > + > +--- > kern.random.sys.burst >=20 > --- >=20 > --=20 > -- David (obrien@FreeBSD.org) > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to = "freebsd-arch-unsubscribe@freebsd.org"