chris [Sat, 5 Jan 2002 20:18:35 +0000 (20:18 +0000)]
As discussed with Bruce Evans and Kirk McKusick:
o Combine ufs.7 and ffs.7 into a single ffs.7 man page.
o Remove all references to `ufs' as a file system.
o Proper (lack of) capitalization for `ffs'.
Obtained from: TrustedBSD Project
Sposnored by: DARPA, NAI Labs
dwmalone [Sat, 5 Jan 2002 20:13:01 +0000 (20:13 +0000)]
Be more careful about freeing memory after parsing commands.
Hiroyuki YAMAMORI gave a patch for the EPRT command in the
PR below. Problems with the rest of the patch are my fault.
fenner [Sat, 5 Jan 2002 18:23:53 +0000 (18:23 +0000)]
Pre-calculate the checksum for multicast packets sourced on a
multicast router. This is overkill; it should be possible to
delay to hardware interfaces and only pre-calculate when forwarding
to a tunnel.
jhb [Sat, 5 Jan 2002 17:18:59 +0000 (17:18 +0000)]
Fix a bug where the mutex name wasn't always displayed for processes in
SMTX in utils such as ps and top. The KI_CTTY flag was assigned to
kinfo_proc->ki_kiflag rather than or'd into the flag, thus clobbering
any flags set earlier, including KI_MTXBLOCK.
peter [Sat, 5 Jan 2002 09:38:47 +0000 (09:38 +0000)]
Fix forward_roundrobin(). It was mistakenly using the cpu number as
though it was a mask. As a result, we sent AST IPI's to the wrong
cpu and/or left out some.
jhb [Sat, 5 Jan 2002 08:47:13 +0000 (08:47 +0000)]
Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:
The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe. Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer. This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs. Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called. (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)
I've tested the changes to the interrupt code on i386 and alpha. I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine. PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken. Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.
jhb [Sat, 5 Jan 2002 08:29:54 +0000 (08:29 +0000)]
Remove brain damaged code in witness_lock(). We could have easily
just used PCPU_GET(spinlocks) w/o needing the w_mtx held. It is more
correct to just check td_critnest now though.
yar [Fri, 4 Jan 2002 18:12:38 +0000 (18:12 +0000)]
State clearly that one should call listen(2) on a socket
at first and try to set an accept_filter(9) on it only after that.
Also document errno value that will be set if installing the
filter on a non-listening socket.
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.