dragonfly.git
14 years agoEnable TCP wrappers in sshd.
Simon Schubert [Tue, 16 May 2006 16:26:08 +0000 (16:26 +0000)]
Enable TCP wrappers in sshd.

Reported-by: Yiorgos Adamopoulos <adamo@central.tee.gr>
14 years agoAdd a commant, which warns atomic_cmpset_int() is a !I386_CPU function
Sepherosa Ziehau [Tue, 16 May 2006 14:24:06 +0000 (14:24 +0000)]
Add a commant, which warns atomic_cmpset_int() is a !I386_CPU function

Suggested-by: joerg
14 years agoPut atomic_cmpset_int() into central place. This function was defined and
Sepherosa Ziehau [Tue, 16 May 2006 12:34:15 +0000 (12:34 +0000)]
Put atomic_cmpset_int() into central place.  This function was defined and
used in many places.

Reviewed-by: dillon
OK: davidxu

14 years agoRemove all traces of umapfs and associated stuff.
Sascha Wildner [Sun, 14 May 2006 18:07:29 +0000 (18:07 +0000)]
Remove all traces of umapfs and associated stuff.

Discussed-with: dillon

[forced commit to correct message]

14 years ago/tmp/umap.msg
Sascha Wildner [Sun, 14 May 2006 18:00:05 +0000 (18:00 +0000)]
/tmp/umap.msg

14 years agocbb_probe() assumes that the subclass field is unique. This patch further
Matthew Dillon [Sun, 14 May 2006 17:28:36 +0000 (17:28 +0000)]
cbb_probe() assumes that the subclass field is unique. This patch further
qualifies the check to verify that the device belongs to the bus class as
well before claiming the device.

Submitted-by: Chuck Tuffli <ctuffli@gmail.com>
14 years agoNuke duplicated header files, which restores `buildworld'
Sepherosa Ziehau [Sun, 14 May 2006 01:28:54 +0000 (01:28 +0000)]
Nuke duplicated header files, which restores `buildworld'

14 years agoRemove mount_umap.
Matthew Dillon [Sat, 13 May 2006 05:10:42 +0000 (05:10 +0000)]
Remove mount_umap.

14 years agoMost of the fields in vnodeop_desc have been unused for a while now.
Matthew Dillon [Fri, 12 May 2006 22:26:47 +0000 (22:26 +0000)]
Most of the fields in vnodeop_desc have been unused for a while now.
Remove them.

14 years agoUMAPFS has been disabled (and non-working) for a long time. Scrap it
Matthew Dillon [Fri, 12 May 2006 22:07:23 +0000 (22:07 +0000)]
UMAPFS has been disabled (and non-working) for a long time.  Scrap it
entirely.

14 years agoFix spelling and remove hard sentence break.
Sascha Wildner [Fri, 12 May 2006 14:05:39 +0000 (14:05 +0000)]
Fix spelling and remove hard sentence break.

14 years agoRemove Alpha specific header file.
Sascha Wildner [Fri, 12 May 2006 07:43:56 +0000 (07:43 +0000)]
Remove Alpha specific header file.

14 years agoMerge revisions 1.38,1.41 of eval.c from FreeBSD:
YONETANI Tomokazu [Fri, 12 May 2006 01:56:11 +0000 (01:56 +0000)]
Merge revisions 1.38,1.41 of eval.c from FreeBSD:
  PR 28852
  sh -e behaviour was incorrect when && and || statements where used in
  "if" clauses.
revision 1.41 is a fix to a bug in 1.38 that subshells could lose
a non-zero status.

dfly problem reported-by: Johannes Hofmann <Johannes.Hofmann at gmx.de>
OK'ed: dillon@, joerg@

14 years agoFix three bugs in the last commit and document special cases. Tighten
Matthew Dillon [Thu, 11 May 2006 19:50:29 +0000 (19:50 +0000)]
Fix three bugs in the last commit and document special cases.  Tighten
up the count calculation.   The code now passes the /usr/src/test/lockf
system test.

* F_UNLCK wasn't being handled properly in certain cases, resulting in a
  panic.

* The 'next' pointer was not bring properly adjusted when removing an
  element (brange) other then the current element in the scan, resulting
  in a posix lock error.

* The first and last matches were not always being properly merged with
  the created range, resulting in a positive count panic.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
14 years agoRecognize the cpu ident for additional VIA processors.
Matthew Dillon [Thu, 11 May 2006 16:44:43 +0000 (16:44 +0000)]
Recognize the cpu ident for additional VIA processors.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD

