Doug Rabson [Tue, 29 Feb 2000 08:48:10 +0000 (08:48 +0000)]
* Fix the memory probing code so that it sees all memory clusters, not
just the first one.
* Don't reserve extra memory for the prom console unless the platform
actually uses it.
* Fix some historical confusion and a minor bug in the message buffer
initialisation.
Submitted by: gallatin for the prom console part
Approved by: jkh
Joerg Wunsch [Tue, 29 Feb 2000 08:02:29 +0000 (08:02 +0000)]
Fix a nit in my previous commit: make SIGHUP and SIGCHLD restartable
as they ought to be. The description of SA_RESTART was a little
unobvious to me in the man page, so i missed it. Thanks to Bruce for
spotting this.
Greg Lehey [Tue, 29 Feb 2000 06:20:57 +0000 (06:20 +0000)]
vinum_ldi: Honour the 'recurse' flag and show the subdisks on this
drive if it is set.
vinum_lvi: Change line spacing. This is still not right.
Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.
Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.
vinum_lsi: If the subdisk is initializing or reviving, don't wait a
whole second to check whether it's advancing; wait in increments of 50
ms up to 1 second. This makes for a barely perceptible delay.
Greg Lehey [Tue, 29 Feb 2000 06:19:42 +0000 (06:19 +0000)]
New function checkupdates: check whether configuration updates are
enabled and print a warning message in varous places if they are not.
Fix typos in comments.
Change some indents to approach style(9).
initvol: If init fails, place the subdisks in a "down" state.
vinum_start(): If we're starting a plex, try doing it directly. It's
possible that the state of the plex differs from that of the subdisks,
for example if somebody has used 'setupstate'.
New functions vinum_raid4 and vinum_raid5 to create RAID-4 and RAID-5
volumes, analagous to vinum_mirror and vinum_stripe.
vinum_checkparity: Don't try to check the parity of a non-parity plex,
print a rude remark instead.
Greg Lehey [Tue, 29 Feb 2000 06:17:26 +0000 (06:17 +0000)]
Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.
Set DRIVE_MAXACTIVE and VINUM_MAXACTIVE to 30000, effectively
disabling the request limitation code. This code was added as an
attempt to escape from a bug which seems to have gone away, and it's
very likely I'll remove the code Real Soon Now, but I don't want to do
it just yet.
struct drive: Remove references to vnode pointers, including debug
output. Vinum now talks directly to the device driver. Instead, add
a dev_t.
enum plexorg: Add an instance for RAID-4.
Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.
Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.
Greg Lehey [Tue, 29 Feb 2000 06:14:44 +0000 (06:14 +0000)]
launch_requests: If too many requests are active, include PCATCH in
the tsleep call flags.
Submitted-by: Bernd Walter <ticso@cicely.de>
Remove references to vnode pointers, including debug output. Vinum
now talks directly to the device driver.
bre: Add case for RAID-4.
sdio: Don't try to write to a down drive. Set the sd state instead.
Greg Lehey [Tue, 29 Feb 2000 06:11:13 +0000 (06:11 +0000)]
open_drive: open drives directly rather than going via namei and
vn_open. This is necessary in order to be able to open drives before
the root file system is mounted. This also involves restructuring the
drive struct, which no longer contains a vnode pointer. Instead,
open_drive sets an open flag. It's a horrible kludge, and I'll gladly
borrow a Danish axe and hack it in little pieces when devfs comes.
read_drive, write_drive, drive_io_done: Replace with driveio. The
function names are now macros.
driveio: Fix horrible, embarrassing breakage which was the reason why
read_drive and write_drive existed in the first place.
Code-torn-to-shreds-by: dillon
format_config: Don't save config of objects in referenced state. They
get rebuilt automatically.
Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.
Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.
Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.
vinum_scandisk: Don't free memory twice on error, once is enough.
Greg Lehey [Tue, 29 Feb 2000 06:08:33 +0000 (06:08 +0000)]
Add support for RAID-4, even though it is inferior in almost every way
to RAID-5. peter claims that it might be faster for sequential
reading, since the drive caches don't trip over the parity blocks. I
have seen no evidence to support this, but it's a trivial change.
Requested-by: peter
Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.
Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.
atoi(): Remove, nobody was talking to it.
give_sd_to_drive: If no space is available, make the subdisk down,
don't delete it.
Change the manner in which the subdisk count was maintained to avoid
cases where the count was not adjusted correctly.
config_drive: Check if we have subdisks referencing us, and add them
if so. This fixes problems which arose when a drive is replaced in a
running system.
config_sd: Add support for a keyword 'partition', whose meaning will
be revealed in the fullness of time.
Greg Lehey [Tue, 29 Feb 2000 06:07:39 +0000 (06:07 +0000)]
Change the startup sequence of the vinum volume from SI_SUB_DRIVERS
to SI_SUB_VINUM, thus making it possible for Vinum to access I/O
devices and start.
Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.
Style fixes: replace NULL with 0 where appropriate.
Submitted-by: Charlie Root <root@sms-1.follo.net> (yup, that's all I
have to go on).
Kris Kennaway [Tue, 29 Feb 2000 05:47:52 +0000 (05:47 +0000)]
Add NODESCRYPTLINKS knob to prevent spamming of libcrypt -> libscrypt
symlinks. The name is against my better judgement, but I defer to ancient
tradition here because I'm a nice guy.
The problem turns out to be a program logic error in fsck. It stores
directory inodes internally in hash lists, using the number of
directories to form the hash key:
inpp = &inphead[inumber % numdirs];
Elsewhere, however, it increments numdirs when it finds unattached
directories. I've made the following fix, which solved the problem in
the case in hand.
Mark Murray [Mon, 28 Feb 2000 19:54:06 +0000 (19:54 +0000)]
Get the order of things right; the keys need to be generated
early to allow entropy to replenish.
sshd must start late to catch the full effects of ldconfig.
Guido van Rooij [Mon, 28 Feb 2000 19:30:25 +0000 (19:30 +0000)]
This fixes a problem where the SIOCGIFCONF ioctl goes wrong. This
is triggered when qmail is used with INET6 enabled. The bug
manifests itself in that the space variable can become negative
and that in the comparison in the guards of the 2 loops, this was
not noticed because sizeof() returns an unsigned and thus the signed
variable gets promoted to unsigned. I decided not to make space
unsigned because I think we should guard against this from happening.
Thus panic() in case space becomes negative.
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.