joe [Tue, 14 Jan 2003 23:07:43 +0000 (23:07 +0000)]
Some USB devices are not prepared to deal with a single byte string
descriptor request, which usbd_get_string_desc() uses to get the
length of a descriptor. One device for instance returns a full 8
byte long packet instead which confuses the rest of the stack and
leads to the USB port being reset. The fix is to instead request
two bytes, but not to complain if we only get one.
dillon [Tue, 14 Jan 2003 19:35:33 +0000 (19:35 +0000)]
Introduce the ability to flag a sysctl for operation at secure level 2 or 3
in addition to secure level 1. The mask supports up to a secure level of 8
but only add defines through CTLFLAG_SECURE3 for now.
As per the missif in the log entry for 1.11 of ip_fw2.c which added the
secure flag to the IPFW sysctl's in the first place, change the secure
level requirement from 1 to 3 now that we have support for it.
njl [Tue, 14 Jan 2003 19:31:27 +0000 (19:31 +0000)]
Remove bogus locking from dc(4). Instead, move interrupt allocation
and ether_ifattach() to end. This fixes a "could sleep" case and
simplifies error exit cases as well. Also be sure to set errno
and clean up resources in !mac error case.
dillon [Tue, 14 Jan 2003 19:26:08 +0000 (19:26 +0000)]
Comment correction. NetBSD uses 'readblksize' as the multiplier for the
-r option, which defaults to 32K (not 512 bytes). Still just as bad
from a UI standpoint, though.
cognet [Tue, 14 Jan 2003 17:13:52 +0000 (17:13 +0000)]
Don't call destroy_dev it a channel has children.
vchan creation doesn't lead to /dev entry creation if the new vchan is the
first child of a channel,
This fix a panic that happens when loading a sound driver module, creating
vchans and unloading the driver.
mtm [Tue, 14 Jan 2003 15:43:02 +0000 (15:43 +0000)]
Finish merging in rev. 1.124 of rc.network, so that natd can be used
withough the $natd_interface having to be explicitly specified on the
command line.
alc [Tue, 14 Jan 2003 06:57:03 +0000 (06:57 +0000)]
- Update vm_pageout_deficit using atomic operations. It's a simple
counter outside the scope of existing locks.
- Eliminate a redundant clearing of vm_pageout_deficit.
tjr [Tue, 14 Jan 2003 04:12:33 +0000 (04:12 +0000)]
Sharing semaphores between processes works now, so remove the stale comments
about it always returning EPERM. Document that ENFILE occurs when the
limit on kernel semaphores is reached.
tjr [Tue, 14 Jan 2003 03:36:45 +0000 (03:36 +0000)]
Add the newly created semaphore to the named semaphore list in sem_open()
so that multiple opens of the same semaphore without an intervening
sem_close() return the same object, and so that sem_close() does not
segfault while trying to remove the item from the list.
marcel [Mon, 13 Jan 2003 23:53:46 +0000 (23:53 +0000)]
Prevent infinite substitution of the empty string by forcing non-
global substitution. In general it's a makefile bug to globally
substitute the empty string, but it's a bug in make(1) if a bug
in the makefile yields an infinite running time of make(1).
scottl [Mon, 13 Jan 2003 23:51:14 +0000 (23:51 +0000)]
Since reseting the SCSI busses via the passthrough interface usually
confuses the controller, tell CAM not to do it. Also report the
correct error condition to CAM when it tries to probe a target that
doesn't exists.
This should make the CAM interface less risky to use.
dillon [Mon, 13 Jan 2003 23:04:32 +0000 (23:04 +0000)]
It is possible for an active aio to prevent shared memory from being
dereferenced when a process exits due to the vmspace ref-count being
bumped. Change shmexit() and shmexit_myhook() to take a vmspace instead
of a process and call it in vmspace_dofree(). This way if it is missed
in exit1()'s early-resource-free it will still be caught when the zombie is
reaped.
Also fix a potential race in shmexit_myhook() by NULLing out
vmspace->vm_shm prior to calling shm_delete_mapping() and free().
phk [Mon, 13 Jan 2003 22:20:36 +0000 (22:20 +0000)]
Even if the permissions deny it, a process should be allowed to
access its controlling terminal.
In essense, history dictates that any process is allowed to open
/dev/tty for RW, irrespective of credential, because by definition
it is it's own controlling terminal.
Before DEVFS we relied on a hacky half-device thing (kern/tty_tty.c)
which did the magic deep down at device level, which at best was
disgusting from an architectural point of view.
My first shot at this was to use the cloning mechanism to simply
give people the right tty when they ask for /dev/tty, that's why
you get this, slightly counter intuitive result:
syv# ls -l /dev/tty `tty`
crw--w---- 1 u1 tty 5, 0 Jan 13 22:14 /dev/tty
crw--w---- 1 u1 tty 5, 0 Jan 13 22:14 /dev/ttyp0
Trouble is, when user u1 su(1)'s to user u2, he cannot open
/dev/ttyp0 anymore because he doesn't have permission to do so.
The above fix allows him to do that.
The interesting side effect is that one was previously only able
to access the controlling tty by indirection:
date > /dev/tty
but not by name:
date > `tty`
This is now possible, and that feels a lot more like DTRT.
imp [Mon, 13 Jan 2003 21:28:24 +0000 (21:28 +0000)]
Fix interactive booting:
o Revision 1.38 introduced the -n flag. It conflicted with the
RB_BOOTINFO flag, so was in effect always on. Change the -n flag to
be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed
/boot.config would render the system unbootable because the user was
unable to enter anything at all on the command line.
o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit
out and do not otherwise use it.
dillon [Mon, 13 Jan 2003 19:42:41 +0000 (19:42 +0000)]
Add a caching option to dump. Use -C. Note that NetBSD has a caching option
called -r but it takes 512 byte blocks instead of megabytes, and I felt a
megabytes specification would be far more useful so I did not use the same
option character.
This will *greatly* improve dump performance at the cost of possibly
missing filesystem changes that occur between passes, and does a fairly
good job making up for the loss of buffered block devices. Caching is disabled
by default to retain historical behavior.
In tests, dump performance improved by about 40% when dumping / or /usr.
Beware that dump forks and the cache may wind up being larger then you
specify, but a more complex shared memory implementation would not produce
results that are all that much better so I kept it simple for now.
simokawa [Mon, 13 Jan 2003 16:08:09 +0000 (16:08 +0000)]
Minimal fix for DV part.
- Don't panic on contigmalloc failure.
- Calculate timestamp by feedforward rather than feedback which depends on
unreliable interrupt timing.
- Overwrite timestamp in CIP header correctly.
- Add debug code for timestamp synchronization.
- Add comments.
phk [Mon, 13 Jan 2003 11:34:35 +0000 (11:34 +0000)]
Always issue ioctls as BIO_GEATTR requests. The direction of data copies on
ioctls are no reliable indication of the ioctls "set" or "get" nature or if
such simplistic categories can even be applied.
jeff [Mon, 13 Jan 2003 03:42:41 +0000 (03:42 +0000)]
- Unbreak world. I did not notice that libkvm was still used in some places
to access the pctcpu. This will have to be sorted out more later as the
new scheduler requires a procedural interface for this data. A more
complete solution will follow.
dillon [Mon, 13 Jan 2003 00:33:17 +0000 (00:33 +0000)]
Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if
anyone complains, just for the hell of it.
alc [Sun, 12 Jan 2003 23:32:46 +0000 (23:32 +0000)]
Make vm_page_alloc() return PG_ZERO only if VM_ALLOC_ZERO is specified.
The objective being to eliminate some cases of page queues locking.
(See, for example, vm/vm_fault.c revision 1.160.)
Reviewed by: tegge
(Also, pointed out by tegge that I changed vm_fault.c before changing
vm_page.c. Oops.)
obrien [Sun, 12 Jan 2003 21:03:38 +0000 (21:03 +0000)]
Partial support for the nVidia nForce2 chipset's on-board Broadcom/Altima PHY
and 3com MAC. Specifications for the Altima PHY are available at:
http://www.altimacom.com/products/ac101L.html
Submitted by: Mikko S. Hyvarinen <morphy@morphy.iki.fi>
jeff [Sun, 12 Jan 2003 19:04:49 +0000 (19:04 +0000)]
- Move ke_pctcpu and ke_cpticks into the scheduler specific datastructure.
This will prevent access through mechanisms other than the published
interfaces.
mtm [Sun, 12 Jan 2003 04:53:54 +0000 (04:53 +0000)]
Fix the named script to find the correct pid file for the
named(8) daemon by providing a new rc.conf knob: named_pidfile
that defaults to the path specified in the system-installed named.conf(5).