freebsd kernel with SKQ
Go to file
jhb ff9c76bccd Close some races between procfs/ptrace and exit(2):
- Reorder the events in exit(2) slightly so that we trigger the S_EXIT
  stop event earlier.  After we have signalled that, we set P_WEXIT and
  then wait for any processes with a hold on the vmspace via PHOLD to
  release it.  PHOLD now KASSERT()'s that P_WEXIT is clear when it is
  invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops
  to zero.
- Change proc_rwmem() to require that the processing read from has its
  vmspace held via PHOLD by the caller and get rid of all the junk to
  screw around with the vmspace reference count as we no longer need it.
- In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it
  doesn't exist.
- Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers
  FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem()
  to clear an earlier single-step simualted via a breakpoint).  We only
  do one to avoid races.  Also, by making the EINVAL error for unknown
  requests be part of the default: case in the switch, the various
  switch cases can now just break out to return which removes a _lot_ of
  duplicated PRELE and proc unlocks, etc.  Also, it fixes at least one bug
  where a LWP ptrace command could return EINVAL with the proc lock still
  held.
- Changed the locking for ptrace_single_step(), ptrace_set_pc(), and
  ptrace_clear_single_step() to always be called with the proc lock
  held (it was a mixed bag previously).  Alpha and arm have to drop
  the lock while the mess around with breakpoints, but other archs
  avoid extra lock release/acquires in ptrace().  I did have to fix a
  couple of other consumers in kern_kse and a few other places to
  hold the proc lock and PHOLD.

Tested by:	ps (1 mostly, but some bits of 2-4 as well)
MFC after:	1 week
2006-02-22 18:57:50 +00:00
bin For pts, print the pts number, instead of the full name. As it was, we ended 2006-02-21 13:02:18 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r155832, 2006-02-19 06:28:39 +00:00
crypto Fix the amd64 (and presumably ia64) lib32 build by ensuring that the 2006-01-02 11:28:42 +00:00
etc Attempt to make running the new rc in a jail more automatic by 2006-02-20 21:54:30 +00:00
games Her name was Anne Frank, not Ann Frank. 2006-02-19 21:46:29 +00:00
gnu Correctly locate the character preceeding the matched string in -w 2006-02-19 04:27:39 +00:00
include Introduce a new proc service routine ps_linfo() to get LWP info. 2006-02-07 02:29:55 +00:00
kerberos5 Add a new extensible GSS-API layer which can support GSS-API plugins, 2005-12-29 14:40:22 +00:00
lib Tell the truth about a) how to get the first fileid, and 2006-02-22 15:11:12 +00:00
libexec Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
release New release notes: GNOME 2.12.3, KDE 3.5.1, Perl 5.8.8, X.org 6.9.0. 2006-02-21 07:39:11 +00:00
rescue Install nextboot in /rescue as /rescue/nextboot rather than 2005-12-15 18:29:01 +00:00
sbin Use kld(3) for loading geom_md.ko. 2006-02-18 11:40:24 +00:00
secure Hook audit into OpenSSH. Now that the necessary bits for OpenSSH support 2006-02-12 07:19:45 +00:00
share Forgot to bump .Dd in the last commit. 2006-02-22 15:12:07 +00:00
sys Close some races between procfs/ptrace and exit(2): 2006-02-22 18:57:50 +00:00
tools Add option -w to specify graph width. 2006-02-22 04:10:20 +00:00
usr.bin If opendir(".") fails after descending into a subdirectory via 2006-02-22 11:13:07 +00:00
usr.sbin use the specified key index for non-group keys; this fixes static 2006-02-21 23:55:38 +00:00
COPYRIGHT Happy new year, a little late 2006-01-15 22:06:10 +00:00
LOCKS Document commit constraints for RELENG_6_*. 2006-01-13 06:51:43 +00:00
MAINTAINERS Remove extra geom_zero. 2005-12-12 01:28:19 +00:00
Makefile Fix a bug in previous revision: skip LINT if it exists, not NOTES 2005-11-28 11:14:36 +00:00
Makefile.inc1 A file can also be a link, so check not only for a file, but also for a link 2006-02-18 16:58:21 +00:00
ObsoleteFiles.inc - add libxpg4 2006-02-18 16:35:57 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a quite late 20051014 entry for the changes in module Makefiles, 2006-02-19 01:05:57 +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