summaryrefslogtreecommitdiffstats
path: root/etc
Commit message (Collapse)AuthorAgeFilesLines
...
* Migrate tools/regression/bin/ tests to the new layout.jmmv2013-12-111-0/+26
| | | | | | | | | | | | | | | | | | | | This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
* Rev 256256 had an undocumented side effect of breaking existing behaviorpeter2013-12-081-2/+2
| | | | | | | | for ipv6 jails. Among the harmful side effects included putting a route to an entire /64 onto an interface even if you were in a smaller network - eg: /80. This broke the freebsd.org cluster hosted at ISC which has /80 networks.
* Regen.kevlo2013-12-061-3/+3
|
* Install teken.h for userland.ray2013-12-051-0/+2
| | | | | | | | Part of VT(9) project merge. Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation
* The rc system aggressively caches the contents of /etc/rc.conf in order tocperciva2013-12-031-0/+5
| | | | | | | | | | | | | improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. Since performance considerations make it infeasible to automatically detect if the cached /etc/rc.conf parameters should be invalidated, provide a mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch SIGALRM and reload /etc/rc.conf if it is received. Discussed on: freebsd-rc MFC after: 3 days
* Add DragonFly BSD fingerprints to pf.oseadler2013-12-031-0/+8
| | | | Obtained From: DragonFly BSD (commit 321b0bb006b0857d2c212dc8cd12a36d750bcf9a)
* Add an autologin entry for the console.eadler2013-12-031-0/+2
| | | | Obtained From: DragonFly BSD (commit f95025e8c9a4471edb610557263b12acd8e7fb3a)
* Add Veritas NetBackupeadler2013-12-031-0/+2
| | | | Obtained From: DragonFly BSD
* Add the Short Message Peer-to-Peer protocoleadler2013-12-031-0/+2
| | | | | PR: conf/183398 Submitted by: olgeni
* Please welcome casperd daemon. It (and its services) will be responsible forpjd2013-12-028-0/+24
| | | | | | | | | | | | | | | | | | | giving access to functionality that is not available in capability mode sandbox. The functionality can be precisely restricted. Start with the following services: - system.dns - provides API compatible to: - gethostbyname(3), - gethostbyname2(3), - gethostbyaddr(3), - getaddrinfo(3), - getnameinfo(3), - system.grp - provides getgrent(3)-compatible API, - system.pwd - provides getpwent(3)-compatible API, - system.random - allows to obtain entropy from /dev/random, - system.sysctl - provides sysctlbyname(3-compatible API. Sponsored by: The FreeBSD Foundation
* Create /var/cache with mode 0755 instead of 0750.delphij2013-11-261-1/+1
| | | | | | | This directory is used by many third party applications and having permission 0750 makes it impossible to drop group privileges. MFC after: 3 days
* Regenerate after r258363 (alternate ID for Novatel MiFi 2200) andtruckman2013-11-201-3/+3
| | | | r258333 (bus_autoconf.sh tweak).
* Regenerate usb.conf after r258331.markj2013-11-191-9/+90
|
* Add some sample test programs.jmmv2013-11-181-0/+10
| | | | | | | | | | | | | | | | | | | This change adds some sample test cases to share/examples/tests/ demonstrating the basic usage of the atf and plain interfaces. These test programs are fully-functional and are installed as part of the test suite, which guarantees that the sample code remains correct. However, they currently mostly serve as a placeholder for additional examples and may be incomplete (depending on how you look at them). I will see what else can be useful while working on documentation. As a bonus, the addition of these tests exercise the *.test.mk files, one of which (plain.test.mk) was not yet in use, and also demonstrates that it's possible to mix different kinds of test programs into the same test suite. Approved by: rpaulo (mentor)
* Move all atf directories to the tests mtree.jmmv2013-11-164-25/+31
| | | | | | | | | This is to ensure that test-related directories don't get needlessly created (and later deleted) when MK_TESTS=no. Problem found by jhb@. Approved by: rpaulo (mentor)
* Install BSD.tests.mtree when MK_TESTS is yes.jmmv2013-11-161-0/+4
| | | | | | Problem found by jhb@. Approved by: rpaulo (mentor)
* Enabled should be a boolean, not a stringbapt2013-11-161-1/+1
| | | | MFC after: 2 days
* Add support for multiple instances of ftp-proxyjpaetzel2013-11-132-8/+111
| | | | | | | and pflog devices. PR: conf/158171 Submitted by: Thomas Johnson <tom@claimlynx.com>
* Revert r257715. This breaks the case where devd isn't running. Thejhb2013-11-121-0/+6
| | | | | real solution to this is still being discussed and probably won't look quite like this.
* Build and install the atf tests.jmmv2013-11-081-0/+20
| | | | | Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
* Don't explicitly invoke ifn_start on new child interfaces (vaps andjhb2013-11-051-6/+0
| | | | | | | | | | | subinterfaces) after they are created. Interfaces are already started by devd invoking /etc/pccard_ether when they are created, so the explicit calls in childif_create() resulted in interfaces being started twice. Note that interfaces created via cloned_interfaces are not explicitly started but depend on the devd mechanism already. MFC after: 1 week
* Remove remnants of BIND from /etc, since there is no BIND in base now.glebius2013-11-0516-896/+4
| | | | | | | Sorry, that would break users running head and BIND from ports, since ports rely on these scripts. The ports will be fixed soon. Reviewed by: erwin
* Use proper capitalization for FreeBSD.orgbdrewery2013-11-051-1/+1
| | | | | Approved by: bapt MFC after: 2 days
* Enable fingerprint checking as the currently knownbdrewery2013-11-051-1/+1
| | | | | | | fingerprint has an uploaded signature on all mirrors. Approved by: bapt MFC after: 2 days
* After around 20 years of duty it is time for pkg_install to retirebapt2013-10-317-206/+0
|
* Fix indentation.jlh2013-10-291-1/+1
| | | | MFC after: 4 days
* Fix compatibility function for old daily_status_security_${name}_enablejlh2013-10-291-2/+2
| | | | | | | | variable PR: conf/183137 Reported by: Adam McDougall <mcdouga9 at egr msu edu> MFC after: 3 days
* Move /etc/keys to /usr/share/keys where users are less likely to modify them.bdrewery2013-10-298-35/+9
| | | | | Requested by: secteam (cperciva, des) Approved by: bapt
* Remove more remnants of ng_fec(4).glebius2013-10-283-55/+0
| | | | | | | | The ng_create_one() and ng_mkpeer() functions in network.subr are now not used anywhere, but I left them, since they can be useful in future in netgraph scripting. Submitted by: pluknet
* Move new pf includes to the pf directory. The pfvar.h remainglebius2013-10-271-0/+4
| | | | | | | | | | in net, to avoid compatibility breakage for no sake. The future plan is to split most of non-kernel parts of pfvar.h into pf.h, and then make pfvar.h a kernel only include breaking compatibility. Discussed with: bz
* Fix indentationbdrewery2013-10-261-5/+5
| | | | | | | Reported by: zont Approved by: bapt (implicit) MFC after: 2 days X-MFC-With: r257145
* Add missing /etc/pkg to BSD.root.distbdrewery2013-10-261-0/+2
| | | | | | Approved by: bapt MFC after: 2 days X-MFC-With: r257145
* Disable fingerprint checking for now as the pkg repository mirrors willbdrewery2013-10-261-1/+1
| | | | | | not receive the signature until later this week. Approved by: bapt
* Add infrastructure for installing pkg(8) keys into /etc/keys/pkg and addbdrewery2013-10-266-0/+34
| | | | | | | | the current test key that packages will be signed with until 10.0-RELEASE. Approved by: bapt Discussed by: bapt with des MFC after: 2 days
* Support checking signature for pkg bootstrap.bdrewery2013-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If the pkg.conf is configured with SIGNATURE_TYPE: FINGERPRINTS, and FINGERPRINTS: /etc/keys/pkg then a pkg.sig file is fetched along with pkg.txz. The signature contains the signature provided by the signing server, and the public key. The .sig is the exact output from the signing server in the following format: SIGNATURE <openssl signed> CERT <rsa public key> END The signature is verified with the following logic: - If the .sig file is missing, it fails. - If the .sig doesn't validate, it fails. - If the public key in the .sig is not in the known trusted fingerprints, it fails. - If the public key is in the revoked key list, it fails. Approved by: bapt MFC after: 2 days Discussed by: bapt with des, jonathan, gavin
* Add support for reading configuration files from /etc/pkg.bdrewery2013-10-263-0/+19
| | | | | | | | | | | | | | | | For now only /etc/pkg/FreeBSD.conf is supported. Its style is: Repo: { URL: "...", MIRROR_TYPE: "...", ... } The configuration will be read from /usr/local/etc/pkg.conf if exists, otherwise /etc/pkg/FreeBSD.conf Approved by: bapt MFC after: 2 days
* Set up the /usr/tests hierarchy.rpaulo2013-10-252-0/+18
| | | | | | | | | | | | | | | | | | | Populate /usr/tests with the only test programs that currently live in the tree (those in lib/libcrypt/tests/) and add all the build machinery to accompany this change. In particular: - Add a WITHOUT_TESTS variable that users can define to request that no tests be put in /usr/tests. - Add a top-level Kyuafile for /usr/tests and a way to create similar Kyuafiles in top-level subdirectories. - Add a BSD.tests.dist file to define the directory layout of /usr/tests. Submitted by: Julio Merino jmmv google.com Reviewed by: sjg MFC after: 2 weeks
* Cleanup empty directorieszont2013-10-241-4/+0
| | | | PR: conf/167133
* Add a reload command.des2013-10-221-0/+6
| | | | | Reviewed by: hrs MFC after: 3 days
* Start rtsold if necessary.des2013-10-221-0/+1
| | | | | Reviewed by: hrs MFC after: 3 days
* Add a resource limit for the total number of kqueues available to thekib2013-10-211-0/+1
| | | | | | | | | | | | | | | | | | user. Kqueue now saves the ucred of the allocating thread, to correctly decrement the counter on close. Under some specific and not real-world use scenario for kqueue, it is possible for the kqueues to consume memory proportional to the square of the number of the filedescriptors available to the process. Limit allows administrator to prevent the abuse. This is kernel-mode side of the change, with the user-mode enabling commit following. Reported and tested by: pho Discussed with: jmg Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* - Fix jail_parallel_start="YES".hrs2013-10-211-26/+60
| | | | | | - Fix ip[46].addr when interface parameter is not defined. Spotted by: rpaulo
* Add support for "first boot" rc.d scripts. [1]cperciva2013-10-192-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These scripts, containing # KEYWORD: firstboot will only be run if a sentinel file (default: /firstboot, configurable via the rc.conf ${firstboot_sentinel} variable) exists; this sentinel file will be deleted at the end of the boot process. Scripts can request that the system reboot after the first boot by creating the file ${firstboot_sentinel}-reboot. This functionality is expected to be useful for embedded systems and virtual machine images, where it may be desirable to (a) download and install updates which became available between when the image was created and when it was "turned on"; (b) download and install packages which may be newer than those which were available when the image was created; (c) install packages which run binaries during their install process, bypassing the problem of cross-architecture installs; (d) resize filesystems to match the disk onto which a VM image was installed; (e) perform initialization tasks relevant to cloud systems (e.g., Amazon's Elastic Compute Cloud); and likely to perform many other one-time initialization functions. Document this new functionality in rc.conf(5) and rc(8). [2] Reviewed by: freebsd-current, freebsd-rc [1] Reviewed by: Warren Block [2] MFC after: 3 days
* Enable the automatic creation of a certificate (if one does not exists)jmg2013-10-193-0/+142
| | | | | | | | | | | | | | | | | and enable the usage by sendmail if sendmail is enabled. Include and document knobs to disable this feature and also set the Common Name of the certificate created. As the certificate is signed w/ a discarded key, it only helps prevent Eve, but not Malory from knowing the contents of the emails. This means that new installs (and people that use the updated freebsd.mc file) will automaticly have STARTTLS enabled allowing incoming email to be encrypted in most cases. Reviewed by: gshapiro MFC after: 3 days Security: Yes, please.
* Last few remnants of BIND (hopefully...)des2013-10-191-6/+0
| | | | MFC after: 3 days
* - Fix a bug which prevented jails from starting when $jail_conf was used andhrs2013-10-181-15/+26
| | | | | | | no jail name was specified. - Display error messages when start/stop fails. Reported by: swills
* - Fix "ifname|addr" syntax support in jail_{jname}_ip.hrs2013-10-151-17/+44
| | | | - Create /var/run/jail_{jname}.id because ezjail-admin depends on it.
* - Normalize jailname. "example.com" is converted to "example_com".hrs2013-10-141-20/+34
| | | | | | | | | - Fix a bug that some $jail_{jname}_foo variables did not work. - Fix a bug which prevented $jail_devfs_ruleset from working[1]. - Move $jail_parameters to the last of the configuraiton lines[1]. Reported by: Jase Thew[1] Approved by: re (glebius)
* - Add mount.fdescfs parameter to jail(8). This is similar tohrs2013-10-121-3/+2
| | | | | | | | | | mount.devfs but mounts fdescfs. The mount happens just after mount.devfs. - rc.d/jail now displays whole error message from jail(8) when a jail fails to start. Approved by: re (gjb)
* Merge from project branch. Uninteresting commits are trimmed.markm2013-10-122-34/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor of /dev/random device. Main points include: * Userland seeding is no longer used. This auto-seeds at boot time on PC/Desktop setups; this may need some tweeking and intelligence from those folks setting up embedded boxes, but the work is believed to be minimal. * An entropy cache is written to /entropy (even during installation) and the kernel uses this at next boot. * An entropy file written to /boot/entropy can be loaded by loader(8) * Hardware sources such as rdrand are fed into Yarrow, and are no longer available raw. ------------------------------------------------------------------------ r256240 | des | 2013-10-09 21:14:16 +0100 (Wed, 09 Oct 2013) | 4 lines Add a RANDOM_RWFILE option and hide the entropy cache code behind it. Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA. Add the RANDOM_* options to LINT. ------------------------------------------------------------------------ r256239 | des | 2013-10-09 21:12:59 +0100 (Wed, 09 Oct 2013) | 2 lines Define RANDOM_PURE_RNDTEST for rndtest(4). ------------------------------------------------------------------------ r256204 | des | 2013-10-09 18:51:38 +0100 (Wed, 09 Oct 2013) | 2 lines staticize struct random_hardware_source ------------------------------------------------------------------------ r256203 | markm | 2013-10-09 18:50:36 +0100 (Wed, 09 Oct 2013) | 2 lines Wrap some policy-rich code in 'if NOTYET' until we can thresh out what it really needs to do. ------------------------------------------------------------------------ r256184 | des | 2013-10-09 10:13:12 +0100 (Wed, 09 Oct 2013) | 2 lines Re-add /dev/urandom for compatibility purposes. ------------------------------------------------------------------------ r256182 | des | 2013-10-09 10:11:14 +0100 (Wed, 09 Oct 2013) | 3 lines Add missing include guards and move the existing ones out of the implementation namespace. ------------------------------------------------------------------------ r256168 | markm | 2013-10-08 23:14:07 +0100 (Tue, 08 Oct 2013) | 10 lines Fix some just-noticed problems: o Allow this to work with "nodevice random" by fixing where the MALLOC pool is defined. o Fix the explicit reseed code. This was correct as submitted, but in the project branch doesn't need to set the "seeded" bit as this is done correctly in the "unblock" function. o Remove some debug ifdeffing. o Adjust comments. ------------------------------------------------------------------------ r256159 | markm | 2013-10-08 19:48:11 +0100 (Tue, 08 Oct 2013) | 6 lines Time to eat crow for me. I replaced the sx_* locks that Arthur used with regular mutexes; this turned out the be the wrong thing to do as the locks need to be sleepable. Revert this folly. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> (In original diff) ------------------------------------------------------------------------ r256138 | des | 2013-10-08 12:05:26 +0100 (Tue, 08 Oct 2013) | 10 lines Add YARROW_RNG and FORTUNA_RNG to sys/conf/options. Add a SYSINIT that forces a reseed during proc0 setup, which happens fairly late in the boot process. Add a RANDOM_DEBUG option which enables some debugging printf()s. Add a new RANDOM_ATTACH entropy source which harvests entropy from the get_cyclecount() delta across each call to a device attach method. ------------------------------------------------------------------------ r256135 | markm | 2013-10-08 07:54:52 +0100 (Tue, 08 Oct 2013) | 8 lines Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use EVENTHANDLER(mountroot) instead. This means we can't count on /var being present, so something will need to be done about harvesting /var/db/entropy/... . Some policy now needs to be sorted out, and a pre-sync cache needs to be written, but apart from that we are now ready to go. Over to review. ------------------------------------------------------------------------ r256094 | markm | 2013-10-06 23:45:02 +0100 (Sun, 06 Oct 2013) | 8 lines Snapshot. Looking pretty good; this mostly works now. New code includes: * Read cached entropy at startup, both from files and from loader(8) preloaded entropy. Failures are soft, but announced. Untested. * Use EVENTHANDLER to do above just before we go multiuser. Untested. ------------------------------------------------------------------------ r256088 | markm | 2013-10-06 14:01:42 +0100 (Sun, 06 Oct 2013) | 2 lines Fix up the man page for random(4). This mainly removes no-longer-relevant details about HW RNGs, reseeding explicitly and user-supplied entropy. ------------------------------------------------------------------------ r256087 | markm | 2013-10-06 13:43:42 +0100 (Sun, 06 Oct 2013) | 6 lines As userland writing to /dev/random is no more, remove the "better than nothing" bootstrap mode. Add SWI harvesting to the mix. My box seeds Yarrow by itself in a few seconds! YMMV; more to follow. ------------------------------------------------------------------------ r256086 | markm | 2013-10-06 13:40:32 +0100 (Sun, 06 Oct 2013) | 11 lines Debug run. This now works, except that the "live" sources haven't been tested. With all sources turned on, this unlocks itself in a couple of seconds! That is no my box, and there is no guarantee that this will be the case everywhere. * Cut debug prints. * Use the same locks/mutexes all the way through. * Be a tad more conservative about entropy estimates. ------------------------------------------------------------------------ r256084 | markm | 2013-10-06 13:35:29 +0100 (Sun, 06 Oct 2013) | 5 lines Don't use the "real" assembler mnemonics; older compilers may not understand them (like when building CURRENT on 9.x). # Submitted by: Konstantin Belousov <kostikbel@gmail.com> ------------------------------------------------------------------------ r256081 | markm | 2013-10-06 10:55:28 +0100 (Sun, 06 Oct 2013) | 12 lines SNAPSHOT. Simplify the malloc pools; We only need one for this device. Simplify the harvest queue. Marginally improve the entropy pool hashing, making it a bit faster in the process. Connect up the hardware "live" source harvesting. This is simplistic for now, and will need to be made rate-adaptive. All of the above passes a compile test but needs to be debugged. ------------------------------------------------------------------------ r256042 | markm | 2013-10-04 07:55:06 +0100 (Fri, 04 Oct 2013) | 25 lines Snapshot. This passes the build test, but has not yet been finished or debugged. Contains: * Refactor the hardware RNG CPU instruction sources to feed into the software mixer. This is unfinished. The actual harvesting needs to be sorted out. Modified by me (see below). * Remove 'frac' parameter from random_harvest(). This was never used and adds extra code for no good reason. * Remove device write entropy harvesting. This provided a weak attack vector, was not very good at bootstrapping the device. To follow will be a replacement explicit reseed knob. * Separate out all the RANDOM_PURE sources into separate harvest entities. This adds some secuity in the case where more than one is present. * Review all the code and fix anything obviously messy or inconsistent. Address som review concerns while I'm here, like rename the pseudo-rng to 'dummy'. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item) ------------------------------------------------------------------------ r255319 | markm | 2013-09-06 18:51:52 +0100 (Fri, 06 Sep 2013) | 4 lines Yarrow wants entropy estimations to be conservative; the usual idea is that if you are certain you have N bits of entropy, you declare N/2. ------------------------------------------------------------------------ r255075 | markm | 2013-08-30 18:47:53 +0100 (Fri, 30 Aug 2013) | 4 lines Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the usual harvest queues. It was a nifty idea, but too heavyweight. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> ------------------------------------------------------------------------ r255071 | markm | 2013-08-30 12:42:57 +0100 (Fri, 30 Aug 2013) | 4 lines Separate out the Software RNG entropy harvesting queue and thread into its own files. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> ------------------------------------------------------------------------ r254934 | markm | 2013-08-26 20:07:03 +0100 (Mon, 26 Aug 2013) | 2 lines Remove the short-lived namei experiment. ------------------------------------------------------------------------ r254928 | markm | 2013-08-26 19:35:21 +0100 (Mon, 26 Aug 2013) | 2 lines Snapshot; Do some running repairs on entropy harvesting. More needs to follow. ------------------------------------------------------------------------ r254927 | markm | 2013-08-26 19:29:51 +0100 (Mon, 26 Aug 2013) | 15 lines Snapshot of current work; 1) Clean up namespace; only use "Yarrow" where it is Yarrow-specific or close enough to the Yarrow algorithm. For the rest use a neutral name. 2) Tidy up headers; put private stuff in private places. More could be done here. 3) Streamline the hashing/encryption; no need for a 256-bit counter; 128 bits will last for long enough. There are bits of debug code lying around; these will be removed at a later stage. ------------------------------------------------------------------------ r254784 | markm | 2013-08-24 14:54:56 +0100 (Sat, 24 Aug 2013) | 39 lines 1) example (partially humorous random_adaptor, that I call "EXAMPLE") * It's not meant to be used in a real system, it's there to show how the basics of how to create interfaces for random_adaptors. Perhaps it should belong in a manual page 2) Move probe.c's functionality in to random_adaptors.c * rename random_ident_hardware() to random_adaptor_choose() 3) Introduce a new way to choose (or select) random_adaptors via tunable "rngs_want" It's a list of comma separated names of adaptors, ordered by preferences. I.e.: rngs_want="yarrow,rdrand" Such setting would cause yarrow to be preferred to rdrand. If neither of them are available (or registered), then system will default to something reasonable (currently yarrow). If yarrow is not present, then we fall back to the adaptor that's first on the list of registered adaptors. 4) Introduce a way where RNGs can play a role of entropy source. This is mostly useful for HW rngs. The way I envision this is that every HW RNG will use this functionality by default. Functionality to disable this is also present. I have an example of how to use this in random_adaptor_example.c (see modload event, and init function) 5) fix kern.random.adaptors from kern.random.adaptors: yarrowpanicblock to kern.random.adaptors: yarrow,panic,block 6) add kern.random.active_adaptor to indicate currently selected adaptor: root@freebsd04:~ # sysctl kern.random.active_adaptor kern.random.active_adaptor: yarrow # Submitted by: Arthur Mesh <arthurmesh@gmail.com> Submitted by: Dag-Erling Smørgrav <des@FreeBSD.org>, Arthur Mesh <arthurmesh@gmail.com> Reviewed by: des@FreeBSD.org Approved by: re (delphij) Approved by: secteam (des,delphij)
OpenPOWER on IntegriCloud