Find a file
Kyle Evans 39d44f7f15 kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.

This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:

- loader(8) environment
- static environment
- static hints file

Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.

Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.

The following tangentially related changes were made to res_find:

- A hintp cookie is now passed in so that related searches continue using
  the chain of environments (or dynamic environment) without relying on
  global state
- All three environments will be searched if they actually have valid hints
  to use, rather than just choosing the first environment that actually had
  a hint and rolling with that only

The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.

MFC after:	1 month (maybe)
Differential Revision:	https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
bin Stop building intermediate .o files. 2018-06-27 21:36:49 +00:00
cddl The IP, TCP, and UDP provider report IP addresses as strings. 2018-06-18 18:35:29 +00:00
contrib auditd(8): register signal handlers interrutibly 2018-07-03 17:37:16 +00:00
crypto
etc WITHOUT_SERVICESDB: 2018-07-04 17:18:35 +00:00
gnu Don't use CCACHE for linking. 2018-06-27 19:29:15 +00:00
include
kerberos5
lib Revert r335983. 2018-07-05 16:03:03 +00:00
libexec
release Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is 2018-06-28 13:48:59 +00:00
rescue
sbin Allow jail names (not just IDs) to be specified for: cpuset(1), ipfw(8), 2018-07-03 23:47:20 +00:00
secure
share Add jsm in committers-ports.dot with mentor/mentee 2018-07-05 16:18:05 +00:00
stand loader: fdt: Try to load every possible DTB from u-boot 2018-07-04 07:37:45 +00:00
sys kern_environment: use any provided environments, evict hintmode/envmode 2018-07-05 16:30:32 +00:00
targets Normalize the g(eom,cache,part,...) build. 2018-06-25 19:55:15 +00:00
tests audit(4): add tests for procctl(2) 2018-07-01 16:05:50 +00:00
tools WITHOUT_SERVICESDB: 2018-07-04 17:18:35 +00:00
usr.bin Make struct xinpcb and friends word-size independent. 2018-07-05 13:13:48 +00:00
usr.sbin kern_environment: use any provided environments, evict hintmode/envmode 2018-07-05 16:30:32 +00:00
.arcconfig
.arclint
.gitattributes
.gitignore Ignore _.universe-toolchain file. 2018-07-01 13:50:37 +00:00
COPYRIGHT
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Pass on bhyve kernel module maintenance to 2018-06-10 04:25:19 +00:00
Makefile tinderbox: If the clang lookup fails fallback to the old default behavior. 2018-06-28 18:22:20 +00:00
Makefile.inc1 `make installworld' should display "completed" message if done 2018-07-01 10:05:45 +00:00
Makefile.libcompat Don't change directory owner to root when building with -DNO_ROOT 2018-06-29 21:15:26 +00:00
Makefile.sys.inc
ObsoleteFiles.inc More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to 2018-06-30 15:03:22 +00:00
README README: add generic notes about GENERIC and NOTES 2018-06-17 19:44:24 +00:00
README.md README: add generic notes about GENERIC and NOTES 2018-06-17 19:44:24 +00:00
UPDATING Make struct xinpcb and friends word-size independent. 2018-07-05 13:13:48 +00:00

FreeBSD Source:

This is the top level of the FreeBSD source directory. This file was last revised on: FreeBSD

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.

Source Roadmap:

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

stand		Boot loader sources.

sys		Kernel sources.

sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
		used in release builds. NOTES contains documentation of
		all possible entries.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html