]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoo lsi64854_enet_intr():
Marius Strobl [Tue, 31 Jan 2006 12:50:02 +0000 (12:50 +0000)]
o lsi64854_enet_intr():
  - Like lsi64854_scsi_intr() return -1 in case there was a DMA error so
    the caller can distinguish it from a normal interrupt and leave the
    reset of the DMA engine to the caller so we don't kill any state there.
  - Move the static 'dodrain' flag to struct lsi64854_softc as there can
    be more than one LSI64854 used for a LANCE in a system and reset it
    again once draining the E-cache is done so we don't keep draining the
    cache with every interrupt.
  - Remove calling sc->sc_intrchain(), we will call lsi64854_enet_intr()
    via sc->intr() in the interrupt handler of the LANCE driver and not
    use it in chained mode.

o lsi64854_pp_intr():
  - Like lsi64854_scsi_intr() return -1 in case there was a DMA error so
    the caller can distinguish it from a normal interrupt.

o Remove the no longer used sc_intrchain* from struct lsi64854_softc.

o Make lsi64854_reset(), lsi64854_setup*() and lsi64854_*_intr() static
  to lsi64854.c as we do and will only call them via the respective
  function pointers in struct lsi64854_softc.

o While here fix style(9) bugs (variable definition inside a nested scope).

18 years agoAdd simple tests which verify that redzone(9) works properly.
Pawel Jakub Dawidek [Tue, 31 Jan 2006 11:20:13 +0000 (11:20 +0000)]
Add simple tests which verify that redzone(9) works properly.

18 years agoAdd buffer corruption protection (RedZone) for kernel's malloc(9).
Pawel Jakub Dawidek [Tue, 31 Jan 2006 11:09:21 +0000 (11:09 +0000)]
Add buffer corruption protection (RedZone) for kernel's malloc(9).
It detects both: buffer underflows and buffer overflows bugs at runtime
(on free(9) and realloc(9)) and prints backtraces from where memory was
allocated and from where it was freed.

Tested by: kris

18 years agoAdd missing 's' suffix on alternate rendition of time.
Poul-Henning Kamp [Tue, 31 Jan 2006 08:09:37 +0000 (08:09 +0000)]
Add missing 's' suffix on alternate rendition of time.

18 years agoFix a malloc overrun in 32-bit compat libmap lookup code.
Peter Wemm [Tue, 31 Jan 2006 06:08:28 +0000 (06:08 +0000)]
Fix a malloc overrun in 32-bit compat libmap lookup code.

18 years agoDon't set time to current, if set to specific time fails
Andrey A. Chernov [Tue, 31 Jan 2006 02:21:18 +0000 (02:21 +0000)]
Don't set time to current, if set to specific time fails

PR:             92577

18 years agoDoes not return EBUSY, the mutex will keep blocking until it's unlocked.
Tom Rhodes [Tue, 31 Jan 2006 01:47:16 +0000 (01:47 +0000)]
Does not return EBUSY, the mutex will keep blocking until it's unlocked.

18 years agoTell the user exactly where the problem was.
Pawel Jakub Dawidek [Mon, 30 Jan 2006 23:00:48 +0000 (23:00 +0000)]
Tell the user exactly where the problem was.

18 years agoUse pidfile(3).
Pawel Jakub Dawidek [Mon, 30 Jan 2006 22:50:13 +0000 (22:50 +0000)]
Use pidfile(3).

OK'ed by: imp

18 years agoAllow to specify only one disk. This is helpful when we want to extend
Pawel Jakub Dawidek [Mon, 30 Jan 2006 22:47:07 +0000 (22:47 +0000)]
Allow to specify only one disk. This is helpful when we want to extend
our concatenated device later.

MFC after: 1 week

18 years agoFix typo which cased that 64kB elements limit was not set properly and
Pawel Jakub Dawidek [Mon, 30 Jan 2006 22:45:43 +0000 (22:45 +0000)]
Fix typo which cased that 64kB elements limit was not set properly and
16kB elements limit wasn't set at all.

Submitted by: Vsevolod Lobko <seva@ip.net.ua>
MFC after: 3 days

18 years agoRevert the part of rev. 1.3 which enabled the chaining of the DMA engine
Marius Strobl [Mon, 30 Jan 2006 21:43:14 +0000 (21:43 +0000)]
Revert the part of rev. 1.3 which enabled the chaining of the DMA engine
interrupt handler for the LANCE devices and remove dma_setup_intr(). We
just can't completely ignore the DMA engine in a LANCE driver anyway and
calling the DMA engine interrupt handler in the LANCE driver directly
allows to cover it by the LANCE driver lock.

