Commit Graph

54006 Commits

Author SHA1 Message Date
Robert Watson
7f112b0489 o Export cp_time ("CPU time statistics") using SYSCTL_OPAQUE.
This removes a reason that systat requires setgid kmem.  More to
  come.
2000-11-20 00:44:58 +00:00
Robert Watson
aa5429970c o Export nchstats ("VFS cache effectiveness statistics") using
SYSCTL_OPAQUE.  This removes a reason that systat requires
  setgid kmem.  More to come.
2000-11-20 00:41:11 +00:00
Robert Watson
cee313c431 o Export dmmax ("Maximum size of a swap block") using SYSCTL_INT.
This removes a reason that systat requires setgid kmem.  More to
  come.
2000-11-20 00:39:04 +00:00
Scott Long
affec73ebd Disable calling timeout() when doing bio. It was causing more prolems than
solving.  This will be fixed for real soon.
2000-11-19 23:46:21 +00:00
David Malone
32af0d74f0 Make sbcompress use the new M_WRITABLE macro. Previously sbcompress
could not compress into clusters. This could result in lots of
wasted clusters while recieving small packets from an interface
that uses clusters for all it's packets.

Patch is partially from BSDi (limiting the size of the copy) and
based on a patch for 4.1 by Ian Dowse <iedowse@maths.tcd.ie> and
myself.

Reviewed by:	bmilekic
Obtained From:	BSDi
Submitted by:	iedowse
2000-11-19 22:22:47 +00:00
Doug Barton
09980f4348 Standardize spelling of "optimization" in comments
PR:		conf/22622
Submitted by:	knu
2000-11-19 20:12:06 +00:00
Doug Barton
927af2dc65 When to run the periodic/daily event has had several rounds of discussion
over the past couple years. The most recent came to the general consensus
that this was the best time, but no one actually made the change, so I'll
don my asbestos undies and dive in.

Please note that this time was chosen with input from people in various
countries with various methods and schedules for switching to and from DST.
There is no perfect time to schedule this job that works for everyone, but
this time both A) Works for more people, and B) Causes problems for fewer
people. And, ultimately, you can always change it if you need to.
2000-11-19 18:16:46 +00:00
Brian Somers
b43607b7f2 Some gratuitous whitespace changes. 2000-11-19 16:58:59 +00:00
Brian Somers
a080fda810 Describe how to tunnel properly.
Requested by: Greg Quinlan <greg@macquarrie.com.au>
2000-11-19 16:54:57 +00:00
Brian Somers
385167a6b0 Accept MSCHAPv2 by default.
Enable and accept MPPE by default.
2000-11-19 16:53:50 +00:00
Kris Kennaway
ffd4007070 Format string paranoia 2000-11-19 13:30:36 +00:00
Kris Kennaway
c4dfae1d3c Format string error in warn() 2000-11-19 13:29:43 +00:00
Kris Kennaway
7db4903d42 Use mktemp -t to respect TMPDIR
Clean up temporary file at runtime
2000-11-19 13:10:11 +00:00
Kris Kennaway
8502f3408c Correct typo 2000-11-19 13:09:36 +00:00
Kris Kennaway
3fb3b78f0f Format string paranoia 2000-11-19 12:46:16 +00:00
Doug Rabson
35cd89e7e5 Convert various calls to splhigh() to disable_intr() since splhigh() is
now a no-op.
2000-11-19 12:28:42 +00:00
Doug Rabson
bcc542cb4e We don't need <stddef.h> for offsetof() any more. 2000-11-19 12:26:14 +00:00
Kris Kennaway
29ac114aae Unlink the temporary file immediately so it is removed on exit.
Obtained from:	OpenBSD
2000-11-19 12:04:12 +00:00
Kris Kennaway
b05092e25a MAXPATHNAMELEN -> MAXPATHLEN
Submitted by:	ianm@kashmir.cit.nepean.uws.edu.au via OpenBSD
Obtained from:	OpenBSD
2000-11-19 11:29:58 +00:00
Kris Kennaway
e10471bbba L_SET -> SEEK_SET
Obtained from:	OpenBSD
2000-11-19 10:56:14 +00:00
Kris Kennaway
b601f693db Format string paranoia
Obtained from:	OpenBSD
2000-11-19 10:52:10 +00:00
Kris Kennaway
7853d5d839 Don't suggest people use getpid() to construct temporary filenames;
point them to mkstemp() instead.

