freebsd kernel with SKQ
Go to file
Konstantin Belousov 6a671a6bde When traced process is about to receive the signal, the process is
stopped and debugger may modify or drop the signal. After the changes to
keep process-targeted signals on the process sigqueue, another thread
may note the old signal on the queue and act before the thread removes
changed or dropped signal from the process queue. Since process is
traced, it usually gets stopped. Or, if the same signal is delivered
while process was stopped, the thread may erronously remove it,
intending to remove the original signal.

Remove the signal from the queue before notifying the debugger. Restore
the siginfo to the head of sigqueue when signal is allowed to be
delivered to the debugee, using newly introduced KSI_HEAD ksiginfo_t
flag. This preserves required order of delivery. Always restore the
unchanged signal on the curthread sigqueue, not to the process queue,
since the thread is about to get it anyway, because sigmask cannot be
changed.

Handle failure of reinserting the siginfo into the queue by falling
back to sq_kill method, calling sigqueue_add with NULL ksi.

If debugger changed the signal to be delivered, use sigqueue_add()
with NULL ksi instead of only setting sq_signals bit.

Reported by:	Gardner Bell <gbell72 rogers com>
Analyzed and first version of fix by:	Tijl Coosemans <tijl coosemans org>
PR:	142757
Reviewed by:	davidxu
MFC after:	2 weeks
2010-01-20 11:58:04 +00:00
bin Raise WARNS for various tools where possible. 2010-01-17 21:56:27 +00:00
cddl Apply OpenSolaris revision 8012 which brings our zpool to version 14, 2009-12-28 22:15:11 +00:00
contrib Update to 4.6. 2010-01-19 18:45:29 +00:00
crypto Add a missing $FreeBSD$ string. 2010-01-13 20:30:16 +00:00
etc adds a hardware specific configuration file for uath(4). 2010-01-19 01:33:56 +00:00
games Our standard "xterm" termcap entry supports colour, so this tip is redundant. 2010-01-11 21:17:49 +00:00
gnu Moved the doc-str-Lb-libulog string definition to where it belongs. 2010-01-15 14:05:06 +00:00
include Add gmountver, disk mount verification GEOM class. 2010-01-16 09:52:49 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib For alphasort() add reference to strcoll(3) 2010-01-20 11:55:14 +00:00
libexec Really disable wtmp logging when chrooting. 2010-01-18 23:28:25 +00:00
release We don't support isdn devices anymore (since May 2008). 2010-01-19 22:44:29 +00:00
rescue Unbreak rescue(8). We should also link against libulog now. 2009-12-05 23:23:46 +00:00
sbin Also output stripeoffset for consumer even if stripesize is zero, while 2010-01-18 19:39:55 +00:00
secure Build lib/ with WARNS=6 by default. 2010-01-02 09:58:07 +00:00
share Sort NDHASGIANT.9 link properly. 2010-01-19 20:36:15 +00:00
sys When traced process is about to receive the signal, the process is 2010-01-20 11:58:04 +00:00
tools Update files to remove when MK_ZFS=no. 2010-01-16 20:42:50 +00:00
usr.bin Fix portability to 64 bit platforms. 2010-01-19 20:35:44 +00:00
usr.sbin Try a privileged port for binding whenever possible because the 2010-01-20 09:29:07 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Removing pre-commit review on isp(4). It's time to let people have their 2009-12-30 14:41:02 +00:00
Makefile Back out the change to Makefile made in r202628. 2010-01-19 15:34:16 +00:00
Makefile.inc1 In 'make delete-old', use 'exec' to redirect an fd persistently. 2010-01-14 23:27:23 +00:00
ObsoleteFiles.inc Phase out ttyslot(3). 2010-01-14 05:35:32 +00:00
README Flatten out vendor tree. 2010-01-15 12:01:25 +00:00
UPDATING Add wtmpcvt(1). 2010-01-14 20:58:45 +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 ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

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.

rescue		Build system for statically linked /rescue utilities.

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