dragonfly.git
14 years agoanother forced commit from cvs-1.12.13 client to test log_accum.pl script
YONETANI Tomokazu [Fri, 24 Mar 2006 07:57:30 +0000 (07:57 +0000)]
another forced commit from cvs-1.12.13 client to test log_accum.pl script

14 years agoforced commit to test new log_accum.pl script
YONETANI Tomokazu [Fri, 24 Mar 2006 07:52:48 +0000 (07:52 +0000)]
forced commit to test new log_accum.pl script

14 years agoBackout the rest of 1.29. There are a number of issues with the other
Matthew Dillon [Fri, 24 Mar 2006 06:45:04 +0000 (06:45 +0000)]
Backout the rest of 1.29.  There are a number of issues with the other
system calls too that have to be resolved before we can mark these MPSAFE.

14 years agoHold MP lock for getppid(). As noted by Dillon getppid() is not MP safe.
David Rhodus [Thu, 23 Mar 2006 20:55:07 +0000 (20:55 +0000)]
Hold MP lock for getppid().  As noted by Dillon getppid() is not MP safe.
This need sthe MP lock for cases such as a parent dying and becoming
inherited by init.

14 years agoMerge from FreeBSD.
David Rhodus [Thu, 23 Mar 2006 20:48:09 +0000 (20:48 +0000)]
Merge from FreeBSD.

Multiple interrupt handlers may try to queue an event for a
nested kqueue.

14 years agoMark a few more system calls MPSAFE.
David Rhodus [Thu, 23 Mar 2006 15:21:41 +0000 (15:21 +0000)]
Mark a few more system calls MPSAFE.
getppid()
getegid()
uname()
getrlimit()

14 years agoProperly copy in userland scheduler name via copyinstr.
David Rhodus [Thu, 23 Mar 2006 14:04:24 +0000 (14:04 +0000)]
Properly copy in userland scheduler name via copyinstr.
Previsouly a call to usched_set() would result in a kernel page fault.

14 years agoAdd a new tunable "hw.bge.fake_autoneg", get rid of BGE_FAKE_AUTONEG kernel
Sepherosa Ziehau [Thu, 23 Mar 2006 13:45:12 +0000 (13:45 +0000)]
Add a new tunable "hw.bge.fake_autoneg", get rid of BGE_FAKE_AUTONEG kernel
option.  This lets GENERIC kernel work with some broken "bge(4) + switch
modules" configurations.

By default this tunable is set to 0, if autonegociation breakage happens
for certain switch modules shipped with IBM/Intel blades, set this tunable
to 1.

Thank Devon H. O'Dell <devon.odell at gmail.com> for confirming this is
useful.

Initial-idea-from: hmp
Reminded-by: Devon H. O'Dell <devon.odell at gmail.com>
14 years agoCorrectly identify the user running opiepasswd(1) when the login name
David Rhodus [Wed, 22 Mar 2006 21:22:39 +0000 (21:22 +0000)]
Correctly identify the user running opiepasswd(1) when the login name
differs from the account name.

Security:       FreeBSD-SA-06:12.opie

14 years agoNetBSD merge.
David Rhodus [Wed, 22 Mar 2006 20:06:34 +0000 (20:06 +0000)]
NetBSD merge.

Coverity CID 1294: Avoid negative variable used as index.

14 years agoNetBSD merge.
David Rhodus [Wed, 22 Mar 2006 20:06:13 +0000 (20:06 +0000)]
NetBSD merge.

Coverity CID 1230: Remove spurious close().

14 years agoAdd missing code needed for the detection of IPSec packet replays.
David Rhodus [Wed, 22 Mar 2006 19:57:32 +0000 (19:57 +0000)]
Add missing code needed for the detection of IPSec packet replays.

Security:       FreeBSD-SA-06:11.ipsec

14 years agoAdjust build infrastructure for sendmail 8.13.6
Gregory Neil Shapiro [Wed, 22 Mar 2006 18:25:43 +0000 (18:25 +0000)]
Adjust build infrastructure for sendmail 8.13.6

14 years agoSlight cleanup on the DragonFly README
Gregory Neil Shapiro [Wed, 22 Mar 2006 18:08:03 +0000 (18:08 +0000)]
Slight cleanup on the DragonFly README