Obtained from:	OpenBSD (based on)
2000-11-19 10:30:42 +00:00
Kris Kennaway
dc3f2db745 Update the documentation to describe the new mktemp() family behaviour.
Also notes that mkstemp() first appeared in 4.4BSD (change obtained
from OpenBSD)

Reviewed by:	sheldonh
2000-11-19 10:21:32 +00:00
Kris Kennaway
f743d11975 Fix a buffer overflow from a long local hostname.
Obtained from:	OpenBSD
2000-11-19 10:08:26 +00:00
Kris Kennaway
75dd9c65fa Don't use sizeof() on a pointer when we really wanted to measure
the length of the array.

Noticed by:	Christos Zoulas <christos@ZOULAS.COM>
Obtained from:	OpenBSD
2000-11-19 10:01:27 +00:00
Jake Burkholder
fa2fbc3dac - Protect the callout wheel with a separate spin mutex, callout_lock.
- Use the mutex in hardclock to ensure no races between it and
  softclock.
- Make softclock be INTR_MPSAFE and provide a flag,
  CALLOUT_MPSAFE, which specifies that a callout handler does not
  need giant.  There is still no way to set this flag when
  regstering a callout.

Reviewed by:	-smp@, jlemon
2000-11-19 06:02:32 +00:00
John W. De Boskey
46ee285632 Check return code from login_tty. Allow getty to try and become
a daemon and session leader (thus allowing getty to be run from
a shell command line or script).

Partially Reviewed by:	bde
2000-11-19 02:10:25 +00:00
John W. De Boskey
aecbd99950 Add/fix the ability to split a file larger than 2 gigabytes.
Added $FreeBSD tag (in the way the already present sccsid is
done). I've been told the rcsid stuff may be of dubious value
so I'm curious to know if folks (still) use it.

Submitted by:	Brad Chisholm <blc@bsdwins.com>
2000-11-19 01:44:20 +00:00
Matthew Dillon
936524aa02 Implement a low-memory deadlock solution.
Removed most of the hacks that were trying to deal with low-memory
    situations prior to now.

    The new code is based on the concept that I/O must be able to function in
    a low memory situation.  All major modules related to I/O (except
    networking) have been adjusted to allow allocation out of the system
    reserve memory pool.  These modules now detect a low memory situation but
    rather then block they instead continue to operate, then return resources
    to the memory pool instead of cache them or leave them wired.

    Code has been added to stall in a low-memory situation prior to a vnode
    being locked.

    Thus situations where a process blocks in a low-memory condition while
    holding a locked vnode have been reduced to near nothing.  Not only will
    I/O continue to operate, but many prior deadlock conditions simply no
    longer exist.

Implement a number of VFS/BIO fixes

	(found by Ian): in biodone(), bogus-page replacement code, the loop
        was not properly incrementing loop variables prior to a continue
        statement.  We do not believe this code can be hit anyway but we
        aren't taking any chances.  We'll turn the whole section into a
        panic (as it already is in brelse()) after the release is rolled.

	In biodone(), the foff calculation was incorrectly
        clamped to the iosize, causing the wrong foff to be calculated
        for pages in the case of an I/O error or biodone() called without
        initiating I/O.  The problem always caused a panic before.  Now it
        doesn't.  The problem is mainly an issue with NFS.

	Fixed casts for ~PAGE_MASK.  This code worked properly before only
        because the calculations use signed arithmatic.  Better to properly
        extend PAGE_MASK first before inverting it for the 64 bit masking
        op.

	In brelse(), the bogus_page fixup code was improperly throwing
        away the original contents of 'm' when it did the j-loop to
        fix the bogus pages.  The result was that it would potentially
        invalidate parts of the *WRONG* page(!), leading to corruption.

	There may still be cases where a background bitmap write is
        being duplicated, causing potential corruption.  We have identified
        a potentially serious bug related to this but the fix is still TBD.
        So instead this patch contains a KASSERT to detect the problem
  	and panic the machine rather then continue to corrupt the filesystem.
	The problem does not occur very often..  it is very hard to
	reproduce, and it may or may not be the cause of the corruption
	people have reported.

Review by: (VFS/BIO: mckusick, Ian Dowse <iedowse@maths.tcd.ie>)
Testing by: (VM/Deadlock) Paul Saab <ps@yahoo-inc.com>
2000-11-18 23:06:26 +00:00
Matthew Dillon
ef0646f9d8 Add the splvm()'s suggested in PR 20609 to protect vm_pager_page_unswapped().
The remainder of the PR is still open.

