]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoForgot to commit ata-card fixes last night. Fix gleb's attempt to do
imp [Thu, 22 Sep 2005 18:46:29 +0000 (18:46 +0000)]
Forgot to commit ata-card fixes last night.  Fix gleb's attempt to do
the right thing by merging in the changes I neglected to commit last
night.

18 years agoFix build.
glebius [Thu, 22 Sep 2005 18:41:56 +0000 (18:41 +0000)]
Fix build.

18 years agoBump up BUFSIZE from 4k to 8k. This was requested by portmgr@ to allow
mp [Thu, 22 Sep 2005 18:32:53 +0000 (18:32 +0000)]
Bump up BUFSIZE from 4k to 8k. This was requested by portmgr@ to allow
ports builds in the cluster to work correctly.

Tested by: kris

18 years agoNote Hawking PN652TX support
imp [Thu, 22 Sep 2005 16:56:48 +0000 (16:56 +0000)]
Note Hawking PN652TX support

18 years agoClarify supported cards
imp [Thu, 22 Sep 2005 16:56:28 +0000 (16:56 +0000)]
Clarify supported cards

18 years agoFix the "fpudna: fpcurthread == curthread XXX times" problem.
ups [Thu, 22 Sep 2005 15:46:21 +0000 (15:46 +0000)]
Fix the "fpudna: fpcurthread == curthread XXX times" problem.

Tested by: kris@
Reviewed by: peter@
MFC after: 3 days

18 years agoDon't pretend to be thread0 when calling sync().
ups [Thu, 22 Sep 2005 15:34:15 +0000 (15:34 +0000)]
Don't pretend to be thread0 when calling sync().
It confuses the lock manager since in some places thread0 is
then used for vnode locking while curthread is used for vnode unlocking.

Found by: Yahoo!
Reviewed by: ps@,jhb@
MFC after: 3 days

18 years agoCause all flags passed by boot2 to set the respective loader(8)
ru [Thu, 22 Sep 2005 15:14:13 +0000 (15:14 +0000)]
Cause all flags passed by boot2 to set the respective loader(8)
boot_* variable.  The end effect is that all flags from boot2
are now passed to the kernel.

18 years agoAdd loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
ru [Thu, 22 Sep 2005 15:06:58 +0000 (15:06 +0000)]
Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.

18 years agoRemove compat layer for OLDCARD compatibility. All instances of it
imp [Thu, 22 Sep 2005 14:51:11 +0000 (14:51 +0000)]
Remove compat layer for OLDCARD compatibility.  All instances of it
are now gone from the tree.

18 years agoSince special interface types get their own subsections
yar [Thu, 22 Sep 2005 11:49:52 +0000 (11:49 +0000)]
Since special interface types get their own subsections
(not in mdoc(7) sense yet) in ifconfig(8) manpage, create such
subsections for gif(4) and vlan(4) so that their specific
options are not mixed up with general options.

18 years ago- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000
ru [Thu, 22 Sep 2005 11:20:33 +0000 (11:20 +0000)]
- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000
  to 0x100000 in rev. 1.67.

- NOPT wasn't updated (decremented) in previous revision.

18 years agoFix a typo
brian [Thu, 22 Sep 2005 11:18:30 +0000 (11:18 +0000)]
Fix a typo

Obtained from: OpenBSD

18 years agoAdd fi_sx, an sx lock to serialize I/O operations on the socket pair
rwatson [Thu, 22 Sep 2005 10:51:12 +0000 (10:51 +0000)]
Add fi_sx, an sx lock to serialize I/O operations on the socket pair
underlying the POSIX fifo implementation.  In 6.x/7.x, fifo access is
moved from the VFS layer, where it was serialized using the vnode
lock, to the file descriptor layer, where access is protected by a
reference count but not serialized.  This exposed socket buffer
locking to high levels of parallelism in specific fifo workloads, such
as make -j 32, which expose as yet unresolved socket buffer bugs.

fi_sx re-adds serialization about the read and write routines,
although not paths that simply test socket buffer mbuf queue state,
such as the poll and kqueue methods.  This restores the extra locking
cost previously present in some cases, but is an effective workaround
for the instability that has been experienced.  This workaround should
be removed once the bug in socket buffer handling has been fixed.