18 years agoAdd manual page for Cronyx Tau-PCI/32 ce(4) driver.
Roman Kurakin [Mon, 30 Jan 2006 21:33:22 +0000 (21:33 +0000)]
Add manual page for Cronyx Tau-PCI/32 ce(4) driver.

18 years agoFix forward variable declaration.
Roman Kurakin [Mon, 30 Jan 2006 21:12:49 +0000 (21:12 +0000)]
Fix forward variable declaration.

18 years agoAdd support for Cronyx TAU-PCI/32 ce(4).
Roman Kurakin [Mon, 30 Jan 2006 21:08:30 +0000 (21:08 +0000)]
Add support for Cronyx TAU-PCI/32 ce(4).

18 years ago- Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.
Florent Thoumie [Mon, 30 Jan 2006 20:27:44 +0000 (20:27 +0000)]
- Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.

Reported by: anders on freebsd-usb@
Tested by: anders
Approved by: ssouhlal
MFC after: 3 days

18 years agoRegroup order of operations to better reflect what was probably intended.
Scott Long [Mon, 30 Jan 2006 19:25:52 +0000 (19:25 +0000)]
Regroup order of operations to better reflect what was probably intended.

Submitted by: Peter Jeremy

18 years agoMake df output more consistent:
Matteo Riondato [Mon, 30 Jan 2006 19:23:24 +0000 (19:23 +0000)]
Make df output more consistent:
Remove -k now that -h is present
use -l instead of -t nonfs to match smbfs too [1]
PR: conf/50956 [1]
Approved by: philip (mentor)
MFC after: 3 days

18 years agoFix a leftover "iwi_boot" string.
Max Laier [Mon, 30 Jan 2006 16:32:08 +0000 (16:32 +0000)]
Fix a leftover "iwi_boot" string.

Submitted by: gallatin

18 years agoEnable splitting up the MFSROOT floppy on amd64, the contents now overflow
Ken Smith [Mon, 30 Jan 2006 14:24:31 +0000 (14:24 +0000)]
Enable splitting up the MFSROOT floppy on amd64, the contents now overflow
one floppy's worth of space.

18 years agoRecognize new VLAN_HWCSUM flag.
Gleb Smirnoff [Mon, 30 Jan 2006 14:04:30 +0000 (14:04 +0000)]
Recognize new VLAN_HWCSUM flag.

18 years agoThis driver can do hardware VLAN tagging + checksum offloading.
Gleb Smirnoff [Mon, 30 Jan 2006 13:45:55 +0000 (13:45 +0000)]
This driver can do hardware VLAN tagging + checksum offloading.

In collaboration with: Mihail Balikov <mihail.balikov interbgc.com>

18 years agoMerge the //depot/user/yar/vlan branch into CVS. It contains some collective
Gleb Smirnoff [Mon, 30 Jan 2006 13:45:15 +0000 (13:45 +0000)]
Merge the //depot/user/yar/vlan branch into CVS. It contains some collective
work by yar, thompsa and myself. The checksum offloading part also involves
work done by Mihail Balikov.

The most important changes:

o   Instead of global linked list of all vlan softc use a per-trunk
  hash. The size of hash is dynamically adjusted, depending on
  number of entries. This changes struct ifnet, replacing counter
  of vlans with a pointer to trunk structure. This change is an
  improvement for setups with big number of VLANs, several interfaces
  and several CPUs. It is a small regression for a setup with a single
  VLAN interface.
    An alternative to dynamic hash is a per-trunk static array with
  4096 entries, which is a compile time option - VLAN_ARRAY. In my
  experiments the array is not an improvement, probably because such
  a big trunk structure doesn't fit into CPU cache.
o   Introduce an UMA zone for VLAN tags. Since drivers depend on it,
  the zone is declared in kern_mbuf.c, not in optional vlan(4) driver.
  This change is a big improvement for any setup utilizing vlan(4).
o   Use rwlock(9) instead of mutex(9) for locking. We are the first
  ones to do this! :)
o   Some drivers can do hardware VLAN tagging + hardware checksum
  offloading. Add an infrastructure for this. Whenever vlan(4) is
  attached to a parent or parent configuration is changed, the flags
  on vlan(4) interface are updated.

In collaboration with: yar, thompsa
In collaboration with: Mihail Balikov <mihail.balikov interbgc.com>

18 years agoDo address assignment/removal operations after callbacks.
Yaroslav Tykhiy [Mon, 30 Jan 2006 13:37:34 +0000 (13:37 +0000)]
Do address assignment/removal operations after callbacks.

Presently, ifconfig callbacks are used for L2 configuration, media
and vlan, so actions associated with address assignment, like sending
out a gratuitous ARP, should go when L2 is running already.