14 years agoMerge from vendor branch SENDMAIL:
Gregory Neil Shapiro [Wed, 22 Mar 2006 17:32:24 +0000 (17:32 +0000)]
Merge from vendor branch SENDMAIL:
Import sendmail 8.13.6

14 years agoImport sendmail 8.13.6
Gregory Neil Shapiro [Wed, 22 Mar 2006 17:32:24 +0000 (17:32 +0000)]
Import sendmail 8.13.6

14 years agoFix "ls: not found" problem during buildworld. mdate.sh script
YONETANI Tomokazu [Wed, 22 Mar 2006 16:54:31 +0000 (16:54 +0000)]
Fix "ls: not found" problem during buildworld.  mdate.sh script
that comes with groff distribution relies on ls command, which is
no longer part of the bootstrap-tools.  Replace this script with
stat command, which IS part of the bootstrap-tools.
New version slightly differs from the original in how day of month
is formatted when it's less than 10, but that shouldn't be a problem.

14 years agoPlan9 -> Plan 9
Sascha Wildner [Wed, 22 Mar 2006 10:18:47 +0000 (10:18 +0000)]
Plan9 -> Plan 9

14 years agoMake a slight adjustment to the last commit. Change saved_ncp to saved_dvp
Matthew Dillon [Tue, 21 Mar 2006 18:14:43 +0000 (18:14 +0000)]
Make a slight adjustment to the last commit.  Change saved_ncp to saved_dvp
to try to better maintain the namecache when the NFS server is forced to
use the ultra-inefficient path resolution code.

14 years agoThe xref list is not a sentence.
Sascha Wildner [Tue, 21 Mar 2006 09:12:20 +0000 (09:12 +0000)]
The xref list is not a sentence.

14 years agoFix xref order.
Sascha Wildner [Tue, 21 Mar 2006 04:24:28 +0000 (04:24 +0000)]
Fix xref order.

14 years agoFix xref.
Sascha Wildner [Tue, 21 Mar 2006 03:01:49 +0000 (03:01 +0000)]
Fix xref.

14 years agostrnstr() was testing one byte beyond the specified length in certain
Matthew Dillon [Mon, 20 Mar 2006 17:24:20 +0000 (17:24 +0000)]
strnstr() was testing one byte beyond the specified length in certain
cases, which can cause a segfault if the 'big' string is not nul terminated
and abutts unmapped memory space.

This sort of thing can occur when a file is memory mapped and searched
using strnstr().

14 years agoPrevent the driver from reinitializing the card when it's already running.
Matthew Dillon [Sun, 19 Mar 2006 18:03:37 +0000 (18:03 +0000)]
Prevent the driver from reinitializing the card when it's already running.
This is useful when adding multiple interface aliases, because it takes
much less time.

Submitted-by: Michal Belczyk <belczyk@bsd.krakow.pl>
Obtained-From: OpenBSD
Testing-by: Michal Belczyk, Sepherosa Ziehau
14 years agoFix a serious bug in the olddelta microseconds calculation returned by
Matthew Dillon [Sun, 19 Mar 2006 17:53:54 +0000 (17:53 +0000)]
Fix a serious bug in the olddelta microseconds calculation returned by
by adjtime().

Submitted-by: "Frank W. Josellis" <frank@dynamical-systems.org>
14 years agoThrow out the list of supported devices. All drivers should support
Sascha Wildner [Sun, 19 Mar 2006 17:31:08 +0000 (17:31 +0000)]
Throw out the list of supported devices. All drivers should support
ALTQ. If not, it should into a BUGS section.

Pointed-out-by: joerg
14 years agoAdd more drivers that support ALTQ to the list.
Sascha Wildner [Sun, 19 Mar 2006 13:12:15 +0000 (13:12 +0000)]
Add more drivers that support ALTQ to the list.

14 years agoMake thread suspension really work.
David Xu [Sun, 19 Mar 2006 13:07:12 +0000 (13:07 +0000)]
Make thread suspension really work.

14 years agoBring in the altq.4 man page from FreeBSD.
Sascha Wildner [Sun, 19 Mar 2006 02:57:38 +0000 (02:57 +0000)]
Bring in the altq.4 man page from FreeBSD.

Minor modifications I have done:

* Comment out description of the ALTQ_CDNR option that we don't have.