Reported by: kris, jhb, Julien Gabel <jpeg at thilelli dot net>,
Peter Holm <peter at holm dot cc>, others
MFC after: 3 days

18 years agoAdd HTTP proxy authentication, via the HTTP_PROXY_AUTH environment
cperciva [Thu, 22 Sep 2005 07:11:27 +0000 (07:11 +0000)]
Add HTTP proxy authentication, via the HTTP_PROXY_AUTH environment
variable.

Tested by: Emil Mikulic
X-MFC-After: 6.0-RELEASE

18 years ago'PC Card' instead of other variants
imp [Thu, 22 Sep 2005 06:01:44 +0000 (06:01 +0000)]
'PC Card' instead of other variants

18 years agoEliminate dead code
imp [Thu, 22 Sep 2005 05:56:32 +0000 (05:56 +0000)]
Eliminate dead code

18 years agoPC Card instead of other variants
imp [Thu, 22 Sep 2005 05:52:54 +0000 (05:52 +0000)]
PC Card instead of other variants

18 years agoFinish last commit: actually remove compat methods from bt3c_pccard_methods
imp [Thu, 22 Sep 2005 05:51:07 +0000 (05:51 +0000)]
Finish last commit: actually remove compat methods from bt3c_pccard_methods

18 years agoRemove broken OLDCARD compat shims.
imp [Thu, 22 Sep 2005 05:47:04 +0000 (05:47 +0000)]
Remove broken OLDCARD compat shims.
"PC Card" is the correct spelling.  "PC-Card" isn't, per the PCMCIA
standard.

18 years agoDo not use passphraseless keys for authentication unless the nullok
des [Thu, 22 Sep 2005 05:35:24 +0000 (05:35 +0000)]
Do not use passphraseless keys for authentication unless the nullok
option was specified.

PR: bin/81231
Submitted by: "Daniel O'Connor" <doconnor@gsoft.com.au>
MFC after: 3 days

18 years agoMFp4: save mac addr hint, eliminage OLDCARD shims
imp [Thu, 22 Sep 2005 05:11:50 +0000 (05:11 +0000)]
MFp4: save mac addr hint, eliminage OLDCARD shims

18 years agoUse the AHC_DISABLE_PCI_PERR flag to silence parity error reporting on
gibbs [Thu, 22 Sep 2005 05:11:35 +0000 (05:11 +0000)]
Use the AHC_DISABLE_PCI_PERR flag to silence parity error reporting on
chips where setting the FAILDIS bit is not effective.  While here,
try again to make it clear that reported parity errors indicate
a failure of some PCI device *other than* the aic7xxx controller.

18 years agoRemove OLDCARD shims
imp [Thu, 22 Sep 2005 05:06:37 +0000 (05:06 +0000)]
Remove OLDCARD shims

18 years agoEnhance diagnostic printfs for the chains of free lists used to
gibbs [Thu, 22 Sep 2005 05:06:03 +0000 (05:06 +0000)]
Enhance diagnostic printfs for the chains of free lists used to
avoid SCB ID collissions to non-packetized targets.

18 years agoCorrect bug that caused the completed "recovery" scb to have its
gibbs [Thu, 22 Sep 2005 05:01:37 +0000 (05:01 +0000)]
Correct bug that caused the completed "recovery" scb to have its
timer reset rather than the timer of an SCB still pending on the
controller after recovery completed.  This should correct timeout
loops seen in the field.

18 years agoSet allow_memio to 1 if fetching the allow_memio hint fails. This
gibbs [Thu, 22 Sep 2005 04:56:59 +0000 (04:56 +0000)]
Set allow_memio to 1 if fetching the allow_memio hint fails.  This
is the default behavior according the the bootverbose printf in the
failure case.

18 years agoMFp4: Remove OLDCARD shims
imp [Thu, 22 Sep 2005 04:51:11 +0000 (04:51 +0000)]
MFp4: Remove OLDCARD shims

18 years agoMFp4: trivial KNF nits
imp [Thu, 22 Sep 2005 04:49:17 +0000 (04:49 +0000)]
MFp4: trivial KNF nits

18 years agoMFp4: KNF (mostly remove K&R function definitions). Fix some spaces left
imp [Thu, 22 Sep 2005 04:46:56 +0000 (04:46 +0000)]
MFp4: KNF (mostly remove K&R function definitions).  Fix some spaces left
over from de__Ping.