PR: kern/20609 (partial fix)
2000-11-18 21:11:23 +00:00
Matthew Dillon
279d722604 This patchset fixes a large number of file descriptor race conditions.
Pre-rfork code assumed inherent locking of a process's file descriptor
    array.  However, with the advent of rfork() the file descriptor table
    could be shared between processes.  This patch closes over a dozen
    serious race conditions related to one thread manipulating the table
    (e.g. closing or dup()ing a descriptor) while another is blocked in
    an open(), close(), fcntl(), read(), write(), etc...

PR: kern/11629
Discussed with: Alexander Viro <viro@math.psu.edu>
2000-11-18 21:01:04 +00:00
Ben Smithurst
d641426e5a Fix typo.
PR:		22923
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:19:26 +00:00
Ben Smithurst
f414612af0 Fix typos.
PR:		22922
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:18:34 +00:00
Ben Smithurst
7a41bbd47b Fix another typo.
PR:		22924
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:16:47 +00:00
Ruslan Ermilov
aaf0d9a64c While in the SYNOPSIS section, Nm macro always required an
argument to setup indentation for the rest of the synopsis
line and to automatically emit a line break for a non-first
synopsis line.  It does not require it anymore.

The following now works as expected:

.Sh NAME
.Nm utility
.Sh SYNOPSIS
.Nm
.Cm start
.Nm
.Cm stop
2000-11-18 17:34:55 +00:00
Ruslan Ermilov
acd99ff192 mdoc(7) police: fix errors uncovered by the new feature of the Nm macro. 2000-11-18 15:50:46 +00:00
David Malone
ca89ee278e Further use of M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	msmith
2000-11-18 15:21:22 +00:00
David Malone
99cdf4ccb2 Add the use of M_ZERO to netgraph.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Submitted by:	archie
Approved by:	archie
2000-11-18 15:17:43 +00:00
Ruslan Ermilov
238fe5f74d mdoc(7) police: now that Nm macro accepts punctuation characters
as argument, unbreak this page by escaping the `[' character.

Noticed by:	sheldonh
2000-11-18 14:44:30 +00:00
Søren Schmidt
374940a184 Fix a braino .. 2000-11-18 12:14:35 +00:00
Cameron Grant
612276f48c do not blindly assume 8khz is supported on open(). try for 8khz but respect
minspeed/maxspeed specified by the hw driver.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
2000-11-18 03:43:04 +00:00
David E. O'Brien
0469c254fb Make the order of values prompted for with the "-i" option match print_part() 2000-11-18 02:55:43 +00:00
Boris Popov
f2b1e0d206 Use vop_defaultop() instead of ntfs_bypass().
PR:		kern/22756
2000-11-18 02:47:12 +00:00
John Baldwin
b6b55e27a4 Release sched_lock very briefly to give interrupts a chance to fire if we
are in softclock() for a long time.  The old code already did an
splx()/slphigh() pair here, I just missed adding in the equivalent mutex
operations on sched_lock earlier.
2000-11-18 00:21:00 +00:00
Tor Egge
e5c5b82950 Don't attempt to cluster write buffers where the VMIO flag isn't set. 2000-11-17 23:40:08 +00:00
Dag-Erling Smørgrav
cd085280b5 Make sure we don't cross stripe boundaries when reviving striped plexes.
This makes crash recovery work for stripe sizes that are not multiples of
DEFAULT_REVIVE_BLOCKSIZE (currently 64 kB).
While we're here, fix a few cosmetic nits.

Reviewed by:	grog
Sponsored by:	Enitel ASA (http://www.enitel.no/)
2000-11-17 23:40:01 +00:00
Matthew Hunt
45fe9882b0 "minute(s) period(s)" --> "minute(s)" 2000-11-17 23:08:03 +00:00
David E. O'Brien
363ea5eadf Fix the `make -jX' (X>1) breakage.
Based on patch submitted by:	Makoto MATSUSHITA <matusita@jp.freebsd.org>
Reviewed by:	marcel, bde
2000-11-17 21:25:15 +00:00
Jake Burkholder
7da6f97772 - Split the run queue and sleep queue linkage, so that a process
may block on a mutex while on the sleep queue without corrupting
it.
- Move dropping of Giant to after the acquire of sched_lock.

Tested by:	John Hay <jhay@icomtek.csir.co.za>
		jhb
2000-11-17 18:09:18 +00:00
Bruce A. Mah
236a1916b4 Reference security advisories FreeBSD-SA-00:{68,69,70}. 2000-11-17 17:48:40 +00:00