14 years ago* Remove the following obsolete options from the system:
Sascha Wildner [Thu, 11 May 2006 08:23:20 +0000 (08:23 +0000)]
* Remove the following obsolete options from the system:

  AAC_COMPAT_LINUX
  ACPI_MAX_THREADS
  AVM_A1_PCI
  CD9660_ROOT
  CPU_UPGRADE_HW_CACHE
  DEBUG_LINUX
  DEBUG_TOKENS
  DPT_ALLOW_MEMIO
  IDE_DELAY
  INVARIANT_SUPPORT
  KERNFS
  MFS_ROOT
  MFS_ROOT_SIZE
  NTIMECOUNTER
  OLTR_NO_BULLSEYE_MAC
  OLTR_NO_HAWKEYE_MAC
  OLTR_NO_TMS_MAC
  UGEN_DEBUG
  UHCI_DEBUG
  UHID_DEBUG
  UHUB_DEBUG
  UKBD_DEBUG
  ULPT_DEBUG
  UMASS_DEBUG
  UMS_DEBUG
  VM_KMEM_SIZE
  VM_KMEM_SIZE_MAX
  VM_KMEM_SIZE_SCALE

* Add numerous options to LINT

* Fix typo in options: TWA_FLASH_FIREWARE -> TWA_FLASH_FIRMWARE

* Fix typo in dgb.c: opt_depricated.h -> opt_deprecated.h

* Fix some minor manpage issues

14 years agoCorrect test for fragmented packet.
Jeffrey Hsu [Thu, 11 May 2006 00:52:03 +0000 (00:52 +0000)]
Correct test for fragmented packet.

14 years agoSync with FreeBSD.
Sascha Wildner [Wed, 10 May 2006 15:18:29 +0000 (15:18 +0000)]
Sync with FreeBSD.

14 years agoComment out references to cnw(4). It's unlikely that we'll import it.
Sascha Wildner [Tue, 9 May 2006 07:18:39 +0000 (07:18 +0000)]
Comment out references to cnw(4). It's unlikely that we'll import it.

14 years agoSplit kern/vfs_journal.c. Leave the low level journal support code in
Matthew Dillon [Mon, 8 May 2006 18:45:53 +0000 (18:45 +0000)]
Split kern/vfs_journal.c.  Leave the low level journal support code in
kern/vfs_journal.c and move all the mount-based journaling code and
journaling VNOPS to kern/vfs_jops.c.  This is in preparation for utilizing
the core journaling protocol for userland VFS support.

14 years agoRewrite the POSIX locking code. It was becomming impossible to track
Matthew Dillon [Mon, 8 May 2006 00:38:59 +0000 (00:38 +0000)]
Rewrite the POSIX locking code.  It was becomming impossible to track
down bugs in the previous version due to code complexity (in particular
a large number of undocumented short cuts and gotos), and general lack of
documentation.

The new code uses a more straightforward method for managing the lock list
and is far better documented.  Basically the conflict space is ranged,
if no conflict occurs the new lock is inserted, overlaps are clipped or
removed, and finally a quick optimization to check for and collapse
compatible adjacent locks.

14 years agoAdd a little program that allows one to test posix range locks.
Matthew Dillon [Mon, 8 May 2006 00:30:41 +0000 (00:30 +0000)]
Add a little program that allows one to test posix range locks.

14 years agoRemove the internal F_FLOCK flag. Either F_POSIX or F_FLOCK must be set,
Matthew Dillon [Sun, 7 May 2006 19:17:18 +0000 (19:17 +0000)]
Remove the internal F_FLOCK flag.  Either F_POSIX or F_FLOCK must be set,
so just use F_POSIX to indicate whether its a posix style lock or an flock
style lock.

14 years agolockmgr_kernproc() wasn't checking whether the lockholder as already
Matthew Dillon [Sun, 7 May 2006 00:51:11 +0000 (00:51 +0000)]
lockmgr_kernproc() wasn't checking whether the lockholder as already
LK_KERNTHREAD, resulting in a panic in certain situations.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
14 years agoRecode the streamid selector. The streamid was faked before. Do it for
Matthew Dillon [Sun, 7 May 2006 00:24:58 +0000 (00:24 +0000)]
Recode the streamid selector.  The streamid was faked before.  Do it for
real now, guarenteeing that parallel transactions will have unique stream
identifiers.

In addition, while not required, streamid calculations are such that non
parallel transactions will have a tendancy to use the same id, so someone
observing the streamid's in a journaling stream can easily pick out when
parallel transactions occur.