# Didn't fix the -Exxxx return statements that appaer to be linuxisms
# (and wrong) since I don't have hardware to test with.

18 years agoRemove the OPTIONS section, since it only documents FE_DEBUG and wrongly
keramida [Thu, 22 Sep 2005 01:50:00 +0000 (01:50 +0000)]
Remove the OPTIONS section, since it only documents FE_DEBUG and wrongly
so.  If the full list of fe(4) options is documented we can revive the
entire section.

PR: docs/86228
Submitted by: n-kogane@syd.odn.ne.jp
Helped by: Masahiro Sekiguchi <seki@jp.fujitsu.com>
MFC after: 1 week

18 years agoFix an alignment panic my preserving the 2byte padding (ETHER_ALIGN) on our
thompsa [Thu, 22 Sep 2005 01:46:11 +0000 (01:46 +0000)]
Fix an alignment panic my preserving the 2byte padding (ETHER_ALIGN) on our
copied mbuf, which keeps the IP header 32-bit aligned. This copied mbuf is
reinjected back into ether_input and off to the IP routines.

Reported and tested by: Peter van Dijk
Approved by: mlaier (mentor)
MFC after: 3 days

18 years agoThis is a forced commit. The previous change, revision 1.158 was intend to
davidxu [Thu, 22 Sep 2005 01:25:31 +0000 (01:25 +0000)]
This is a forced commit. The previous change, revision 1.158 was intend to
fix the PR kern/86067.

18 years agoTemporarily disable nice threshold detection code, as it can starve
davidxu [Thu, 22 Sep 2005 01:19:37 +0000 (01:19 +0000)]
Temporarily disable nice threshold detection code, as it can starve
a thread holding critical resource, e.g mutex or other implicit
synchronous flags. Give thread which exceeds nice threshold a minimum
time slice.

PR: kern/86087

18 years agoBetter descriptions for the Jack of Diamonds cards.
imp [Wed, 21 Sep 2005 23:57:26 +0000 (23:57 +0000)]
Better descriptions for the Jack of Diamonds cards.

18 years agoRemove OLDCARD shims
imp [Wed, 21 Sep 2005 22:45:14 +0000 (22:45 +0000)]
Remove OLDCARD shims

18 years agoDon't confuse the tuple code and the tuple length. Ooops. Since most
imp [Wed, 21 Sep 2005 20:08:24 +0000 (20:08 +0000)]
Don't confuse the tuple code and the tuple length.  Ooops.  Since most
CIS are tiny, this likely hasn't bit anybody yet...

18 years agoUse correct VFS locking rather than unconditionally grabbing Giant around
jhb [Wed, 21 Sep 2005 19:49:42 +0000 (19:49 +0000)]
Use correct VFS locking rather than unconditionally grabbing Giant around
namei() calls in kern_alternate_path().

Reviewed by: csjp
MFC after: 1 week

18 years agoSplit power state control into two variables. hw.pci.do_powerstate
imp [Wed, 21 Sep 2005 19:47:00 +0000 (19:47 +0000)]
Split power state control into two variables.  hw.pci.do_powerstate
has been removed.  It has been replaced by hw.pci.do_power_nodriver
and hw.pci.do_power_resume.  The former defaults to 0 while the latter
defaults to 1.

When do_powerstate was set to 0, it broke suspend/resume for a lot of
people as an unintended consequence.  This change will only affect the
areas that were intended to affect.  This change will have no effect on
servers, but will help laptops quite a bit.

MFC After: 3 days.

18 years agoAdd COMPAT_FREEBSD5 option. This should have been done back when I
kensmith [Wed, 21 Sep 2005 19:27:08 +0000 (19:27 +0000)]
Add COMPAT_FREEBSD5 option.  This should have been done back when I
added it to GENERIC...

Pointed out by: jhb
Pointy hat: kensmith

18 years agoRemove a fortune that is duplicated verbatim in fortunes2-o
dougb [Wed, 21 Sep 2005 19:04:10 +0000 (19:04 +0000)]
Remove a fortune that is duplicated verbatim in fortunes2-o

18 years agoStyle fix: "if (pointer)" -> "if (pointer != NULL)"
cperciva [Wed, 21 Sep 2005 18:42:56 +0000 (18:42 +0000)]
Style fix: "if (pointer)" -> "if (pointer != NULL)"

