FreeBSD src
Go to file
Don Lewis 47934cef8f Split the mlock() kernel code into two parts, mlock(), which unpacks
the syscall arguments and does the suser() permission check, and
kern_mlock(), which does the resource limit checking and calls
vm_map_wire().  Split munlock() in a similar way.

Enable the RLIMIT_MEMLOCK checking code in kern_mlock().

Replace calls to vslock() and vsunlock() in the sysctl code with
calls to kern_mlock() and kern_munlock() so that the sysctl code
will obey the wired memory limits.

Nuke the vslock() and vsunlock() implementations, which are no
longer used.

Add a member to struct sysctl_req to track the amount of memory
that is wired to handle the request.

Modify sysctl_wire_old_buffer() to return an error if its call to
kern_mlock() fails.  Only wire the minimum of the length specified
in the sysctl request and the length specified in its argument list.
It is recommended that sysctl handlers that use sysctl_wire_old_buffer()
should specify reasonable estimates for the amount of data they
want to return so that only the minimum amount of memory is wired
no matter what length has been specified by the request.

Modify the callers of sysctl_wire_old_buffer() to look for the
error return.

Modify sysctl_old_user to obey the wired buffer length and clean up
its implementation.

Reviewed by:	bms
2004-02-26 00:27:04 +00:00
bin style.Makefile: 2004-02-23 20:05:14 +00:00
contrib Back out getopt* adding here per maintainer request 2004-02-25 03:10:14 +00:00
crypto Turn non-PAM password authentication off by default when USE_PAM is 2004-02-19 15:53:31 +00:00
etc Add "posix" subdir to "gnu" 2004-02-25 02:51:37 +00:00
games Label @ as being AC (since it's constructed like a prosign). 2004-02-20 13:46:39 +00:00
gnu Fix style bug in last commit, 2004-02-25 13:12:51 +00:00
include Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com. 2004-02-25 23:45:57 +00:00
kerberos5 style.Makefile(5). 2004-02-05 18:51:52 +00:00
lib Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
libexec Do not depend on existence of _end symbol in obj_from_addr, use 2004-02-25 17:06:16 +00:00
release Remove freebsd-update -- it breaks the Alpha, sparc64, ia64, and amd64 2004-02-25 19:05:47 +00:00
rescue Revision 1.7 of this file added information 2004-01-18 22:24:23 +00:00
sbin Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com. 2004-02-25 23:45:57 +00:00
secure style.Makefile(5): 2004-02-23 20:25:27 +00:00
share Add FreeBSD 5.2.1 2004-02-25 15:58:14 +00:00
sys Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
tools style.Makefile(5): 2004-02-24 20:52:58 +00:00
usr.bin Use the -H option instead of the deprecated -follow predicate. 2004-02-25 21:45:41 +00:00
usr.sbin Fix endianes bug 2004-02-25 22:43:43 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
MAINTAINERS Add somemore items to the list. The purpose is not to extert control over 2004-02-20 21:27:04 +00:00
Makefile Change the 'realclean' target name to be 'cleanworld', to match other 2004-02-20 02:10:35 +00:00
Makefile.inc1 Drop directory existence checks. 2004-02-13 21:52:08 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a note about the routed update breaking compatibility (for MD5 2004-02-25 23:56:30 +00:00

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

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, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

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.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

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:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html