* Update the list of adapters that support ALTQ. It's likely that
  some are still missing from this list.

Note that the altq.9 man page not there yet. It will be added later.

14 years agoAdd an option to add a slight time skew to the execution of scripts to
Matthew Dillon [Sat, 18 Mar 2006 20:29:50 +0000 (20:29 +0000)]
Add an option to add a slight time skew to the execution of scripts to
smooth out load bumps, primarily for jailed environments.

Note: Modified from the original: assign the actual jitter to a local
variable instead of unnecessarily overriding one of the global variables.

Submitted-by: Michal Belczyk <belczyk@bsd.krakow.pl>
Obtained-from: FreeBSD

14 years agoSilence warnings about ignored trigraphs.
Sascha Wildner [Sat, 18 Mar 2006 19:43:18 +0000 (19:43 +0000)]
Silence warnings about ignored trigraphs.

14 years agoCleanup the copyright in this file. Easy since its my code.
Matthew Dillon [Sat, 18 Mar 2006 17:15:35 +0000 (17:15 +0000)]
Cleanup the copyright in this file.  Easy since its my code.

Requested-by: joerg@britannica.bec.de
14 years agoThis commit sets new users to see the DragonFly-tips fortunes instead
Justin C. Sherrill [Fri, 17 Mar 2006 03:16:51 +0000 (03:16 +0000)]
This commit sets new users to see the DragonFly-tips fortunes instead
of the FreeBSD versions.

Work performed by: "Trevor Kendall" <trevorjk@gmail.com>

14 years agoCreate DragonFly fortune files, based on either the FreeBSD fortune files
Justin C. Sherrill [Fri, 17 Mar 2006 03:15:16 +0000 (03:15 +0000)]
Create DragonFly fortune files, based on either the FreeBSD fortune files
or brand new, in the case of -funny.

FreeBSD has been replaced with DragonFly BSD in the fortune file.  If this
would change a quote that was directly attributed to someone, that quote
has been replaced.  I haven't been able to raise any quote authors for
permission to change what they said, so it's erring on the side of caution.

Work performed by: "Trevor Kendall" <trevorjk@gmail.com>
Minor cleanup by: me

14 years ago* Kill hard sentence breaks.
Sascha Wildner [Thu, 16 Mar 2006 18:32:12 +0000 (18:32 +0000)]
* Kill hard sentence breaks.

* Replace documentation of building ports by some pointers to pkgsrc
  documentation. Remove obsolete references to /usr/ports/Mk.

* Add myself to the authors list.

14 years agoFix implicit declaration warnings.
Sascha Wildner [Thu, 16 Mar 2006 15:06:05 +0000 (15:06 +0000)]
Fix implicit declaration warnings.

14 years agoImplement a VM load heuristic. sysctl vm.vm_load will return an indication
Matthew Dillon [Wed, 15 Mar 2006 07:58:37 +0000 (07:58 +0000)]
Implement a VM load heuristic.  sysctl vm.vm_load will return an indication
of the load on the VM system in the range 0-1000.

Implement a page allocation rate limit in vm_fault which is based on
vm_load, and enabled via vm.vm_load_enable (default on).  As the system
becomes more and more memory bound, those processes whos page faults
require a page allocation will start to allocate pages in smaller bursts
and with greater and greater enforced delays, up to 1/10 of a second.

Implement vm.vm_load_debug (for kernels with INVARIANTS), which outputs
the burst calculations to the console when enabled.

Increase the minimum guarenteed run time without swapping from 2 to 15
seconds.

14 years agocache_fromdvp() uses a recursive algorithm to resolve disconnected
Matthew Dillon [Wed, 15 Mar 2006 04:04:54 +0000 (04:04 +0000)]
cache_fromdvp() uses a recursive algorithm to resolve disconnected
directories in the namecache.  A recursion must occur until the parent
directory is found to have a namecache record.   This is used only by
the NFS server.

Fix a kernel stack underflow when large directory depths are encountered
by reverting to a much less efficient (but non recursive) algorithm.  This
case is hit only very rarely, mainly when filesystem testing programs are
employed.  It typically takes directories several hundred or several
thousand deep (depending on system memory) to trigger the condition.