18 years agoNarrow the use of user credentials.
des [Wed, 21 Sep 2005 16:08:40 +0000 (16:08 +0000)]
Narrow the use of user credentials.
Fix one case where openpam_restore_cred() might be called twice in a row.

MFC after: 3 days

18 years agoPass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing
rwatson [Wed, 21 Sep 2005 15:28:07 +0000 (15:28 +0000)]
Pass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing
NULL.  The NFS client expects that a thread will always be present for a
VOP so that it can check for signal conditions, and will dereference a
NULL pointer if one isn't present.

MFC after: 3 days

18 years agoMake sure we have a bufobj before calling bstrategy().
cognet [Wed, 21 Sep 2005 15:01:09 +0000 (15:01 +0000)]
Make sure we have a bufobj before calling bstrategy().
I'm not sure this is the right thing to do, but at least I don't panic
anymore when swapping on a NFS file without using md(4).

X-MFC after:      proper review

18 years agoClose the tty file descriptor once we're done with it.
cognet [Wed, 21 Sep 2005 14:30:14 +0000 (14:30 +0000)]
Close the tty file descriptor once we're done with it.
Use O_NONBLOCK when opening the tty device.

Suggested by:   bde
Submitted by:   ru

18 years agoFix typo. MAILWRAPER -> MAILWRAPPER.
philip [Wed, 21 Sep 2005 12:32:06 +0000 (12:32 +0000)]
Fix typo.  MAILWRAPER -> MAILWRAPPER.

Spotted by: Andrea Campi <andrea+freebsd_cvs_all -at- webcom.it>
Pointy hat to: philip

18 years ago- Understand EADDRINUSE, and forget EDQUOT. [1]
glebius [Wed, 21 Sep 2005 12:24:46 +0000 (12:24 +0000)]
- Understand EADDRINUSE, and forget EDQUOT. [1]
- Add description for EEXIST.
- Change description for ENOBUFS. Routing socket can return
  this error for many different reasons, including general
  memory shortage, mbuf memory shortage and rtentry zone.

PR: kern/64090 [1]

18 years agoSeveral fixes to rt_setgate(), that fix problems with route changing:
glebius [Wed, 21 Sep 2005 11:58:10 +0000 (11:58 +0000)]
Several fixes to rt_setgate(), that fix problems with route changing:

- Rearrange code so that in a case of failure the affected
  route is not changed. Otherwise, a bogus rtentry will be
  left and later rt_check() can recurse on its lock. [1]
- Remove comment about protocol cloning.
- Fix two places where rtentry mutex was recursed on, because
  accessed via two different pointers, that were actually pointing
  to the same rtentry in some cases. [1]
- Return EADDRINUSE instead of bogus EDQUOT, in case when gateway
  uses the same route. [2]

Reported & tested by: ps, Andrej Zverev <az inec.ru> [1]
PR: kern/64090 [2]

18 years agoAdd discussion of Giant, the MPSAFE flag, and NDHASGIANT() to namei(9).
rwatson [Wed, 21 Sep 2005 10:19:57 +0000 (10:19 +0000)]
Add discussion of Giant, the MPSAFE flag, and NDHASGIANT() to namei(9).

Add a VFS_LOCK_GIANT(9)/VFS_UNLOCK_GIANT(9) man page.

Discussed with: jeff
MFC after: 3 days

18 years agoUpdate these scripts to be more userfriendly and usage safe.
phk [Wed, 21 Sep 2005 09:40:45 +0000 (09:40 +0000)]
Update these scripts to be more userfriendly and usage safe.

18 years agoInitialize uninitialized variables.
grog [Wed, 21 Sep 2005 05:33:46 +0000 (05:33 +0000)]
Initialize uninitialized variables.

PR: 71653
Submitted by: Dan Lukes <dan@obluda.cz>

18 years agoRemove one possible way of shooting yourself in the foot.
grog [Wed, 21 Sep 2005 05:20:03 +0000 (05:20 +0000)]
Remove one possible way of shooting yourself in the foot.

Submitted by:  Ulrich Sperlein <q@galgenberg.net>