This also should fix the problem with setting up vlan interfaces
from rc.conf, when both IP and vlan+vlandev parameters are passed
to ifconfig at once.

Future work: Consider introducing several ifconfig callback lists
to invoke callbacks orderly.

MFC after: 1 week

18 years agoPrepare for sconfig(8) update.
Roman Kurakin [Mon, 30 Jan 2006 13:34:57 +0000 (13:34 +0000)]
Prepare for sconfig(8) update.
Change also my e-mail.

18 years agoAdd more details about enabling a custom ruleset for /dev in `rc.conf',
Giorgos Keramidas [Mon, 30 Jan 2006 13:28:28 +0000 (13:28 +0000)]
Add more details about enabling a custom ruleset for /dev in `rc.conf',
and add ruleset labels/numbering to the custom ruleset example.

PR: docs/90362
Submitted by: Roland Smith <rsmith@xs4all.nl>
MFC after: 3 days

18 years agoMake df output in periodic mail human readable
Matteo Riondato [Mon, 30 Jan 2006 12:33:44 +0000 (12:33 +0000)]
Make df output in periodic mail human readable

PR: conf/87196
Submitted by: Mike <mspam@ideaway.net>
Approved by: philip (mentor)
MFC after: 3 days

18 years agoMove pts master devices into /dev/pty/ instead of littering /dev with them;
Robert Watson [Mon, 30 Jan 2006 11:59:19 +0000 (11:59 +0000)]
Move pts master devices into /dev/pty/ instead of littering /dev with them;
this is more consistent with the placement of slaves in /dev/pts.  The
actual name doesn't matter as it's not part of the exposed API or used by
libc.  In some sense, it would be nice if these device nodes didn't have to
have names in devfs at all.

Suggested by: Stephen McKay <smckay at internode dot on dot net>

18 years agoFix typo.
Gleb Smirnoff [Mon, 30 Jan 2006 11:43:53 +0000 (11:43 +0000)]
Fix typo.

18 years agoAvoid triggering autovivification of %config entries, which would result in
Dag-Erling Smørgrav [Mon, 30 Jan 2006 10:46:01 +0000 (10:46 +0000)]
Avoid triggering autovivification of %config entries, which would result in
an empty addenda section.

Handle kernel configs that lack a "machine" line by guessing at the location
of GENERIC (assuming that it is in the same directory as the config file)

18 years agoRemove accidental debug leftovers.
Søren Schmidt [Mon, 30 Jan 2006 10:19:38 +0000 (10:19 +0000)]
Remove accidental debug leftovers.

18 years agoAdd some initial locking to gif(4). It doesn't covers the whole driver,
Gleb Smirnoff [Mon, 30 Jan 2006 08:39:09 +0000 (08:39 +0000)]
Add some initial locking to gif(4). It doesn't covers the whole driver,
however IPv4-in-IPv4 tunnels are now stable on SMP. Details:

- Add per-softc mutex.
- Hold the mutex on output.

The main problem was the rtentry, placed in softc. It could be
freed by ip_output(). Meanwhile, another thread being in
in_gif_output() can read and write this rtentry.

Reported by: many
Tested by: Alexander Shiryaev <aixp mail.ru>

18 years agoInstead of printing several pieces with .Sy just enclose the 'Note' block
Hartmut Brandt [Mon, 30 Jan 2006 08:26:59 +0000 (08:26 +0000)]
Instead of printing several pieces with .Sy just enclose the 'Note' block
into a .Bf/.Ef pair.

Submitted by: ru

18 years ago- In pipe() return the error returned by pipe_create(), rather then
Gleb Smirnoff [Mon, 30 Jan 2006 08:25:04 +0000 (08:25 +0000)]
- In pipe() return the error returned by pipe_create(), rather then
  hardcoded ENFILES, which is incorrect. pipe_create() can fail due
  to ENOMEM.
- Update manual page, describing ENOMEM return code.

Reviewed by: arch

18 years ago - Remove a stale comment. This function was rewritten to be SMP safe some
Jeff Roberson [Mon, 30 Jan 2006 08:24:14 +0000 (08:24 +0000)]
 - Remove a stale comment.  This function was rewritten to be SMP safe some
   time ago.

Sponsored by: Isilon Systems, Inc.

18 years ago - vn_lock with LK_RETRY can not return an error. The code that handled this
Jeff Roberson [Mon, 30 Jan 2006 08:22:56 +0000 (08:22 +0000)]
 - vn_lock with LK_RETRY can not return an error.  The code that handled this
   case was not necessary.

Sponsored by: Isilon Systems, Inc.