Reported-by: Stefan Krueger
14 years agoSilence warnings.
Sascha Wildner [Mon, 13 Mar 2006 14:36:46 +0000 (14:36 +0000)]
Silence warnings.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
14 years agoChange KKASSERT() to not embed #exp in the control string. Instead pass
Matthew Dillon [Sun, 12 Mar 2006 20:44:43 +0000 (20:44 +0000)]
Change KKASSERT() to not embed #exp in the control string.  Instead pass
#exp as a separate argument.  The control was being misinterpreted when
the asserted expression contained a '%'.

14 years agoAvoid name conflict with built-in function log().
Sascha Wildner [Sun, 12 Mar 2006 14:06:39 +0000 (14:06 +0000)]
Avoid name conflict with built-in function log().

14 years agoFix typo.
Sascha Wildner [Sun, 12 Mar 2006 13:57:45 +0000 (13:57 +0000)]
Fix typo.

14 years agoOops, disable debuging code.
David Xu [Sun, 12 Mar 2006 12:25:57 +0000 (12:25 +0000)]
Oops, disable debuging code.

14 years agoRemove extra token after #else to silence warning.
Sascha Wildner [Sun, 12 Mar 2006 12:20:31 +0000 (12:20 +0000)]
Remove extra token after #else to silence warning.

14 years agoRewrite mutex_init, get rid of compile warnings.
David Xu [Sun, 12 Mar 2006 12:02:28 +0000 (12:02 +0000)]
Rewrite mutex_init, get rid of compile warnings.

14 years agocopy flag DETACHED.
David Xu [Sun, 12 Mar 2006 11:32:21 +0000 (11:32 +0000)]
copy flag DETACHED.

14 years agoClose a race for thread detach.
David Xu [Sun, 12 Mar 2006 11:28:06 +0000 (11:28 +0000)]
Close a race for thread detach.

14 years agoRemove dfports.
Sascha Wildner [Sun, 12 Mar 2006 02:18:59 +0000 (02:18 +0000)]
Remove dfports.

14 years agoAdd missing block number assignment in ATA raid mirroring code. The
Matthew Dillon [Fri, 10 Mar 2006 20:31:37 +0000 (20:31 +0000)]
Add missing block number assignment in ATA raid mirroring code.  The
assignment got lost due to recent BUF/BIO work.

14 years agoFix typeo.
David Rhodus [Fri, 10 Mar 2006 19:07:53 +0000 (19:07 +0000)]
Fix typeo.

Submitted by: Xin LI <delphij@frontfree.net>

14 years agocluster_read() was very dangerously issuing a blind BMAP for a buffer
Matthew Dillon [Fri, 10 Mar 2006 17:51:54 +0000 (17:51 +0000)]
cluster_read() was very dangerously issuing a blind BMAP for a buffer
cache block that was not yet locked, then locking the block and
unconditionally setting its block number translation to the results.
Due to the potential blocking that can occur inbetween these two operations,
it is possible (but not proven) that this can result in a buffer with a
stale translation.  If that buffer is later dirtied and written to disk,
the filesystem can become corrupt.

Change the code to getblk() the block prior to attempting to BMAP it, and
make the fbp argument to cluster_rbuild() mandatory.

14 years agoOops, it's /usr/release, not src/release.
Sascha Wildner [Fri, 10 Mar 2006 11:00:39 +0000 (11:00 +0000)]
Oops, it's /usr/release, not src/release.

14 years agoRemove the old release infrastructure documentation inherited from
Sascha Wildner [Fri, 10 Mar 2006 10:42:41 +0000 (10:42 +0000)]
Remove the old release infrastructure documentation inherited from
FreeBSD and replace it with some information about our nrelease
framework.

There's probably more to document here but this should be enough to
get people going.

14 years agoRename ${ENV} to ${ENVCMD} to prevent bad interference with some shells.
Simon Schubert [Thu, 9 Mar 2006 22:16:40 +0000 (22:16 +0000)]
Rename ${ENV} to ${ENVCMD} to prevent bad interference with some shells.

Reported-by: PinkFluid on IRC
14 years agoIf we got a SIGKILL signal in kern_sigtimedwait, call sigexit to
David Xu [Thu, 9 Mar 2006 08:32:42 +0000 (08:32 +0000)]
If we got a SIGKILL signal in kern_sigtimedwait, call sigexit to
kill the process.