18 years agoIn archive_read_open(), do not set the internal archive state to
kientzle [Wed, 21 Sep 2005 04:48:52 +0000 (04:48 +0000)]
In archive_read_open(), do not set the internal archive state to
"HEADER" unless the open is successful.  Instead, leave the state as
"NEW."  In particular, if archive_read_open() fails, a subsequent call
to archive_read_next_header() will now cause an explicit assertion
failure instead of a silent segmentation fault.

This may need a little more work to fully realize the intention: If
archive_read_open() fails, you should be able to call it again on the
same archive handle to open a different archive (or the same archive
using a different mechanism).

18 years agoFix an unaligned I/O memory access in the event that a SCB times out.
marcel [Wed, 21 Sep 2005 04:36:40 +0000 (04:36 +0000)]
Fix an unaligned I/O memory access in the event that a SCB times out.
The FXP_SCR_FLOWCONTROL registers is at offset 0x19, but 2 bytes wide.
It cannot be read as a word without causing a panic on architectures
that enforce strict alignment.

MFC after: 3 days

18 years agoAdd a lot of error checks, based on the patches provided by Dan Lukes.
kientzle [Wed, 21 Sep 2005 04:25:06 +0000 (04:25 +0000)]
Add a lot of error checks, based on the patches provided by Dan Lukes.
Also fixes a memory leak reported by Andrew Turner.

PR: bin/83476
Thanks to: Dan Lukes, Andrew Turner

18 years agoStyle fix: Correct a compiler warning from GCC 4
kientzle [Wed, 21 Sep 2005 03:21:35 +0000 (03:21 +0000)]
Style fix:  Correct a compiler warning from GCC 4

Thanks to: Divacky Roman
PR: bin/84993

18 years agoUse the correct minor number for the pccardX.cis device.
imp [Tue, 20 Sep 2005 23:48:06 +0000 (23:48 +0000)]
Use the correct minor number for the pccardX.cis device.
Don't destroy a NULL device.

This should fix the panics on boot people are seeing on systems with
more than one pccard slot.

18 years agoRemove unused (but initialized) variable 'objsize' from vm_mmap()
peter [Tue, 20 Sep 2005 22:08:27 +0000 (22:08 +0000)]
Remove unused (but initialized) variable 'objsize' from vm_mmap()

18 years agoRemove OLDCARD support by removing compat shims
imp [Tue, 20 Sep 2005 19:54:11 +0000 (19:54 +0000)]
Remove OLDCARD support by removing compat shims

18 years agoBetter use of gone.
imp [Tue, 20 Sep 2005 19:50:27 +0000 (19:50 +0000)]
Better use of gone.

18 years agoRemove oldcard support by removing the compat shims.
imp [Tue, 20 Sep 2005 19:49:33 +0000 (19:49 +0000)]
Remove oldcard support by removing the compat shims.

18 years agoRemove support for oldcard by removing compat shims.
imp [Tue, 20 Sep 2005 19:46:54 +0000 (19:46 +0000)]
Remove support for oldcard by removing compat shims.

18 years agoEliminate support for oldcard by removing the compat shims.
imp [Tue, 20 Sep 2005 19:45:08 +0000 (19:45 +0000)]
Eliminate support for oldcard by removing the compat shims.

18 years agoremove some dead code
imp [Tue, 20 Sep 2005 19:34:10 +0000 (19:34 +0000)]
remove some dead code

18 years agoCorrect the documentation for archive_read_data_into_buffer()
kientzle [Tue, 20 Sep 2005 17:48:57 +0000 (17:48 +0000)]
Correct the documentation for archive_read_data_into_buffer()

Thanks to: Marcus Alves Grando
PR: docs/85854
MFC after: 7 days

18 years agoRemove queue check from last commit. In most cases there is smth in queue,
glebius [Tue, 20 Sep 2005 14:52:57 +0000 (14:52 +0000)]
Remove queue check from last commit. In most cases there is smth in queue,
when start function is called.

Reviewed by: ru

18 years agoCheck IFF_DRV_RUNNING and presense of packets in queue before calling
glebius [Tue, 20 Sep 2005 13:37:17 +0000 (13:37 +0000)]
Check IFF_DRV_RUNNING and presense of packets in queue before calling
em_start_locked(). This fixes panic on shutdown with active traffic
passing through router.

Sponsored by: Rambler