18 years ago - Add a comment warning about an anomalous condition where we VOP_UNLOCK
Jeff Roberson [Mon, 30 Jan 2006 08:21:23 +0000 (08:21 +0000)]
 - Add a comment warning about an anomalous condition where we VOP_UNLOCK
   and then vrele rather than vput because we would like to VOP_UNLOCK with
   a specific thread.

18 years ago - Lock access to vrele() with VFS_LOCK_GIANT() rather than mtx_lock(&Giant).
Jeff Roberson [Mon, 30 Jan 2006 08:19:01 +0000 (08:19 +0000)]
 - Lock access to vrele() with VFS_LOCK_GIANT() rather than mtx_lock(&Giant).

Sponsored by: Isilon Systems, Inc.

18 years agoNote support for the A4D and A6VM models.
Christian Brueffer [Mon, 30 Jan 2006 05:29:41 +0000 (05:29 +0000)]
Note support for the A4D and A6VM models.

18 years agoAdd support for Asus A4D laptops. Currently without display switching
Philip Paeps [Sun, 29 Jan 2006 23:59:43 +0000 (23:59 +0000)]
Add support for Asus A4D laptops.  Currently without display switching
support.  Which reminds me that I'm not even sure if this works on _any_
laptop at all. :-o

PR: kern/90607
Submitted by: "Wojciech A. Koszek" <dunstan -at- freebsd.czest.pl>
MFC after: 3 days

18 years agoAdd support for Asus A6VM laptops.
Philip Paeps [Sun, 29 Jan 2006 23:54:32 +0000 (23:54 +0000)]
Add support for Asus A6VM laptops.

Submitted by: Sashi Asokarajan <mail -at- sashi.de>
MFC after: 3 days

18 years agoAllow non-P laptops to make use of this module.
Philip Paeps [Sun, 29 Jan 2006 23:52:02 +0000 (23:52 +0000)]
Allow non-P laptops to make use of this module.

Other major changes (from the author):

 o Individual method probing
 o Finally figured out what the RBLL, RVOL, GHKS, GSIF are:
   - RBLL - lcd_brightness radix
   - RVOL - volume radix
   - GHKS - Currently activated hotkey (internal)
   - GSIF - Hotkey mask (internal)

Submitted by: Anish Mistry <mistry.7 -at- osu.edu>
MFC after: 3 days

18 years agoBack out of r1.148, it causes two arp replies to be sent with different mac
Andrew Thompson [Sun, 29 Jan 2006 23:21:01 +0000 (23:21 +0000)]
Back out of r1.148, it causes two arp replies to be sent with different mac
addresses. One for the bridged interface with the IP address assigned but then
another with the mac for the bridge itself.

18 years agoAdd makefile for ce(4) module.
Roman Kurakin [Sun, 29 Jan 2006 22:10:54 +0000 (22:10 +0000)]
Add makefile for ce(4) module.

18 years agoFix module from panic.
Roman Kurakin [Sun, 29 Jan 2006 22:06:51 +0000 (22:06 +0000)]
Fix module from panic.
Pointy hat: brooks
MFC after: 3 days

18 years agoTake a stab at making this compile when WITNESS is not defined. gcc can't
Scott Long [Sun, 29 Jan 2006 20:48:25 +0000 (20:48 +0000)]
Take a stab at making this compile when WITNESS is not defined.  gcc can't
figure out the order of operations at line 519, and neither can I, but this
is my best guess.  Also correct a number of typos and syntax errors.

18 years agoFix typo.
Kirill Ponomarev [Sun, 29 Jan 2006 20:30:55 +0000 (20:30 +0000)]
Fix typo.

18 years agoFix the missing CD_VOLUME=1 in the cdrom.inf file on disc1 for the
Marcel Moolenaar [Sun, 29 Jan 2006 20:16:25 +0000 (20:16 +0000)]
Fix the missing CD_VOLUME=1 in the cdrom.inf file on disc1 for the
livecd != disc1 case (i.e. ia64). The line was appended to the
non-existing cdrom.inf file, which was created only later. Move the
line to after the file is created.

MFC after: 1 day

18 years agoFix an off-by-one error.
Maxim Konovalov [Sun, 29 Jan 2006 17:32:39 +0000 (17:32 +0000)]
Fix an off-by-one error.

Reviewed by: sam

18 years agoFix some potential NULL pointer dereferences.
Alexander Leidinger [Sun, 29 Jan 2006 16:48:41 +0000 (16:48 +0000)]
Fix some potential NULL pointer dereferences.

This is supposed to fix some Coverity Prevent errors (Ariff didn't
looked at the CID's (ENOTIME), I just told him that there are some problems
in function dsp_ioctl()).

CID: 215-218
Found with: Coverity Prevent(tm)
Submitted by: ariff
MFC after: 5 days