14 years agoDocument the .Dx macro.
Sascha Wildner [Wed, 8 Mar 2006 23:09:30 +0000 (23:09 +0000)]
Document the .Dx macro.

Submitted-by: Francis Gudin <fgudin@nerim.net>
14 years agoStruct buf's cannot simply be bcopy'd any more due to linkages in the
Matthew Dillon [Wed, 8 Mar 2006 17:14:11 +0000 (17:14 +0000)]
Struct buf's cannot simply be bcopy'd any more due to linkages in the
BIOs.  The CCD code was also zeroing its custom bufs after initializing
them.  This fixes the bugs and cleans it up a bit.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
14 years agoAdd CAVEATS section documenting some possible pitfalls.
Sascha Wildner [Wed, 8 Mar 2006 12:37:47 +0000 (12:37 +0000)]
Add CAVEATS section documenting some possible pitfalls.

14 years ago* Only use two digits for DragonFly version numbers referenced from the
Sascha Wildner [Wed, 8 Mar 2006 09:53:30 +0000 (09:53 +0000)]
* Only use two digits for DragonFly version numbers referenced from the
  man pages.

* Adjust mdoc.local accordingly.[1]

[1]Submitted-by: Francis Gudin <fgudin@nerim.net>

14 years agoOnly define atop for _KERNEL or _KERNEL_STRUCTURES.
Jeremy C. Reed [Wed, 8 Mar 2006 04:54:05 +0000 (04:54 +0000)]
Only define atop for _KERNEL or _KERNEL_STRUCTURES.

Noticed because third-party userland code (csup) also tried to use
its own atop.

I tested with a buildworld and buildkernel on i386.

Okayed by M. Dillon via kernel mailing list.

(I didn't put this condition around ptoa because it is used in
usr.bin/gcore/gcore.c.)

14 years agoRemove two incorrect serializer calls in the NDIS code.
Matthew Dillon [Tue, 7 Mar 2006 20:03:54 +0000 (20:03 +0000)]
Remove two incorrect serializer calls in the NDIS code.

Reported-by: David Rhodus <drhodus@leaf.dragonflybsd.org>
14 years agoSwitch to building a libgdb and both gdb and kgdb.
Simon Schubert [Tue, 7 Mar 2006 15:48:11 +0000 (15:48 +0000)]
Switch to building a libgdb and both gdb and kgdb.

Gdb -k doesn't work anymore and was replaced by kgdb, which was imported in
large parts from FreeBSD.

Add a kernel variable indicating with thread is dumping.

14 years agoAdd missing argument.
Sascha Wildner [Mon, 6 Mar 2006 03:21:26 +0000 (03:21 +0000)]
Add missing argument.

14 years agoDon't modify p twice betweeen sequence points.
Sascha Wildner [Mon, 6 Mar 2006 03:10:51 +0000 (03:10 +0000)]
Don't modify p twice betweeen sequence points.

14 years agoFix typos:
Sascha Wildner [Mon, 6 Mar 2006 02:54:12 +0000 (02:54 +0000)]
Fix typos:

_ISO_C_VISIBLE -> __ISO_C_VISIBLE

_POSIX_VISIBLE -> __POSIX_VISIBLE

14 years agoRoll 1.5.1 for the slip tag
Matthew Dillon [Sun, 5 Mar 2006 18:44:14 +0000 (18:44 +0000)]
Roll 1.5.1 for the slip tag

14 years agoReplace the global buffer cache hash table with a per-vnode red-black tree.
Matthew Dillon [Sun, 5 Mar 2006 18:38:39 +0000 (18:38 +0000)]
Replace the global buffer cache hash table with a per-vnode red-black tree.
Add a B_HASHED b_flags bit as a sanity check.  Remove the invalhash junk
and replace with assertions in several cases where the buffer must already
not be hashed.  Get rid of incore() and gbincore() and replace with a new
function called findblk().

Merge the new RB management with bgetvp(), the two are now fully integrated.

Previous work has turned reassignbuf() into a mostly degenerate call, simplify
its arguments and functionality to match.  Remove an unnecessary reassignbuf()
call from the NFS code.  Get rid of pbreassignbuf().