18 years agoAdd geom_bsd_enc.c which we've been wanting to be in geon_bsd.
imura [Tue, 20 Sep 2005 11:16:05 +0000 (11:16 +0000)]
Add geom_bsd_enc.c which we've been wanting to be in geon_bsd.

Reviewed by: phk

18 years agoAdd a new rc.conf entry, kerberos5_server_flags, which allows the
rwatson [Tue, 20 Sep 2005 11:13:28 +0000 (11:13 +0000)]
Add a new rc.conf entry, kerberos5_server_flags, which allows the
administrator to specify additional start-up flags to the Kerberos
5 Authentication Server.

MFC after: 3 days

18 years agoFix build.
glebius [Tue, 20 Sep 2005 10:25:51 +0000 (10:25 +0000)]
Fix build.

18 years agoCorrect an incorrect comment from the dawn of time: neither tprintf()
rwatson [Tue, 20 Sep 2005 09:55:36 +0000 (09:55 +0000)]
Correct an incorrect comment from the dawn of time: neither tprintf()
nor uprintf() is believed to perform tsleep() or msleep() as written,
as ttycheckoutq() is called with '0' as its sleep argument.

Remove recently added WITNESS warnings for sleep as the comment was
incorrect.  This should silence a warning from the nfs_timer() code.

Discussed with: bde

18 years agoMove code macros from if_sis*reg*.h to if_sis.*c*
phk [Tue, 20 Sep 2005 09:52:53 +0000 (09:52 +0000)]
Move code macros from if_sis*reg*.h to if_sis.*c*

18 years agoAdd a convenience function to set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS
phk [Tue, 20 Sep 2005 09:07:18 +0000 (09:07 +0000)]
Add a convenience function to set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS
for commonly used flash devices by

FlashDevice Sandisk 256MB

in the config file.

18 years agoCreate an /etc/nanobsd.conf in the built image and put the disk drive name
phk [Tue, 20 Sep 2005 08:38:59 +0000 (08:38 +0000)]
Create an /etc/nanobsd.conf in the built image and put the disk drive name
there for scripts to use.

Create a noauto fstab entry for the configuration partition (/cfg).

Add NANO_TOOLS env-var to point to the nanobsd sources relative to
NANO_SRC.

Add -h argument which prints a usage.

Add -b argument which skips build steps and goes directly to install steps.

Complain about extraneous arguments, it's usually a forgotten '-c'

Add convenience function to register customization function.

Add some sample customization functions:
cust_comconsole
cust_allow_ssh_root

Rename setup_diskless() to setup_nanobsd(), it makes more sense.

Add various comments etc.

18 years agoMention the default location of alternative super block on a
delphij [Tue, 20 Sep 2005 08:02:38 +0000 (08:02 +0000)]
Mention the default location of alternative super block on a
UFS2 file system, in fsck_ffs(8).

Submitted by: KOMATSU Shinichiro <koma2 at lovepeers ! org>
PR: docs/86362
MFC After: 3 days

18 years agoAdd pccard_device.c
imp [Tue, 20 Sep 2005 06:48:55 +0000 (06:48 +0000)]
Add pccard_device.c

18 years agoImplement /dev/pccardN.cis. This mirrors the CIS for the card to userland.
imp [Tue, 20 Sep 2005 06:47:33 +0000 (06:47 +0000)]
Implement /dev/pccardN.cis.  This mirrors the CIS for the card to userland.

pccardc dumpcis /dev/pccardN.cis will work now, but I may rewrite pccardc.

Also, move more of the private data to a new file called pccardvarp.h.

18 years agoCall the passed function on cis scanning for all nodes in the CIS
imp [Tue, 20 Sep 2005 06:45:38 +0000 (06:45 +0000)]
Call the passed function on cis scanning for all nodes in the CIS
chains, not just the 'real' ones.

18 years agoSprinkle a few stars where they belong.
imp [Tue, 20 Sep 2005 02:38:43 +0000 (02:38 +0000)]
Sprinkle a few stars where they belong.

18 years agoProtect includes for kernel specific use from userland.
ticso [Mon, 19 Sep 2005 23:33:00 +0000 (23:33 +0000)]
Protect includes for kernel specific use from userland.

18 years agoUse monotonic 'time_uptime' instead of 'time_second' as timebase
andre [Mon, 19 Sep 2005 22:54:55 +0000 (22:54 +0000)]
Use monotonic 'time_uptime' instead of 'time_second' as timebase
for rt->rt_rmx.rmx_expire.