18 years agoAdd a couple of obviously missing xrefs to SEE ALSO:
Yaroslav Tykhiy [Sun, 29 Jan 2006 13:35:35 +0000 (13:35 +0000)]
Add a couple of obviously missing xrefs to SEE ALSO:
ftpd(8), geli(8).

18 years agoFix WEP examples.
Damien Bergamini [Sun, 29 Jan 2006 13:12:09 +0000 (13:12 +0000)]
Fix WEP examples.
Improve rate control algorithm description.
Bump copyright year.

18 years agoTouch .Dd because the last commit was content-related.
Yaroslav Tykhiy [Sun, 29 Jan 2006 13:10:38 +0000 (13:10 +0000)]
Touch .Dd because the last commit was content-related.

18 years agoFix WEP examples.
Damien Bergamini [Sun, 29 Jan 2006 13:09:45 +0000 (13:09 +0000)]
Fix WEP examples.
Bump copyright year.

18 years agoFix WEP examples.
Damien Bergamini [Sun, 29 Jan 2006 13:08:21 +0000 (13:08 +0000)]
Fix WEP examples.
Remove man page references to ipwcontrol and wicontrol.
Bump copyright year.

18 years agoAdjust tx power based on user preferences.
Damien Bergamini [Sun, 29 Jan 2006 12:47:07 +0000 (12:47 +0000)]
Adjust tx power based on user preferences.

18 years agoo Fix short preamble support
Damien Bergamini [Sun, 29 Jan 2006 12:35:26 +0000 (12:35 +0000)]
o Fix short preamble support
o Fix contention window
o Feed rx rate to radiotap
o Clean ral_setup_txdesc (sync w/ ural)
o s/ic_ibss_chan/ic_curchan/

18 years agoo Re-enable scatter/gather
Damien Bergamini [Sun, 29 Jan 2006 12:03:03 +0000 (12:03 +0000)]
o Re-enable scatter/gather
o Change MEM_READ_1/MEM_READ_4 into macros (move them to if_iwireg.h)
o Add support for association LED
o Silently discard f/w notifications that are unknown (fixes spurious
  "unknown notification 15" in logs with latest firmware)
o Fix scanning of 5GHz channels

18 years agoUse ".Pa" for path names.
Joseph Koshy [Sun, 29 Jan 2006 08:44:05 +0000 (08:44 +0000)]
Use ".Pa" for path names.

MFC after: 3 days

18 years agoThe change a few years ago of having contigmalloc start its scan at the top
Scott Long [Sun, 29 Jan 2006 08:24:54 +0000 (08:24 +0000)]
The change a few years ago of having contigmalloc start its scan at the top
of physical RAM instead of the bottom was a sound idea, but the implementation
left a lot to be desired.  Scans would spend considerable time looking at
pages that are above of the address range given by the caller, and multiple
calls (like what happens in busdma) would spend more time on top of that
rescanning the same pages over and over.

Solve this, at least for now, with two simple optimizations.  The first is
to not bother scanning high ordered pages that are outside of the provided
address range.  Second is to cache the page index from the last successful
operation so that subsequent scans don't have to restart from the top.  This
is conditional on the numpages argument being the same or greater between
calls.

MFC After: 2 weeks

18 years agoEnable the lowest Cx state by default. This will save power and we have
Nate Lawson [Sun, 29 Jan 2006 05:51:58 +0000 (05:51 +0000)]
Enable the lowest Cx state by default.  This will save power and we have
had enough testing of acpi_cpu to know this is stable now.

18 years agoSet MACHINE to i386(pc98). This fixes cross-building.
Yoshihiro Takahashi [Sun, 29 Jan 2006 03:32:19 +0000 (03:32 +0000)]
Set MACHINE to i386(pc98).  This fixes cross-building.

18 years agofirmware(9) is a subsystem to load binary data into the kernel via a
Max Laier [Sun, 29 Jan 2006 02:52:42 +0000 (02:52 +0000)]
firmware(9) is a subsystem to load binary data into the kernel via a
specially crafted module.  There are several handrolled sollutions to this
problem in the tree already which will be replaced with this.  They include
iwi(4), ipw(4), ispfw(4) and digi(4).

No objection from: arch
MFC after: 2 weeks
X-MFC after: some drivers have been converted

18 years agoUnbreak on archs where %d doesn't print uintptr_t arithmetic.
Max Laier [Sun, 29 Jan 2006 02:35:22 +0000 (02:35 +0000)]
Unbreak on archs where %d doesn't print uintptr_t arithmetic.

18 years agoTune format scoring so (non)stereo format will get better chance
Ariff Abdullah [Sun, 29 Jan 2006 01:32:37 +0000 (01:32 +0000)]
Tune format scoring so (non)stereo format will get better chance
to be selected.

