mjacob [Thu, 3 Jan 2002 20:43:22 +0000 (20:43 +0000)]
Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows the
firmware to delay completion of commands so that it can attempt to batch
a bunch of completions at once- either returning 16 bit handles in mailbox
registers, or in a resposne queue entry that has a whole wad of 16 bit handles.
Distinguish between 2300 and 2312 chipsets- if only because the revisions
on the chips have different meanings.
Add more instrumentation plus ISP_GET_STATS and ISP_CLR_STATS ioctls.
Run up the maximum number of response queue entities we'll look at
per interrupt.
If we haven't set HBA role yet, always return success from isp_fc_runstate.
Return EBADF in case some vnode field has been reset to a NULL pointer.
(There has been some discussion, whether ENOENT or EBADF is more
appropriate. I choose the latter, since the operation is not supported
on the file descriptor at that time, even if it was, immediately before.)
PR: 32681
Reviewed by: dillon, iedowse, ...
Approved by: nectar
MFC after: 3 days
(pending RE approval)
rwatson [Thu, 3 Jan 2002 01:00:23 +0000 (01:00 +0000)]
o Note that packets diverted using a 'divert' socket, and then
reinserted by a userland process, will lose a number of packet
attributes, including their source interface. This may affect
the behavior of later rules, and while not strictly a BUG, may
cause unexpected behavior if not clearly documented. A similar
note for natd(8) might be desirable.
peter [Thu, 3 Jan 2002 00:26:04 +0000 (00:26 +0000)]
Allow a specific setting for pv entries. This avoids the need to guess
(or calculate by hand) the effect of interactions between shpgperproc,
physical ram size, maxproc, maxdsiz, etc.
yar [Wed, 2 Jan 2002 20:48:21 +0000 (20:48 +0000)]
Move the discussion of how many times a packet will pass through
ipfirewall(4) to the IMPLEMENTATION NOTES section because it
considers kernel internals and may confuse newbies if placed
at the very beginning of the manpage (where it used to be previously.)
joe [Wed, 2 Jan 2002 20:16:53 +0000 (20:16 +0000)]
Sync usb.h with NetBSD, apart from usb_device_info.speed, which
requires logic changes. For now leave it as usb_device_info.lowspeed.
It will get addressed when the usb.c code is sync'd.
chris [Wed, 2 Jan 2002 19:56:57 +0000 (19:56 +0000)]
Copy the sample `SECURITY CONSIDERATIONS' section from sec-doc.7.
This will be trimmed as the FreeBSD Security Architecture document
is fleshed out and committed.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
yar [Wed, 2 Jan 2002 18:54:40 +0000 (18:54 +0000)]
Allow weird characters in usernames if an admin persists on that:
a) Convert all the remaining older Perl system() calls to the new,
more secure LIST format so they are robust to whitespace and
shell metacharacters in their arguments.
b) Add a new option: -force, which allows adding usernames containing
characters that are otherwise illegal.
tmm [Wed, 2 Jan 2002 18:49:20 +0000 (18:49 +0000)]
1. Implement an optimization for pmap_remove() and pmap_protect(): if a
substantial fraction of the number of entries of tte's in the tsb
would need to be looked up, traverse the tsb instead. This is crucial
in some places, e.g. when swapping out a process, where a certain
pmap_remove() call would take very long time to complete without this.
2. Implement pmap_qenter_flags(), which will become used later
3. Reactivate the instruction cache flush done when mapping as executable.
This is required e.g. when executing files via NFS, but is known to
cause problems on UltraSPARC-IIe CPU's. If you have such a CPU, you
will need to comment this call out for now.
joe [Wed, 2 Jan 2002 18:28:45 +0000 (18:28 +0000)]
Sync with NetBSD:
date: 2000/02/29 21:37:01; author: augustss; state: Exp;
Distinguish between device and interface classes.
(I finally found a document that said that they were different.)
tmm [Wed, 2 Jan 2002 18:27:13 +0000 (18:27 +0000)]
Correct the defintion of struct ofw_upa_regs, and use it instead of
struct ofw_nexus_reg. Implement UPA device memory management in the
nexus driver.
Adapt the psycho driver to these changes, and do some minor cleanup work
while being there.
Fix some places where the macro L0IFPIUNIT was used instead of the correct
form L0IFPI2UNIT. This could result in a panic if the user tried to
trace using isdntrace(8). I fixed this locally but forgot to commit it.
alc [Wed, 2 Jan 2002 07:04:38 +0000 (07:04 +0000)]
o Properly check the file descriptor passed to aio_cancel(2). (Previously,
no out-of-bounds check was performed on the file descriptor.)
o Eliminate some excessive white space from aio_cancel(2).
kbyanc [Wed, 2 Jan 2002 06:42:34 +0000 (06:42 +0000)]
Remove broken attempt to compile libc's malloc source directly; this
allows this tool to compile again. Albeit, now to test a new malloc
implementation one has to install the new libc which may have bad
consequences (i.e. if the new malloc implementation were buggy).
Add logic to workaround malloc's current behaviour of returning an
invalid non-NULL pointer for 0 byte allocation requests; this prevents the
tool from coring during the NOPS loop.
iedowse [Wed, 2 Jan 2002 00:41:26 +0000 (00:41 +0000)]
Permit NFS filesystems to be forcibly unmounted when the server is
down, even if there are hung processes and the mount is non-
interruptible.
This works by having nfs_unmount call a new function nfs_nmcancelreqs()
in the FORCECLOSE case. It scans the list of outstanding requests
and marks as interrupted any requests belonging to the specified
mount. Then it waits up to 30 seconds for all requests to terminate.
A few other changes are necessary to support this:
- Unconditionally set a socket timeout so that even hard mounts
are guaranteed to occasionally check the R_SOFTTERM flag on
requests. For hard mounts this flag can only be set by
nfs_nmcancelreqs().
- Reject requests on a mount that is currently being unmounted.
- Never grant the receive lock to a request that has been cancelled.
This should also avoid an old problem where a forced NFS unmount
could cause a crash; it occurred when a VOP on an unlocked vnode
(usually VOP_GETATTR) was in progress at the time of the forced
unmount.
jake [Tue, 1 Jan 2002 21:58:32 +0000 (21:58 +0000)]
Add libc side of user trap handling.
Add support for handling floating point disabled traps mostly in userland
for the simple single threaded case. Not yet enabled by default.
Implement __sparc_utrap_install as specified by the sparc abi.
jake [Tue, 1 Jan 2002 21:45:30 +0000 (21:45 +0000)]
1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4.
This gives a bit of a sluggish console, but it prevents the console from
getting stuck if we poll too fast, as well as other badness on certain
machines.
2. Fix a test for != 0 that should have been > 0.
jake [Tue, 1 Jan 2002 21:14:58 +0000 (21:14 +0000)]
Enable virtual caching for kernel pages. When we enabled virtual caching
for certain user pages, stores to kernel pages would not update the
affected cache lines, which would sometimes cause the wrong data to be
returned for loads from kernel pages. This was especially fatal when
the addresses affected held the kernel stack pointer, and a random
value was loaded into it.
Fix a harmless off by one error in a dcache_inval_phys call.
jake [Tue, 1 Jan 2002 21:04:27 +0000 (21:04 +0000)]
Add some more info to traces.
Fix a potential race in setting up the per-cpu pointer if the special
restore fails on return to user mode fails and we need to trap back
into the kernel to fault in more stack.
Remove debug code.
jake [Tue, 1 Jan 2002 20:56:28 +0000 (20:56 +0000)]
Implement user trap delivery as specified by the sparc abi. This provides
an efficient way for the kernel to bounce certain mundane traps back to
userland for handling there. A user trap handler returns directly to the
trapping user code, rather than going through the kernel again. Only a
handful of instructions are actually executed in kernel mode.
Implement sysarch(SPARC_UTRAP_INSTALL).
Add code to handle sharing of the user trap table across forks and unsharing
at exec.
This can be used to implement efficient tracking of floating point register
usage in userland, fe by a thread library, and to handle alignment fault
fixups and instruction emulation in userland, for which the code may need
to be different for 32bit and 64bit binaries.
jake [Tue, 1 Jan 2002 20:26:46 +0000 (20:26 +0000)]
Add a panic stack, which is used as a known good stack when there is
something wrong with the kernel stack.
Add code to check the kernel stack pointer in various important places
and try hard not to go down in flames if its wrong.