18 years agoUse monotonic 'time_uptime' instead of 'time_second' as timebase
andre [Mon, 19 Sep 2005 22:31:45 +0000 (22:31 +0000)]
Use monotonic 'time_uptime' instead of 'time_second' as timebase
for timeouts.

18 years agoUse monotonic time_uptime instead of 'time_second' as timebase
andre [Mon, 19 Sep 2005 22:27:07 +0000 (22:27 +0000)]
Use monotonic time_uptime instead of 'time_second' as timebase
for timeouts.

18 years agoStart time_uptime with 1 instead of 0.
andre [Mon, 19 Sep 2005 22:16:31 +0000 (22:16 +0000)]
Start time_uptime with 1 instead of 0.

Discussed with: phk

18 years agoReplace m_extadd() with macro version MEXTADD().
andre [Mon, 19 Sep 2005 22:04:41 +0000 (22:04 +0000)]
Replace m_extadd() with macro version MEXTADD().

18 years agoReplace custom mbuf writeability test with generic
andre [Mon, 19 Sep 2005 21:59:49 +0000 (21:59 +0000)]
Replace custom mbuf writeability test with generic
M_WRITEABLE() test covering all edge cases too.

18 years agoDump the environment for reference.
phk [Mon, 19 Sep 2005 20:55:44 +0000 (20:55 +0000)]
Dump the environment for reference.
Add a function to add customization commands.

18 years agoRewamp DEVFS internals pretty severely [1].
phk [Mon, 19 Sep 2005 19:56:48 +0000 (19:56 +0000)]
Rewamp DEVFS internals pretty severely [1].

Give DEVFS a proper inode called struct cdev_priv.  It is important
to keep in mind that this "inode" is shared between all DEVFS
mountpoints, therefore it is protected by the global device mutex.

Link the cdev_priv's into a list, protected by the global device
mutex.  Keep track of each cdev_priv's state with a flag bit and
of references from mountpoints with a dedicated usecount.

Reap the benefits of much improved kernel memory allocator and the
generally better defined device driver APIs to get rid of the tables
of pointers + serial numbers, their overflow tables,  the atomics
to muck about in them and all the trouble that resulted in.

This makes RAM the only limit on how many devices we can have.

The cdev_priv is actually a super struct containing the normal cdev
as the "public" part, and therefore allocation and freeing has moved
to devfs_devs.c from kern_conf.c.

The overall responsibility is (to be) split such that kern/kern_conf.c
is the stuff that deals with drivers and struct cdev and fs/devfs
handles filesystems and struct cdev_priv and their private liason
exposed only in devfs_int.h.

Move the inode number from cdev to cdev_priv and allocate inode
numbers properly with unr.  Local dirents in the mountpoints
(directories, symlinks) allocate inodes from the same pool to
guarantee against overlaps.

Various other fields are going to migrate from cdev to cdev_priv
in the future in order to hide them.  A few fields may migrate
from devfs_dirent to cdev_priv as well.

Protect the DEVFS mountpoint with an sx lock instead of lockmgr,
this lock also protects the directory tree of the mountpoint.

Give each mountpoint a unique integer index, allocated with unr.
Use it into an array of devfs_dirent pointers in each cdev_priv.
Initially the array points to a single element also inside cdev_priv,
but as more devfs instances are mounted, the array is extended with
malloc(9) as necessary when the filesystem populates its directory
tree.

Retire the cdev alias lists, the cdev_priv now know about all the
relevant devfs_dirents (and their vnodes) and devfs_revoke() will
pick them up from there.  We still spelunk into other mountpoints
and fondle their data without 100% good locking.  It may make better
sense to vector the revoke event into the tty code and there do a
destroy_dev/make_dev on the tty's devices, but that's for further
study.

Lots of shuffling of stuff and churn of bits for no good reason[2].

XXX: There is still nothing preventing the dev_clone EVENTHANDLER
from being invoked at the same time in two devfs mountpoints.  It
is not obvious what the best course of action is here.

XXX: comment out an if statement that lost its body, until I can
find out what should go there so it doesn't do damage in the meantime.

XXX: Leave in a few extra malloc types and KASSERTS to help track
down any remaining issues.