18 years agoAdd a reference to geli(8).
Pawel Jakub Dawidek [Sun, 29 Jan 2006 00:32:40 +0000 (00:32 +0000)]
Add a reference to geli(8).

MFC after: 3 days

18 years agoIf the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,
Olivier Houchard [Sun, 29 Jan 2006 00:02:57 +0000 (00:02 +0000)]
If the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,
and if so, use the pts system.

Suggested by: rwatson

18 years agoRename use_old_pty variable to use_pts, as this more accurately reflects
Robert Watson [Sat, 28 Jan 2006 23:31:19 +0000 (23:31 +0000)]
Rename use_old_pty variable to use_pts, as this more accurately reflects
the sense of the variable.

Suggested by: dwhite

18 years agoDon't try to load KLDs if we're mounting the root. We'd otherwise panic.
Suleiman Souhlal [Sat, 28 Jan 2006 22:58:39 +0000 (22:58 +0000)]
Don't try to load KLDs if we're mounting the root. We'd otherwise panic.

Tested by: kris
MFC after: 3 days

18 years agoUse $FreeBSD$ for the juggle version, rather than $P4$. This is good for
Robert Watson [Sat, 28 Jan 2006 21:03:16 +0000 (21:03 +0000)]
Use $FreeBSD$ for the juggle version, rather than $P4$.  This is good for
two reasons:

(1) juggle is now maintained in CVS, not P4, so the CVS revision number is
    the authoritative one.
(2) Apparently $P4$ requires special handling and juggle was not marked
    as needing it, resulting in problems for the P4 importer.

Requested by: gordon

18 years agoManage the ucred for the NFS server using the crget/crfree API defined in
Christian S.J. Peron [Sat, 28 Jan 2006 19:24:40 +0000 (19:24 +0000)]
Manage the ucred for the NFS server using the crget/crfree API defined in
kern_prot.c. This API handles reference counting among many other things.
Notably, if MAC is compiled into the kernel, it will properly initialize the
MAC labels when the ucred is allocated.

This work is in preparation for a new MAC entry point which will be responsible
for properly initializing policy specific labels for the NFS server credential.
Utilization of the crfree/crget APIs reduce the complexity associated with
this label's management.

Submitted by: green (with changes) [1]
Obtained from: TrustedBSD Project
Discussed with: rwatson, alfred

[1] I moved the ucred allocation outside the scope of the NFS server lock to
    prevent M_WAIKOK allocations from occurring with non-sleep-able locks held.
    Additionally, to reduce complexity, the ucred persist as long as the NFS
    server descriptor.

18 years agos/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/
Marcel Moolenaar [Sat, 28 Jan 2006 17:58:22 +0000 (17:58 +0000)]
s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/

18 years agos/R_IA64_/R_IA_64_/
Marcel Moolenaar [Sat, 28 Jan 2006 17:56:16 +0000 (17:56 +0000)]
s/R_IA64_/R_IA_64_/

18 years agoAdd _rwlock.h, apparently missed from the rwlock.h commit.
Scott Long [Sat, 28 Jan 2006 17:51:20 +0000 (17:51 +0000)]
Add _rwlock.h, apparently missed from the rwlock.h commit.

18 years agoSquash another invalid use of BUS_DMA_ALLOCNOW.
Scott Long [Sat, 28 Jan 2006 15:50:19 +0000 (15:50 +0000)]
Squash another invalid use of BUS_DMA_ALLOCNOW.

MFC After: 3 days

18 years ago- Add a note that passing NULL to pidfile_write(), pidfile_remove() and
Pawel Jakub Dawidek [Sat, 28 Jan 2006 14:13:15 +0000 (14:13 +0000)]
- Add a note that passing NULL to pidfile_write(), pidfile_remove() and
  pidfile_close() functions is safe. This possibility is used in example code.
- Cast pid_t to int.

Requested by: yar

18 years ago- Add ports-net-p2p collection
Pav Lucistnik [Sat, 28 Jan 2006 11:08:47 +0000 (11:08 +0000)]
- Add ports-net-p2p collection

18 years agoNever do programs contain so few bugs as when no debugging tools
Diomidis Spinellis [Sat, 28 Jan 2006 09:19:20 +0000 (09:19 +0000)]
Never do programs contain so few bugs as when no debugging tools
are available.
                -- Niklaus Wirth

Pointed by: Panagiotis Louridas

18 years agoBack out r1.653; it turns out that the race (or at least the printf) is
Kris Kennaway [Sat, 28 Jan 2006 03:06:35 +0000 (03:06 +0000)]
Back out r1.653; it turns out that the race (or at least the printf) is
actually not hard to trigger, and it can cause a lot of console spam.