Adjust the code in several places where it was assumed that calling
BUF_LOCK() with LK_SLEEPFAIL after previously failing with LK_NOWAIT
would always fail.  This code was used to sleep before a retry.  Instead,
if the second lock unexpectedly succeeds, simply issue an unlock and retry
anyway.

Testing-by: Stefan Krueger <skrueger@meinberlikomm.de>
14 years agoUnlock vnodes prior to issuing VOP_NREMOVE to accomodate filesystem
Matthew Dillon [Sat, 4 Mar 2006 17:39:08 +0000 (17:39 +0000)]
Unlock vnodes prior to issuing VOP_NREMOVE to accomodate filesystem
drivers which do not allow recursive exclusive locks (msdos).

Reported-by: Sascha Wildner <saw@online.de>
14 years agoAdd additional red-black tree functions for fast numeric field lookups.
Matthew Dillon [Fri, 3 Mar 2006 20:25:46 +0000 (20:25 +0000)]
Add additional red-black tree functions for fast numeric field lookups.
Unlike RB_FIND, these functions simply take the appropriate numeric data
type as the search argument rather then an entire dummy structure, and
directly test the numeric data type rather then make a callback.

14 years agovfs_bio_awrite() was unconditionally locking a buffer without checking
Matthew Dillon [Thu, 2 Mar 2006 20:28:49 +0000 (20:28 +0000)]
vfs_bio_awrite() was unconditionally locking a buffer without checking
for races, potentially resulting in the wrong buffer, an invalid buffer,
or a recently replaced buffer being written out.  Change the call semantics
to require a locked buffer to be passed into the function rather then
locking the buffer in the function.

14 years ago.Pq and friends add some unwanted extra whitespace. Use normal
Sascha Wildner [Thu, 2 Mar 2006 19:27:35 +0000 (19:27 +0000)]
.Pq and friends add some unwanted extra whitespace. Use normal
parentheses.

14 years agobuftimespinlock is utterly useless since the spinlock is released
Matthew Dillon [Thu, 2 Mar 2006 19:26:19 +0000 (19:26 +0000)]
buftimespinlock is utterly useless since the spinlock is released
within lockmgr().  The only real problem was with lk_prio, which no longer
exists, so get rid of the spin lock and document the remaining passive
races.

14 years agoPass LK_PCATCH instead of trying to store tsleep flags in the lock
Matthew Dillon [Thu, 2 Mar 2006 19:08:00 +0000 (19:08 +0000)]
Pass LK_PCATCH instead of trying to store tsleep flags in the lock
structure, so multiple entities competing for the same lock do not
use unexpected flags when sleeping.

Only NFS really uses PCATCH with lockmgr locks.

14 years agoFix initialisation of wide char support in FILE. Problem reported
Joerg Sonnenberger [Thu, 2 Mar 2006 18:05:30 +0000 (18:05 +0000)]
Fix initialisation of wide char support in FILE. Problem reported
on #dragonflybsd.

14 years agoMerge in security fix from FreeBSD.
David Rhodus [Wed, 1 Mar 2006 15:09:35 +0000 (15:09 +0000)]
Merge in security fix from FreeBSD.

simon       2006-03-01 14:21:56 UTC

 FreeBSD src repository (doc,ports committer)

 Modified files:        (Branch: RELENG_4)
   sys/nfs              nfs_socket.c
 Log:
 Correct a remote kernel panic when processing zero-length RPC records
 via TCP.

 Security:       FreeBSD-SA-06:10.nfs
 Approved by:    cperciva

 Revision  Changes    Path
 1.60.2.7  +1 -1      src/sys/nfs/nfs_socket.c

14 years agoRemove extra .Cm
Sascha Wildner [Wed, 1 Mar 2006 14:00:10 +0000 (14:00 +0000)]
Remove extra .Cm

14 years agoPull in a number of fixes from FreeBSD to fix at least the worst
Sascha Wildner [Wed, 1 Mar 2006 13:50:09 +0000 (13:50 +0000)]
Pull in a number of fixes from FreeBSD to fix at least the worst
issues:

rev. 1.43:
Kludge around troff bugs to get a reasonable print format despite the
necessity to shrink quoted text to fit on the page.

rev. 1.44:
A gross patch to tidy up the formatting.

rev. 1.47:
mdoc(7) police: Scheduled sweep.