14 years agoWe have to use pmap_extract() here. If we lose a race against page
Matthew Dillon [Sun, 7 May 2006 00:24:02 +0000 (00:24 +0000)]
We have to use pmap_extract() here.  If we lose a race against page
table cleaning pmap_kextract() could choke on a missing page directory.

14 years agoWe have to use pmap_extract() here. pmap_kextract() will choke on a missing
Matthew Dillon [Sun, 7 May 2006 00:23:08 +0000 (00:23 +0000)]
We have to use pmap_extract() here.  pmap_kextract() will choke on a missing
page directory and the user memory hasn't been touched yet.

14 years agoWe have to use pmap_extract here, pmap_kextract will choke if the page
Matthew Dillon [Sun, 7 May 2006 00:22:37 +0000 (00:22 +0000)]
We have to use pmap_extract here, pmap_kextract will choke if the page
directory is missing and the user memory has not been touched.

14 years agoFix a null pointer indirection, the VM fault rate limiting code only
Matthew Dillon [Sat, 6 May 2006 23:53:34 +0000 (23:53 +0000)]
Fix a null pointer indirection, the VM fault rate limiting code only
applies to processes.

14 years agoRemove the thread argument from all mount->vfs_* function vectors,
Matthew Dillon [Sat, 6 May 2006 18:48:53 +0000 (18:48 +0000)]
Remove the thread argument from all mount->vfs_* function vectors,
replacing it with a ucred pointer when applicable.  This cleans up a
considerable amount of VFS function code that previously delved into
the process structure to get the cred, though some code remains.

Get rid of the compatibility thread argument for hpfs and nwfs.  Our
lockmgr calls are now mostly compatible with NetBSD (which doesn't use a
thread argument either).

Get rid of some complex junk in fdesc_statfs() that nobody uses.

Remove the thread argument from dounmount() as well as various other
filesystem specific procedures (quota calls primarily) which no longer
need it due to the lockmgr, VOP, and VFS cleanups.  These cleanups also
have the effect of making the VFS code slightly less dependant on the
calling thread's context.

14 years agoFix .Os and a .Xr. Expand HISTORY a bit.
Sascha Wildner [Sat, 6 May 2006 17:39:29 +0000 (17:39 +0000)]
Fix .Os and a .Xr. Expand HISTORY a bit.

14 years agoRemove the thread argument from ext2_quotaoff(), ext2_flushfiles(),
Matthew Dillon [Sat, 6 May 2006 16:33:26 +0000 (16:33 +0000)]
Remove the thread argument from ext2_quotaoff(), ext2_flushfiles(),
ext2_mountfs(), and ext2_reload().

14 years agoRemove the thread argument from ffs_flushfiles(), ffs_mountfs(),
Matthew Dillon [Sat, 6 May 2006 16:20:19 +0000 (16:20 +0000)]
Remove the thread argument from ffs_flushfiles(), ffs_mountfs(),
softdep_flushfiles(), ffs_reload(), ufs_quotaon(), and ufs_quotaoff().

14 years agoRemove the thread_t argument from nfs_rslock() and nfs_rsunlock().
Matthew Dillon [Sat, 6 May 2006 16:01:21 +0000 (16:01 +0000)]
Remove the thread_t argument from nfs_rslock() and nfs_rsunlock().

14 years agoThe fdrop() procedure no longer needs a thread argument, remove it.
Matthew Dillon [Sat, 6 May 2006 06:38:39 +0000 (06:38 +0000)]
The fdrop() procedure no longer needs a thread argument, remove it.

14 years agoAdd some ifioctl() td -> ucred changes that were missed.
Matthew Dillon [Sat, 6 May 2006 03:16:44 +0000 (03:16 +0000)]
Add some ifioctl() td -> ucred changes that were missed.

14 years agoThe thread/proc pointer argument in the VFS subsystem originally existed
Matthew Dillon [Sat, 6 May 2006 02:43:15 +0000 (02:43 +0000)]
The thread/proc pointer argument in the VFS subsystem originally existed
for...  well, I'm not sure *WHY* it originally existed when most of the
time the pointer couldn't be anything other then curthread or curproc or
the code wouldn't work.  This is particularly true of lockmgr locks.

Remove the pointer argument from all VOP_*() functions, all fileops functions,
and most ioctl functions.

14 years agoRemove the thread_t argument from vfs_busy() and vfs_unbusy(). Passing a
Matthew Dillon [Fri, 5 May 2006 21:27:58 +0000 (21:27 +0000)]
Remove the thread_t argument from vfs_busy() and vfs_unbusy().  Passing a
thread_t to these functions has always been questionable at best.