Approved by: kan

18 years ago- Mention that users need to be in the wheel group to `su - root' by default, and...
Brad Davis [Sat, 28 Jan 2006 01:11:11 +0000 (01:11 +0000)]
- Mention that users need to be in the wheel group to `su - root' by default, and how to change it.

PR: docs/70616
Submitted by: Jilles Tjoelker <jilles at stack dot nl>
Reviewed by: ru@
Approved by: ceri@
MFC after: 3 days

18 years agolock unused when INVARIANTS not defined, so don't declare it then
Warner Losh [Sat, 28 Jan 2006 00:49:31 +0000 (00:49 +0000)]
lock unused when INVARIANTS not defined, so don't declare it then

18 years agoAdd a basic reader/writer lock implementation to the kernel. This
John Baldwin [Fri, 27 Jan 2006 23:13:26 +0000 (23:13 +0000)]
Add a basic reader/writer lock implementation to the kernel.  This
implementation is by no means perfect as far as some of the algorithms
that it uses and the fact that it is missing some functionality (try
locks and upgrades/downgrades are not there yet), however it does seem
to work in my local testing.  There is more detail in the comments in the
code, but the short version follows.

A reader/writer lock is very much like a regular mutex: it cannot be held
across a voluntary sleep; it can be acquired in an interrupt thread; if
the lock is held by a writer then the priority of any threads that block
on the lock will be lent to the owner; the simple case lock operations all
are done in a single atomic op.  It also shares some similiarities
with sx locks: it supports reader/writer semantics (multiple readers,
but single writers); readers are allowed to recurse, but writers are not.

We can extend this implementation further by either improving algorithms
or adding new functionality, but this should at least give us a base to
work with now.

Reviewed by: arch (in theory)
Tested on: i386 (4 cpu box with a kernel module that used 4 threads
that randomly chose between read locks and write locks
that ran w/o panicing for over a day solid.  It usually
panic'd within a few seconds when there were bugs during
testing. :)  The kernel module source is available on
request.)

18 years agoWhitespace.
John Baldwin [Fri, 27 Jan 2006 23:06:08 +0000 (23:06 +0000)]
Whitespace.

18 years agoOops, commit missed file from the previous change to enable multiple
John Baldwin [Fri, 27 Jan 2006 23:04:43 +0000 (23:04 +0000)]
Oops, commit missed file from the previous change to enable multiple
queues in turnstiles.  Add a new thread member td_tsqueue which contains
the sub-queue of a turnstile that a thread is on when it is blocked on a
turnstile.

18 years ago- Add support for having both a shared and exclusive queue of threads in
John Baldwin [Fri, 27 Jan 2006 22:42:12 +0000 (22:42 +0000)]
- Add support for having both a shared and exclusive queue of threads in
  each turnstile.  Also, allow for the owner thread pointer of a turnstile
  to be NULL.  This is needed for the upcoming reader/writer lock
  implementation.
- Add a new ddb command 'show turnstile' that will look up the turnstile
  associated with the given lock argument and display useful information
  like the list of threads blocked on each queue, etc.  If there isn't an
  active turnstile for a lock at the specified address, then the function
  will see if there is an active turnstile at the specified address and
  display info about it if so.
- Adjust the mutex code to handle the turnstile API changes.

Tested on: i386 (all), alpha, amd64, sparc64 (1 and 3)

18 years agoAdd a new ddb command 'show sleepq'. It takes a wait channel as an
John Baldwin [Fri, 27 Jan 2006 22:24:07 +0000 (22:24 +0000)]
Add a new ddb command 'show sleepq'.  It takes a wait channel as an
argument and looks for a sleep queue associated with that wait channel.
If it finds one it will display information such as the list of threads
sleeping on that queue.  If it can't find a sleep queue for that wait
channel, then it will see if that address matches any of the active
sleep queues.  If so, it will display information about the sleepq at the
specified address.

18 years agoCall WITNESS_CHECK() in the page fault handler and immediately assume it
John Baldwin [Fri, 27 Jan 2006 22:22:10 +0000 (22:22 +0000)]
Call WITNESS_CHECK() in the page fault handler and immediately assume it
is a fatal fault if we are holding any non-sleepable locks.  This should
cut down on the number of bogus LORs we currently get when the kernel
panics due to a NULL (or bogus) pointer dereference that goes wandering
off into the VM system which tries to acquire locks and then kicks off
the spurious LORs.  This should probably be ported to all the archs at
some point.

Tested on: i386