rev. 1.49:
Insert device foo for a few drivers that don't have it.  Replace the
NetBSD config syntax with the FreeBSD syntax.

rev. 1.50:
Use a real (and compact) list for a filename list; this helps groff
split the lines in more reasonable places too, both in tty/ps output.

14 years agoRETURN VALUES is for function return values only. FreeBSD has an own
Sascha Wildner [Wed, 1 Mar 2006 08:08:45 +0000 (08:08 +0000)]
RETURN VALUES is for function return values only. FreeBSD has an own
EXIT STATUS section for exit codes returned to the shell. Until we do
as well, stuff it into DIAGNOSTICS as mdoc(7) advises.

14 years agoERRORS is errno related only. Move documentation to DIAGNOSTICS.
Sascha Wildner [Wed, 1 Mar 2006 08:01:09 +0000 (08:01 +0000)]
ERRORS is errno related only. Move documentation to DIAGNOSTICS.

14 years agodvp must be unlocked prior to issuing a VOP operation to avoid obtaining
Matthew Dillon [Wed, 1 Mar 2006 00:21:58 +0000 (00:21 +0000)]
dvp must be unlocked prior to issuing a VOP operation to avoid obtaining
a recursive exclusive lock.  Some filesystem drivers (e.g. msdos) do not
allow recursive locks.

Reported-by: Sascha Wildner <swildner@crater.dragonflybsd.org>
14 years agoA thread may be freed from a different cpu then it was assigned to,
Matthew Dillon [Wed, 1 Mar 2006 00:17:55 +0000 (00:17 +0000)]
A thread may be freed from a different cpu then it was assigned to,
remove the thread from the correct cpu's gd_tdallq.  This fixes an issue
with corruption of the gd_tdallq.

14 years agoFix section order (missed in my last commit).
Sascha Wildner [Wed, 1 Mar 2006 00:00:46 +0000 (00:00 +0000)]
Fix section order (missed in my last commit).

14 years agoAdd documentation for CAPS system calls.
Sascha Wildner [Tue, 28 Feb 2006 22:40:49 +0000 (22:40 +0000)]
Add documentation for CAPS system calls.

14 years agoProperly check for buffered data in ukbd_check_char(). This fixes issues
Matthew Dillon [Tue, 28 Feb 2006 18:48:01 +0000 (18:48 +0000)]
Properly check for buffered data in ukbd_check_char().  This fixes issues
with key codes getting mixed up between muxed keyboards.

Taken-from: FreeBSD / ukbd.c 1.53
Reported-by: "Norbert Koch" <NKoch@demig.de>
14 years agoDo not set the pcb_ext field until the private TSS has been completely
Matthew Dillon [Tue, 28 Feb 2006 18:30:22 +0000 (18:30 +0000)]
Do not set the pcb_ext field until the private TSS has been completely
initialized, otherwise an interrupt can come along and preempt, then
attempt to restore using the incompletely initialized TSS.

Do not free the pcb_ext data until after we have switched back to
the common TSS, otherwise a blockage in kmem_free() may cause a
premature thread switch with the now invalid private TSS.

Do not depend on need_user_resched() to set a private TSS prior to returning
from a system call, it may optimize itself into a NOP and not actually set
the private TSS prior to our return to userland.  Instead, active the
new private TSS manually by doing a forced thread switch to ourselves.