14 years agoSimplify vn_lock(), VOP_LOCK(), and VOP_UNLOCK() by removing the thread_t
Matthew Dillon [Fri, 5 May 2006 21:15:11 +0000 (21:15 +0000)]
Simplify vn_lock(), VOP_LOCK(), and VOP_UNLOCK() by removing the thread_t
argument.  These calls now always use the current thread as the lockholder.
Passing a thread_t to these functions has always been questionable at best.

14 years agoRemove the thread pointer argument to lockmgr(). All lockmgr() ops use the
Matthew Dillon [Fri, 5 May 2006 20:15:02 +0000 (20:15 +0000)]
Remove the thread pointer argument to lockmgr().  All lockmgr() ops use the
current thread.

Move the lockmgr code in BUF_KERNPROC to lockmgr_kernproc().  This code
allows the lock owner to be set to a special value so any thread can unlock
the lock and is required for B_ASYNC I/O so biodone() can release the lock.

14 years agoRemove VOP_BWRITE(). This function provided a way for a VFS to override
Matthew Dillon [Fri, 5 May 2006 16:35:11 +0000 (16:35 +0000)]
Remove VOP_BWRITE().  This function provided a way for a VFS to override
the bwrite() function and was used *only* by NFS in order to allow NFS to
handle the B_NEEDCOMMIT flag as part of NFSv3's 2-phase commit operation.
However, over time, the handling of this flag was moved to the strategy code.
Additionally, the kernel now fully supports the redirtying of buffers
during an I/O (which both softupdates and NFS need to be able to do).

The override is no longer needed.  All former calls to VOP_BWRITE() now
simply call bwrite().

14 years agoCleanup procedure prototypes, get rid of extra spaces in pointer decls.
Matthew Dillon [Fri, 5 May 2006 16:15:56 +0000 (16:15 +0000)]
Cleanup procedure prototypes, get rid of extra spaces in pointer decls.

14 years agocorrect "polling" support
Sepherosa Ziehau [Fri, 5 May 2006 14:53:41 +0000 (14:53 +0000)]
correct "polling" support

14 years agoRemove unused label.
Sascha Wildner [Fri, 5 May 2006 09:28:05 +0000 (09:28 +0000)]
Remove unused label.

14 years agoBlock devices generally truncate the size of I/O requests which go past EOF.
Matthew Dillon [Thu, 4 May 2006 18:32:23 +0000 (18:32 +0000)]
Block devices generally truncate the size of I/O requests which go past EOF.
This is exactly what we want when manually reading or writing a block device
such as /dev/ad0s1a, but is not desired when a VFS issues I/O ops on
filesystem buffers.  In such cases, any EOF condition must be considered an
error.

Implement a new filesystem buffer flag B_BNOCLIP, which getblk() and friends
automatically set.  If set, block devices are guarenteed to return an error
if the I/O request is at EOF or would otherwise have to be clipped to EOF.
Block devices further guarentee that b_bcount will not be modified when this
flag is set.

Adjust all block device EOF checks to use the new flag, and clean up the code
while I'm there.  Also, set b_resid in a couple of degenerate cases where
it was not being set.

14 years agoDon't forget to replicate b_cmd, which has been split off of b_flags.
YONETANI Tomokazu [Thu, 4 May 2006 08:00:59 +0000 (08:00 +0000)]
Don't forget to replicate b_cmd, which has been split off of b_flags.

14 years ago- Clarify the definitions of b_bufsize, b_bcount, and b_resid.
Matthew Dillon [Wed, 3 May 2006 20:44:49 +0000 (20:44 +0000)]
- Clarify the definitions of b_bufsize, b_bcount, and b_resid.
- Remove unnecessary assignments based on the clarified fields.
- Add additional checks for premature EOF.

b_bufsize is only used by buffer management entities such as getblk() and
other vnode-backed buffer handling procedures.  b_bufsize is not required
for calls to vn_strategy() or dev_dstrategy().  A number of other subsystems
use it to track the original request size.