Much testing provided by: Kris
Much confusion caused by (races in): md(4)

[1] You are not supposed to understand anything past this point.

[2] This line should simplify life for the peanut gallery.

18 years agoUse phk's kernel unit number allocator to associate unique ids to neighbors
damien [Mon, 19 Sep 2005 18:59:04 +0000 (18:59 +0000)]
Use phk's kernel unit number allocator to associate unique ids to neighbors
in an IBSS.  Store ids directly into ieee80211_node's instead of managing
our own private association table.  Idea and code by Sam Leffler.

Submitted by: sam
MFC after: 5 days

18 years agoAdd #include <sys/sx.h>, devfs is going to require this shortly.
phk [Mon, 19 Sep 2005 18:52:51 +0000 (18:52 +0000)]
Add #include <sys/sx.h>, devfs is going to require this shortly.

18 years agoWhen (re)allocating space for an array of pointers to char, use
cperciva [Mon, 19 Sep 2005 18:43:11 +0000 (18:43 +0000)]
When (re)allocating space for an array of pointers to char, use
sizeof(*list), not sizeof(**list).  (i.e., sizeof(pointer) rather than
sizeof(char)).

It is possible that this buffer overflow is exploitable, but it was
added after RELENG_5 forked and hasn't been MFCed, so this will not
receive an advisory.

Submitted by: Vitezslav Novy
MFC after: 1 day

18 years agoThe "SMC EZ Connect SMC2862W-G" product is not based on the Ralink RT2500USB
damien [Mon, 19 Sep 2005 18:19:22 +0000 (18:19 +0000)]
The "SMC EZ Connect SMC2862W-G" product is not based on the Ralink RT2500USB
chipset.

MFC after: 5 days

18 years agoUpdate the list of supported hardware.
damien [Mon, 19 Sep 2005 18:16:29 +0000 (18:16 +0000)]
Update the list of supported hardware.

MFC after: 5 days

18 years agoAdd GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
rwatson [Mon, 19 Sep 2005 16:51:43 +0000 (16:51 +0000)]
Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
as they both interact with the tty code (!MPSAFE) and may sleep if the
tty buffer is full (per comment).

Modify all consumers of uprintf() and tprintf() to hold Giant around
calls into these functions.  In most cases, this means adding an
acquisition of Giant immediately around the function.  In some cases
(nfs_timer()), it means acquiring Giant higher up in the callout.

With these changes, UFS no longer panics on SMP when either blocks are
exhausted or inodes are exhausted under load due to races in the tty
code when running without Giant.

NB: Some reduction in calls to uprintf() in the svr4 code is probably
desirable.

NB: In the case of nfs_timer(), calling uprintf() while holding a mutex,
or even in a callout at all, is a bad idea, and will generate warnings
and potential upset.  This needs to be fixed, but was a problem before
this change.

NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having
non-MPSAFE tty code.

MFC after: 1 week

18 years agoA single `*' character doesn't disable *ANY* form of authentication.
keramida [Mon, 19 Sep 2005 16:32:27 +0000 (16:32 +0000)]
A single `*' character doesn't disable *ANY* form of authentication.
Make sure that this is clearly stated.

Prodded by: simon, Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>

18 years agoSmall regression test tool to generate two forms of ENOSPC on a file
rwatson [Mon, 19 Sep 2005 16:29:36 +0000 (16:29 +0000)]
Small regression test tool to generate two forms of ENOSPC on a file
system: out of blocks, and out of inodes.  Useful for exercising the
uprintf(9) calls in UFS/ext2fs in order to detect races.

18 years agoDrop current rtentry lock before calling rt_getifa(). This fixes a LOR
glebius [Mon, 19 Sep 2005 16:27:22 +0000 (16:27 +0000)]
Drop current rtentry lock before calling rt_getifa(). This fixes a LOR
and a possible recursive use of rtentry mutex.

PR: kern/69356
Reviewed by: sam

18 years agoIt's safe to wait for command completion in iwi_config().
damien [Mon, 19 Sep 2005 16:26:52 +0000 (16:26 +0000)]
It's safe to wait for command completion in iwi_config().

MFC after: 5 days

18 years agoCreate fstab before linking stuff into /conf
phk [Mon, 19 Sep 2005 15:41:08 +0000 (15:41 +0000)]
Create fstab before linking stuff into /conf