Reported-by: Sascha Wildner <saw@online.de>
14 years agoUse \(xx style escape sequences for some special characters so that
Sascha Wildner [Tue, 28 Feb 2006 02:25:11 +0000 (02:25 +0000)]
Use \(xx style escape sequences for some special characters so that
the correct glyphs are used for output devices like ps or utf8.

14 years agoFix file sizes > 2GB on isofs. This has already been fixed in the other BSDs.
Simon Schubert [Mon, 27 Feb 2006 02:50:48 +0000 (02:50 +0000)]
Fix file sizes > 2GB on isofs.  This has already been fixed in the other BSDs.

Submitted-by: Csaba Henk
14 years agoUpdate the DEBUG KERNELS section to reflect reality.
Sascha Wildner [Sun, 26 Feb 2006 23:27:08 +0000 (23:27 +0000)]
Update the DEBUG KERNELS section to reflect reality.

Submitted-by: Francis Gudin <fgudin@nerim.net>
14 years agonvi's "memory use after free" bug exists in following call path:
Matthew Dillon [Sun, 26 Feb 2006 17:18:06 +0000 (17:18 +0000)]
nvi's "memory use after free" bug exists in following call path:
v_switch()->ex_edit()->set_alt_name().  Patch the bug.

Obtained-from: OpenBSD
Submitted-by: "Sepherosa Ziehau" <sepherosa@gmail.com>
14 years agoWe don't support BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE and
Sascha Wildner [Sun, 26 Feb 2006 09:07:35 +0000 (09:07 +0000)]
We don't support BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE and
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE.

Requested-by: sephe
14 years agoOops, overlooked some spl*() references in my last commit.
Sascha Wildner [Sat, 25 Feb 2006 19:35:46 +0000 (19:35 +0000)]
Oops, overlooked some spl*() references in my last commit.

14 years agoRemove SPLASSERT(9) and spl(9) man pages and fix a few references.
Sascha Wildner [Sat, 25 Feb 2006 19:14:53 +0000 (19:14 +0000)]
Remove SPLASSERT(9) and spl(9) man pages and fix a few references.

14 years agoReplace .Fx with .Dx where necessary.
Sascha Wildner [Sat, 25 Feb 2006 11:38:57 +0000 (11:38 +0000)]
Replace .Fx with .Dx where necessary.

14 years agoRemove empty line to silence troff warning.
Sascha Wildner [Sat, 25 Feb 2006 11:26:13 +0000 (11:26 +0000)]
Remove empty line to silence troff warning.

14 years agoBring in the ndis(4) man page from FreeBSD (with minor modifications).
Sascha Wildner [Sat, 25 Feb 2006 10:20:10 +0000 (10:20 +0000)]
Bring in the ndis(4) man page from FreeBSD (with minor modifications).

14 years agoSync pciconf(8)'s database with FreeBSD-CURRENT's rev. 1.34.
Sascha Wildner [Thu, 23 Feb 2006 10:19:04 +0000 (10:19 +0000)]
Sync pciconf(8)'s database with FreeBSD-CURRENT's rev. 1.34.

14 years agoChange the server side NFS write gather delay from 10ms to 20ms. This
Matthew Dillon [Tue, 21 Feb 2006 19:00:19 +0000 (19:00 +0000)]
Change the server side NFS write gather delay from 10ms to 20ms.  This
avoids a boundary condition with the 100hz system clock and should slightly
improve write gather performance.

Use getmicrouptime() instead of getmicrotime() to record access cache
timestamps.  This prevents the client-side NFS attribute cache from
getting confused if the system time steps backwards.

14 years agobioops.io_start() was being called in a situation where the buffer could
Matthew Dillon [Tue, 21 Feb 2006 18:46:56 +0000 (18:46 +0000)]
bioops.io_start() was being called in a situation where the buffer could
be brelse()'d afterwords instead of I/O being initiated.  When this occurs,
the buffer may contain softupdates-modified data which is never reverted,
resulting in serious filesystem corruption.  When io_start is called on a
buffer, I/O MUST be initiated and terminated with a biodone() or the buffer's
data may not be properly reverted.

Solve the problem by moving the io_start() call a little further on in the
code, after the potential brelse().

There is a possibility that this bug is responsible for the 'dirbad' panics
often reported in DragonFly and FreeBSD circles.

14 years agoReduce the default NFSv3 access cache timeout from 60 seconds to 10 seconds.
Matthew Dillon [Tue, 21 Feb 2006 17:52:52 +0000 (17:52 +0000)]
Reduce the default NFSv3 access cache timeout from 60 seconds to 10 seconds.
The user can still adjust the timeout via vfs.nfs.access_cache_timeout.

Change the dynamic attribute cache timeout heuristic to be the approximate
number of seconds since the file was last modified divided by 60.  It used
to be divided by 10.

14 years agoReformulate some code which was #if 0'd out in the last patch. When
Matthew Dillon [Tue, 21 Feb 2006 17:36:38 +0000 (17:36 +0000)]
Reformulate some code which was #if 0'd out in the last patch.  When
reporting the 'busy buffer' problem, ignore dirty buffers for vnodes
which do not have any I/O in progress.