b_bcount is the I/O request size, but b_bcount() is allowed to be truncated
by the device chain if the request encompasses EOF (such as on a raw disk
device).  A caller which needs to record the original buffer size verses
the EOF-truncated buffer can compare b_bcount after the I/O against a
recorded copy of the original request size.  This copy can be recorded in
b_bufsize for unmanaged buffers (malloced or getpbuf()'d buffers).

b_resid is always relative to b_bcount, not b_bufsize.  A successful read
that is truncated to the device EOF will thus have a b_resid of 0 and a
truncated b_bcount.

14 years agoDocument the handling of a file holes in ufs_strategy() and clean up
Matthew Dillon [Wed, 3 May 2006 19:57:54 +0000 (19:57 +0000)]
Document the handling of a file holes in ufs_strategy() and clean up
the code flow a little.

14 years agoInvert a mistaken test. Set b_resid to 0 if B_ERROR is not set.
Matthew Dillon [Wed, 3 May 2006 16:34:16 +0000 (16:34 +0000)]
Invert a mistaken test.  Set b_resid to 0 if B_ERROR is not set.

14 years agoRemove the accounting argument from lf_create_range() and lf_destroy_range().
Matthew Dillon [Wed, 3 May 2006 15:20:43 +0000 (15:20 +0000)]
Remove the accounting argument from lf_create_range() and lf_destroy_range().
Integrate p_numposixlocks counting into lf_count_change().  Calculate the
correct delta when changing flags on existing locks.

14 years agoMinor cleanup, plus initialize a few additional fields in the proc
Matthew Dillon [Wed, 3 May 2006 15:18:38 +0000 (15:18 +0000)]
Minor cleanup, plus initialize a few additional fields in the proc
structure so we don't get bitten by them in the future.

14 years agoAdd a missing ohci_waitintr() call that allows polled operation of
Matthew Dillon [Wed, 3 May 2006 15:08:43 +0000 (15:08 +0000)]
Add a missing ohci_waitintr() call that allows polled operation of
bulk transfers to have a chance of working.  Kernel crash dumps
to umass() work with this change.

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD PR:usb/93720

14 years agoFix a biodone/AR_WAIT case. b_cmd was not getting set to BUF_CMD_DONE,
Matthew Dillon [Wed, 3 May 2006 06:28:01 +0000 (06:28 +0000)]
Fix a biodone/AR_WAIT case.  b_cmd was not getting set to BUF_CMD_DONE,
causing ATA-RAID to timeout.

Reported-by: Stefan Krueger, YONETANI Tomokazu
14 years agoFix an information disclosure issue on AMD cpus. The x87 debug registers,
Matthew Dillon [Tue, 2 May 2006 22:52:24 +0000 (22:52 +0000)]
Fix an information disclosure issue on AMD cpus.  The x87 debug registers,
in particular the last instruction and last data pointers, are not restored
by fxrstor() if there was no pending exception.  Add some dummy FP
instructions (about ~7ns) to 'clean' the registers so a process has no
visibility into another process's FP state.

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD
Security-Advistory: FreeBSD-SA-06:14.fpu

14 years agoFix a bug in close(). When a descriptor is closed, all process leaders
Matthew Dillon [Tue, 2 May 2006 21:30:43 +0000 (21:30 +0000)]
Fix a bug in close().  When a descriptor is closed, all process leaders
sharing that descriptor table must clear any related POSIX locks.  The
code was looping through all the leaders but passing the wrong process
pointer to VOP_ADVLOCK, resulting in an assertion panic later on in exit1().

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
14 years agoThe wrong pointer was being used to calculate the page offset, leading
Matthew Dillon [Tue, 2 May 2006 19:21:50 +0000 (19:21 +0000)]
The wrong pointer was being used to calculate the page offset, leading
to a vmapbuf() assertion.  This bug was introduced in a recent commit.

14 years ago- Add workarounds for dropped interrupts on VIA and ATI controllers.
Matthew Dillon [Tue, 2 May 2006 16:12:01 +0000 (16:12 +0000)]
- Add workarounds for dropped interrupts on VIA and ATI controllers.
- Include more vendor IDs.

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD/NetBSD

14 years agoPlug memory leak in umass.
Matthew Dillon [Tue, 2 May 2006 16:08:44 +0000 (16:08 +0000)]
Plug memory leak in umass.

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD/NetBSD

14 years agoSupply a stack pointer for a pure thread context so backtrace works.
Matthew Dillon [Mon, 1 May 2006 16:56:01 +0000 (16:56 +0000)]
Supply a stack pointer for a pure thread context so backtrace works.
Otherwise the 'back' command on a paniced kernel thread may get confused.

14 years ago32bit from 64bit value fixup.
Matthew Dillon [Mon, 1 May 2006 16:27:35 +0000 (16:27 +0000)]
32bit from 64bit value fixup.

fixed a bug comparing sav->key_auth and SADB_AALG_NONE. [From KAME]

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years agomore strict sanity check for ESP tail. [From KAME]
Matthew Dillon [Mon, 1 May 2006 16:26:54 +0000 (16:26 +0000)]
more strict sanity check for ESP tail. [From KAME]

Fix IPv6 error statistics being recorded as IPv4.

m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation
has to happen before the call to m_cat(). [May not apply.]

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years agoFix fencepost error causing creation of 0-length mbufs when
Matthew Dillon [Mon, 1 May 2006 16:26:29 +0000 (16:26 +0000)]
Fix fencepost error causing creation of 0-length mbufs when
the boundary between header and data fell on the boundary
between two mbufs.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years ago32bit from 64bit value fixup. Fix typo.
Matthew Dillon [Mon, 1 May 2006 16:26:09 +0000 (16:26 +0000)]
32bit from 64bit value fixup.  Fix typo.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years agom_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation
Matthew Dillon [Mon, 1 May 2006 16:25:41 +0000 (16:25 +0000)]
m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation
has to happen before the call to m_cat(). [May not apply.]

Fix IPv6 error statistics being recorded as IPv4.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years agoPlug xform memory leaks. Don't re-initialize an xform for an SA that
Matthew Dillon [Mon, 1 May 2006 16:24:43 +0000 (16:24 +0000)]
Plug xform memory leaks. Don't re-initialize an xform for an SA that
already has one.

Add a missing 'break;'

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4

14 years agoFix kldstat option.
Sascha Wildner [Mon, 1 May 2006 09:22:14 +0000 (09:22 +0000)]
Fix kldstat option.

14 years agoRemove ports(7) reference and reword.
Sascha Wildner [Mon, 1 May 2006 09:06:33 +0000 (09:06 +0000)]
Remove ports(7) reference and reword.

14 years agoDocument recently added devices.
Sascha Wildner [Mon, 1 May 2006 02:06:40 +0000 (02:06 +0000)]
Document recently added devices.

Submitted-by: Gary <gary@velocity-servers.net>
14 years agoAdd missing #includes.
Sascha Wildner [Mon, 1 May 2006 01:32:11 +0000 (01:32 +0000)]
Add missing #includes.

14 years agoRemove buf->b_saveaddr, assert that vmapbuf() is only called on pbuf's. Pass
Matthew Dillon [Sun, 30 Apr 2006 20:23:26 +0000 (20:23 +0000)]
Remove buf->b_saveaddr, assert that vmapbuf() is only called on pbuf's.  Pass
the user pointer and length to vmapbuf() rather then having it try to pull
the information out of the buffer.  vmapbuf() is now responsible for setting
b_data, b_bufsize, and b_bcount.

Also fix a bug in cam_periph_mapmem().  The procedure was failing to unmap
earlier vmapped bufs if later vmapbuf() calls in the loop failed.

14 years agoThe pbuf subsystem now initializes b_kvabase and b_kvasize at startup and
Matthew Dillon [Sun, 30 Apr 2006 18:52:37 +0000 (18:52 +0000)]
The pbuf subsystem now initializes b_kvabase and b_kvasize at startup and
no longer reinitializes these fields in initpbuf().

Users of getpbuf() may no longer modify b_kvabase or b_kvasize.  b_data may
still be modified.

14 years agoAdd some missing manual pages.
Sascha Wildner [Sun, 30 Apr 2006 18:46:39 +0000 (18:46 +0000)]
Add some missing manual pages.

Taken-from: FreeBSD

14 years agoRemove b_xflags. Fold BX_VNCLEAN and BX_VNDIRTY into b_flags as
Matthew Dillon [Sun, 30 Apr 2006 18:25:37 +0000 (18:25 +0000)]
Remove b_xflags.  Fold BX_VNCLEAN and BX_VNDIRTY into b_flags as
B_VNCLEAN and B_VNDIRTY.  Remove BX_AUTOCHAINDONE and recode the
swap pager to use one of the caller data fields in the BIO instead.

14 years agoReplace the the buffer cache's B_READ, B_WRITE, B_FORMAT, and B_FREEBUF
Matthew Dillon [Sun, 30 Apr 2006 17:22:18 +0000 (17:22 +0000)]
Replace the the buffer cache's B_READ, B_WRITE, B_FORMAT, and B_FREEBUF
b_flags with a separate b_cmd field.  Use b_cmd to test for I/O completion
as well (getting rid of B_DONE in the process).  This further simplifies
the setup required to issue a buffer cache I/O.

Remove a redundant header file, bus/isa/i386/isa_dma.h and merge any
discrepancies into bus/isa/isavar.h.

Give ISADMA_READ/WRITE/RAW their own independant flag definitions instead of
trying to overload them on top of B_READ, B_WRITE, and B_RAW.  Add a
routine isa_dmabp() which takes a struct buf pointer and returns the ISA
dma flags associated with the operation.

Remove the 'clear_modify' argument to vfs_busy_pages().  Instead,
vfs_busy_pages() asserts that the buffer's b_cmd is valid and then uses
it to determine the action it must take.

14 years agoAdd NetGear FA-511 support
Sepherosa Ziehau [Sun, 30 Apr 2006 02:02:06 +0000 (02:02 +0000)]
Add NetGear FA-511 support

Obtained-from: FreeBSD
Tested-by: Andrew Thompson <andrew@hijacked.us>
14 years agoBring in SHA256 support from FreeBSD.
Matthew Dillon [Sat, 29 Apr 2006 22:19:26 +0000 (22:19 +0000)]
Bring in SHA256 support from FreeBSD.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD

14 years agoBring in some fixes from NetBSD:
Matthew Dillon [Sat, 29 Apr 2006 22:05:21 +0000 (22:05 +0000)]
Bring in some fixes from NetBSD:

- Avoid NULL pointer dereference (ehci.c)
- Abort quickly if we don't have a buffer in all the cases. (uhci.c)
- Only do the software reset if we are dying, like we do in ohci and
  ehci (uhci.c)

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: NetBSD

14 years agoFix typo.
Sascha Wildner [Fri, 28 Apr 2006 20:16:26 +0000 (20:16 +0000)]
Fix typo.

14 years agoNever generate external references for __cursig().
Sascha Wildner [Fri, 28 Apr 2006 18:23:45 +0000 (18:23 +0000)]
Never generate external references for __cursig().

For what it's worth, this fixes buildkernel with -O0.

__inline-clue-by: joerg

14 years agoMove the error check into the else clause because it only applies there.
Sascha Wildner [Fri, 28 Apr 2006 16:45:34 +0000 (16:45 +0000)]
Move the error check into the else clause because it only applies there.

14 years agoGet rid of pbgetvp() and pbrelvp(). Instead fold the B_PAGING flag directly
Matthew Dillon [Fri, 28 Apr 2006 16:34:02 +0000 (16:34 +0000)]
Get rid of pbgetvp() and pbrelvp().  Instead fold the B_PAGING flag directly
into getpbuf() (the only type of buffer that pbgetvp() could be called on
anyway).  Change related b_flags assignments from '=' to '|='.

Get rid of remaining depdendancies on b_vp.  vn_strategy() now relies solely
on the vp passed to it as an argument.  Remove buffer cache code that sets
b_vp for anonymous pbuf's.

Add a stopgap 'vp' argument to vfs_busy_pages().  This is only really needed
by NFS and the clustering code do to the severely hackish nature of the
NFS and clustering code.

Fix a bug in the ext2fs inode code where vfs_busy_pages() was being called
on B_CACHE buffers.  Add an assertion to vfs_busy_pages() to panic if it
encounters a B_CACHE buffer.

14 years agoRemove non-existant variable from debugging message.
Matthew Dillon [Fri, 28 Apr 2006 16:06:50 +0000 (16:06 +0000)]
Remove non-existant variable from debugging message.

Reported-by: Sascha Wildner <saw@online.de>
14 years agoGet rid of the remaining buffer background bitmap code. It's been turned
Matthew Dillon [Fri, 28 Apr 2006 06:13:56 +0000 (06:13 +0000)]
Get rid of the remaining buffer background bitmap code.  It's been turned
off for a while, and it represents a fairly severe hack to the buffer
cache code that just complicates further development.

14 years agoRemove the buffer cache's B_PHYS flag. This flag was originally used as
Matthew Dillon [Fri, 28 Apr 2006 00:24:46 +0000 (00:24 +0000)]
Remove the buffer cache's B_PHYS flag.  This flag was originally used as
part of a severe hack to treat buffers containing 'user' addresses
differently, in particular by using b_offset instead of b_blkno.  Now that
buffer cache buffers only HAVE b_offset (b_*blkno is gone for good), there
is literally no difference between B_PHYS I/O and non-B_PHYS I/O once
the buffer has been handed off to the device.

14 years agoFix a bug in the POSIX locking code. The system could lose track of
Matthew Dillon [Fri, 28 Apr 2006 00:13:23 +0000 (00:13 +0000)]
Fix a bug in the POSIX locking code.  The system could lose track of
range locks due to a bad flags assignment, resulting in odd operation and/or
an assertion at process exit.  Fix the flags assignment.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
14 years agoMove most references to the buffer cache array (buf[]) to kern/vfs_bio.c.
Matthew Dillon [Thu, 27 Apr 2006 23:28:37 +0000 (23:28 +0000)]
Move most references to the buffer cache array (buf[]) to kern/vfs_bio.c.
Implement a procedure which scans all buffers, called scan_all_buffers().
Cleanup unused debugging code referencing buf[].

14 years agoGet rid of libcr, the idea(s) behind it are not really applicable anymore
Matthew Dillon [Thu, 27 Apr 2006 17:23:14 +0000 (17:23 +0000)]
Get rid of libcr, the idea(s) behind it are not really applicable anymore
now that libc_r is properly linked against libc.

14 years agogrrr...fix reverse chronological order
Sascha Wildner [Thu, 27 Apr 2006 16:01:33 +0000 (16:01 +0000)]
grrr...fix reverse chronological order

14 years agoUpdate HISTORY section for preadv and pwritev.
Sascha Wildner [Thu, 27 Apr 2006 15:49:57 +0000 (15:49 +0000)]
Update HISTORY section for preadv and pwritev.

14 years agoAdd documentation for the new preadv(2) and pwritev(2) system calls.
Sascha Wildner [Thu, 27 Apr 2006 15:36:00 +0000 (15:36 +0000)]
Add documentation for the new preadv(2) and pwritev(2) system calls.

Submitted-by: Chuck Tuffli <ctuffli@gmail.com>
14 years agoSignals are described in signal(3).
Sascha Wildner [Thu, 27 Apr 2006 10:25:34 +0000 (10:25 +0000)]
Signals are described in signal(3).

14 years agoRemove unneeded comma.
Sascha Wildner [Thu, 27 Apr 2006 10:24:14 +0000 (10:24 +0000)]
Remove unneeded comma.

14 years agoRemove trailing whitespace.
Sascha Wildner [Thu, 27 Apr 2006 10:23:20 +0000 (10:23 +0000)]
Remove trailing whitespace.

14 years agos/pxeldr/pxeboot/
Sascha Wildner [Thu, 27 Apr 2006 10:22:08 +0000 (10:22 +0000)]
s/pxeldr/pxeboot/

14 years agoAdd missing braces.
Sascha Wildner [Thu, 27 Apr 2006 08:19:29 +0000 (08:19 +0000)]
Add missing braces.

Submitted-by: Csaba Henk <csaba.henk@creo.hu>
14 years agoFix LINT build.
Sascha Wildner [Thu, 27 Apr 2006 08:03:56 +0000 (08:03 +0000)]
Fix LINT build.

kern_readv() and kern_writev() were renamed to kern_preadv() and
kern_pwritev().

14 years agoFix the range checking for all read and write system calls. Fix the
Matthew Dillon [Wed, 26 Apr 2006 17:42:55 +0000 (17:42 +0000)]
Fix the range checking for all read and write system calls.  Fix the
iovec code to properly range-check iovec elements and to ensure that
the total length does not overflow a signed integer.  Regardless of
'size_t', the kernel does not allow any single I/O operation to exceed
2^31 bytes.

14 years agoAdd the preadv() and pwritev() systems and regenerate.
Matthew Dillon [Wed, 26 Apr 2006 17:17:57 +0000 (17:17 +0000)]
Add the preadv() and pwritev() systems and regenerate.

Submitted-by: Chuck Tuffli <ctuffli@gmail.com>
Loosely-based-on: FreeBSD

14 years agoGet rid of the weird FSMID update path in the vnode and namecache code.
Matthew Dillon [Tue, 25 Apr 2006 22:11:32 +0000 (22:11 +0000)]
Get rid of the weird FSMID update path in the vnode and namecache code.
Instead, mark the vnode as needing an FSMID update when the vnode is
disconnected from the namecache.

This fixes a bug where FSMID updates were being lost at unmount time.

14 years agoSeparate the MD5 code into its own module.
Matthew Dillon [Tue, 25 Apr 2006 21:30:45 +0000 (21:30 +0000)]
Separate the MD5 code into its own module.

Add -k/-K to have cpdup use the experimental FSMID to detect changes,
allowing it to shortcut whole directory subhiearchies.

It should be noted that using cpdup with a NFS or other remote filesystem
as the source with this option will not work, since the NFS client cannot
currently detect if the server (or some other client) has modified a file
or directory.