18 years agoAdd a new macro wrapper WITNESS_CHECK() around the witness_warn() function.
John Baldwin [Fri, 27 Jan 2006 22:20:15 +0000 (22:20 +0000)]
Add a new macro wrapper WITNESS_CHECK() around the witness_warn() function.
The difference between WITNESS_CHECK() and WITNESS_WARN() is that
WITNESS_CHECK() should be used in the places that the return value of
witness_warn() is checked, whereas WITNESS_WARN() should be used in places
where the return value is ignored.  Specifically, in a kernel without
WITNESS enabled, WITNESS_WARN() evaluates to an empty string where as
WITNESS_CHECK evaluates to 0.  I also updated the one place that was
checking the return value of WITNESS_WARN() to use WITNESS_CHECK.

18 years agoAdd a new sysctl, debug.ktr.clear. If you write a non-zero value to this
John Baldwin [Fri, 27 Jan 2006 22:17:31 +0000 (22:17 +0000)]
Add a new sysctl, debug.ktr.clear.  If you write a non-zero value to this
sysctl then it will clear the KTR buffer.  Note that if you have active
KTR traces at the same time as a clear operation the behavior is undefined,
though it shouldn't panic.

18 years ago- Hide 'incorrect geometry warning' in non-interactive mode. A user should
Jung-uk Kim [Fri, 27 Jan 2006 21:41:49 +0000 (21:41 +0000)]
- Hide 'incorrect geometry warning' in non-interactive mode.  A user should
know what they are doing in non-interactive mode.  Less scarier warning
goes to debugging info instead.
- Print sanitized geometry to debugging info.

18 years agoMake sure b_vp and b_bufobj are NULL before calling relpbuf(), as it asserts
Olivier Houchard [Fri, 27 Jan 2006 21:11:50 +0000 (21:11 +0000)]
Make sure b_vp and b_bufobj are NULL before calling relpbuf(), as it asserts
they are. They should be NULL at this point, except if we're coming from
swapdev_strategy().
It should only affect the case where we're swapping directly on a file over
NFS.

18 years agoTry harder not to recurse.
Olivier Houchard [Fri, 27 Jan 2006 21:07:04 +0000 (21:07 +0000)]
Try harder not to recurse.

18 years agoStyle: Add blank line after local variable declarations.
Alan Cox [Fri, 27 Jan 2006 21:06:37 +0000 (21:06 +0000)]
Style: Add blank line after local variable declarations.

18 years agoAdd some wisdom from Garrett Wollman concerning error codes returned by
Colin Percival [Fri, 27 Jan 2006 21:06:19 +0000 (21:06 +0000)]
Add some wisdom from Garrett Wollman concerning error codes returned by
system calls.

18 years agoAdd `mediaOpen' function. This function mounts selected media device.
Jung-uk Kim [Fri, 27 Jan 2006 21:00:31 +0000 (21:00 +0000)]
Add `mediaOpen' function.  This function mounts selected media device.

For example, you can dynamically generate and load configuration file
depending on the hardware configuration with the following template:

mediaSetCDROM
mediaOpen
command='/dist/rescue/sh /dist/scripts/install.sh'
system
mediaClose
configFile=/tmp/generated.cfg
loadConfig

Now we have full access to files on the media before installation begins.

18 years agoHave a function pointer to the routine to call for writing an mbuf
Warner Losh [Fri, 27 Jan 2006 19:10:13 +0000 (19:10 +0000)]
Have a function pointer to the routine to call for writing an mbuf
into the card's memory.

# this eliminates a more of the ifdef soup in if_ed and if_edvar

# I've fixed the cbus drivers, but can't test them all easily.

If I've broken anything, please let me know.

18 years agoDocument the user/group LOR in our sample pf.conf
Max Laier [Fri, 27 Jan 2006 17:16:20 +0000 (17:16 +0000)]
Document the user/group LOR in our sample pf.conf

Submitted by: Devon H. O'Dell

18 years agoThe .Nm macro prints Open_Disk() instead of libdisk, so use an explicite
Hartmut Brandt [Fri, 27 Jan 2006 16:38:05 +0000 (16:38 +0000)]
The .Nm macro prints Open_Disk() instead of libdisk, so use an explicite
argument to get 'libdisk'. Also bump the date of the man page.

18 years agoForced commit because the log message in the previous commit was wrong.
Hartmut Brandt [Fri, 27 Jan 2006 16:35:45 +0000 (16:35 +0000)]
Forced commit because the log message in the previous commit was wrong.
Warn people that this library should not be used for anything new.

18 years agoRevert 1.45 now that snmp_hostres uses libgeom.
Hartmut Brandt [Fri, 27 Jan 2006 16:32:13 +0000 (16:32 +0000)]
Revert 1.45 now that snmp_hostres uses libgeom.