Joerg Wunsch [Mon, 28 Feb 2000 17:49:43 +0000 (17:49 +0000)]
Fix a serious bug in syslogd regarding the handling of pipes. The bug
would cause syslogd to eventually kill innocent processes in the
system over time (note: not `could' but `would'). Many thanks to my
colleague Mirko for digging into the kernel structures and providing
me with the debugging framework to find out about the nature of this
bug (and to isolate that syslogd was the culprit) in a rather large
set of distributed machines at client sites where this happened
occasionally.
Whenever a child process was no longer responsive, or when syslogd
receives a SIGHUP so it closes all its logging file descriptors, for
any descriptor that refers to a pipe syslogd enters the data about the
old logging child process into a `dead queue', where it is being
removed from (and the status of the dead kitten being fetched) upon
receipt of a SIGCHLD. However, there's a high probability that the
SIGCHLD already arrives before the child's data are actually entered
into the dead queue inside the SIGHUP handler, so the SIGCHLD handler
has nothing to fetch and remove and simply continues. Whenever this
happens, the process'es data remain on the dead queue forever, and
since domark() tried to get rid of totally unresponsive children by
first sending a SIGTERM and later a SIGKILL, it was only a matter of
time until the system had recycled enough PIDs so an innocent process
got shot to death.
Fix the race by masking SIGHUP and SIGCHLD from both handlers mutually.
Add additional bandaids ``just in case'', i. e. don't enter a process
into the dead queue if we can't signal it (this should only happen in
case it is already dead by that time so we can fetch the status
immediately instead of deferring this to the SIGCHLD handler); for the
kill(2) inside domark(), check for an error status (/* Can't happen */
:) and remove it from the dead queue in this case (which if it would
have been there in the first place would have reduced the problem to a
statistically minimal likelihood so i certainly would never have
noticed the bug at all :).
Mirko also reviewed the fix in priciple (mutual blocking of both
signals inside the handlers), but not the actual code.
Bruce Evans [Mon, 28 Feb 2000 08:12:24 +0000 (08:12 +0000)]
Fixed configuration of fast interrupts for the pci cy driver. They were
an early newbus casualty. The fix in rev.1.28 didn't work because the
most important part of it used a wrong macro name.
Bruce Evans [Mon, 28 Feb 2000 07:52:22 +0000 (07:52 +0000)]
Fixed configuration of fast interrupts for the isa cy driver. They were
an early newbus casualty. The isa compatibility cruft turned out to be
well suited for this fix.
Paul Saab [Mon, 28 Feb 2000 04:10:35 +0000 (04:10 +0000)]
Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).
This
This feature allows you to specify if mmap'd data is included in
an application's corefile.
Change the type of eflags in struct vm_map_entry from u_char to
vm_eflags_t (an unsigned int).
Matthew Hunt [Sun, 27 Feb 2000 23:02:47 +0000 (23:02 +0000)]
Change RETTOKEN from '\n' to '\r'; it didn't work under some or all
terminals before. This change tested on FreeBSD syscons, XFree86 xterm,
and Solaris xterm.
Yoshinobu Inoue [Sun, 27 Feb 2000 18:39:34 +0000 (18:39 +0000)]
Add IPv6 services into inetd.conf.
Also enable some standard IPv6 apps by default.
These entries will be simply ignored on systems with no INET6 defined.
Joerg Wunsch [Sun, 27 Feb 2000 01:21:28 +0000 (01:21 +0000)]
Add an eleventh-hour gimick... But since it's only in `games' and
Jordan OK'ed it, i think it's a nice one for those who need it. I
once mentioned in Usenet that i've hacked morse(6) so it can control
an external device like a tone generator or even a ham radio
transceiver, so you could actually use that `game' for really
transmitting morse code through the air. A couple of people then
bugged be to send them my hack (which it was by that time).
So i've now finally found some hours to clean it up (like freaking out
with the transmitter no longer keyed in case someone ^c's out of the
program...), and to write the man page addition.
While i was at it, i also cleaned up some minor nits in Lyndon's
/dev/speaker code, mainly #ifdef related stuff like handling getopt()
if SPEAKER is not defined etc.
Robert Watson [Sat, 26 Feb 2000 18:55:39 +0000 (18:55 +0000)]
Introduce ``add'' and ``remove'' as alternatives to ``alias'' and ``delete''.
Improve compatibility with BSD/OS, and also more accurately reflect that
IP aliases aren't really any different than the primary IP address on an
interface.
Duncan Barclay [Sat, 26 Feb 2000 14:49:24 +0000 (14:49 +0000)]
Snap shot check in.
The code doesn't compile (I'll do that in a minute), but functionally
it gets to receveing the interrupt from the start or join net command.
There is a lot of code to deal with the limitations of the PCCard memory
mapping code - I'm changing some of it hence the check in to preserve something
that worked.
Peter Wemm [Sat, 26 Feb 2000 13:06:55 +0000 (13:06 +0000)]
At great personal risk (to my already fragile sanity), reorganize
the rsa stubs for libcrypto. libcrypto.so now uses dlopen() to
implement the backends for either the native or rsaref implemented
RSA code.
This involves:
- unifying the libcrypto and openssl(1) source so there is no
#ifdef RSAref variations.
- using weak symbols and dlopen()/dlsym() routines to access the
rsa method vectors.
Releases will enable the user to choose International, US (rsaref) or
no RSA code at install time.
'make world' will DTRT depending on whether you have the international
or US source. For US users, you must either install rsaref (the port
or package) or (if you don't fear RSA Inc) use the (superior)
International rsa_eay.c code.
This has been discussed at great length by the affected folks and even
we have a great deal of confusion. This is a checkpoint so we can tune
the results. This works for me in all permutations I can think of and
should result in a CD/ftp 'release' just about doing the right thing now.
Make sysinstall use the new debug.boothowto OID. It will now go
straight into debug mode if you boot -v. Also conditionalize some
annoying debugging output now that we have this ability.
Partially submitted by: msmith
Approved by: jkh [to make certain wise-acres happy ;)]
Add new oid, debug.boothowto. This allows userland apps to see
how the kernel was booted and perhaps do conditional things
based upon it (sysinstall, for example, will now turn Debug mode
on automatically if boot -v was done).
Peter Wemm [Fri, 25 Feb 2000 08:21:35 +0000 (08:21 +0000)]
Don't pull in libRSAglue for the rsaref case. Since this is linked
dynamically by default, we use the dlopen() calls to load librsaref.so
on US code trees.
Peter Wemm [Fri, 25 Feb 2000 08:18:43 +0000 (08:18 +0000)]
Fold libRSAglue into libcrypto so we don't have to special-case
all the builds. There is still no actual RSA implementation code
in libcrypto or src/* on US code trees.
Peter Wemm [Fri, 25 Feb 2000 08:13:50 +0000 (08:13 +0000)]
Don't use the dlopen() stubs if comiling with PIC. This still
needs some more thought for the static case. Should we provide weak
error-generating stubs for static binaries if -lrsaref was forgotten?
John Polstra [Fri, 25 Feb 2000 03:26:10 +0000 (03:26 +0000)]
Fix two bugs in the fault handler for copy{in,out} and friends.
First, it was failing to reset the PCB's pcb_onfault member to NULL.
Under some really obscure circumstances this might cause a wild jump
within the kernel when a panic would otherwise occur. Second, the
handler was loading the GP register needlessly and with an incorrect
value.
Reviewed by: Doug Rabson <dfr>
Approved by: Jordan Hubbard <jkh>
Brian Feldman [Fri, 25 Feb 2000 03:04:29 +0000 (03:04 +0000)]
Make "CheckHostIP" default to off. This was proposed on -security and
earlier IRC, but despite my inital feeling against it, this seems
the more proper thing to do.