Juli Mallett [Fri, 3 May 2002 17:41:54 +0000 (17:41 +0000)]
Move substitution out to a function, prerun(), and replace use of run() with
it. It handles everything (right now) that needs done before run(), except
the -J case, because while that would be easy, I don't quite understand -J.
Juli Mallett [Fri, 3 May 2002 17:05:25 +0000 (17:05 +0000)]
Rewrite the loop that handles substitution in the -I case, and try to make
it easier to understand. Making it easy to understand isn't all that easy,
so litter the code with comments so some other poor soul can come along some
day and work on this if they see fit to do so. Avoid calling strlen(3) to
check for a nil-string, when we can just check for *str=='\0'.
Warner Losh [Fri, 3 May 2002 05:47:38 +0000 (05:47 +0000)]
Remove Apple Airport card, since it seems to be mac-only.
Change date to today.
Add socket low power WLAN CF card
Add SMC 2602W which I use all the time
Comment out the create-ibss example. FreeBSD doesn't yet have that
media option. Also change it to master-ibss since that's what OpenBSD
really uses (and that is a change in their man page too)
Warner Losh [Fri, 3 May 2002 05:39:16 +0000 (05:39 +0000)]
Additional patches from OpenBSD. Mostly grammar fixes and the like,
however I'm adding the Dlink DWL520 as supported from OpenBSD. Also
adding Dlink DWL650 since I have one in my hot little hands and it
works great.
Peter Wemm [Fri, 3 May 2002 00:14:39 +0000 (00:14 +0000)]
Pre-generate the optimized x86 crypto code and check it in rather than
depending on perl at build time. Makefile.asm is a helper for after the
next import.
With my cvs@ hat on, the relatively small repo cost of this is acceptable,
especially given that we have other (much bigger) things like
lib*.so.gz.uu checked in under src/lib/compat/*.
Warner Losh [Thu, 2 May 2002 22:51:40 +0000 (22:51 +0000)]
Bring the wi man page into the 21st centry. This man page is based
heavily on OpenBSD's wi man page, with OpenBSDisms replaced by
FreeBSDisms. I also added a note about where the man page came from.
I hope that I've not broken anything that ru cleaned up. We now run
this through tbl, but that appears to be automatic.
MFNetBSD:
revision 1.94
date: 2001/12/30 20:26:59; author: augustss; state: Exp; lines: +5 -2
Make sure we don't have any pending softintrs when entering polling mode.
Thanks to Darrin for finding and fixing this problem when using USB
keyboards in DDB.
This leaves some vestiges of the old locking, including style
bugs in it. I've only noticed anachronisms in socketvar.h so far
(I've merged net* but not kern or all of sys). The patch also
has old fixes for style bugs in accf stuff and namespace pollution
in uma... The largest style bugs are line continued backslashes
in column 80 and (these are fixed), and starting the do-while
code for the new macros in column 40, which is quite unlike the
usual indentation (see sys/queue.h) and not even like the indentation
for the old macros (column 32) (this is not fixed).
Revert rev 1.1018. rp(4) and dgb(4) are deemed MI, while the rest of the
drivers for simular hardware are i386-specific. That is why I did not
find the information here.
Alan Cox [Thu, 2 May 2002 17:32:27 +0000 (17:32 +0000)]
o Change the implementation of vm_map locking to use exclusive locks
exclusively. The interface still, however, distinguishes
between a shared lock and an exclusive lock.
John Baldwin [Thu, 2 May 2002 15:13:45 +0000 (15:13 +0000)]
- Protect randompid and nprocs with the allproc_lock.
- Reorder fork1() to do malloc() and other blocking operations prior to
acquiring the needed process locks.
- The new process inherit's the credentials of curthread, not the
credentials of the old process.
- Document a really weird race that will come up with KSE allows multiple
kernel threads per process.
John Baldwin [Thu, 2 May 2002 15:09:58 +0000 (15:09 +0000)]
- Reorder a few things so that when we lock the process at the end of
exit1() we don't have to release it until we acquire schd_lock to
call cpu_throw().
- Since we can switch at any time due to preemption or a lock release
prior to acquiring sched_lock, don't update switchtime and switchticks
until the very end of exit1() after we have acquired sched_lock.
- Interlock the proctree_lock and proc lock in wait1() and exit1() to
avoid lost wakeups when a parent blocks waiting for a child to exit at
the bottom of wait1(). In exit1() the proc lock interlocked with
proctree_lock (and released after acquiring sched_lock) is that of
the parent process.
- In wait1() use an exclusive lock of proctree lock while we are
looking for a process to harvest. This allows us to completely
remove all references to the process once we've found one (i.e.,
disconnect it from pgrp's, session's, zombproc list, and it's parent's
children list) "atomically" without needing to worry about a lock
upgrade.
- We don't need sched_lock to test if p_stat is SZOMB or SSTOP when holding
the proc lock since the proc lock is always held with p_stat is set to
SZOMB or SSTOP.
- Protect nprocs with an xlock of the allproc_lock.
John Baldwin [Thu, 2 May 2002 15:00:14 +0000 (15:00 +0000)]
- Reorder execve() so that it performs blocking operations before it
locks the process.
- Defer other blocking operations such as vrele()'s until after we
release locks.
- execsigs() now requires the proc lock to be held when it is called
rather than locking the process internally.
Jeff Roberson [Thu, 2 May 2002 09:07:04 +0000 (09:07 +0000)]
Hide a pointer to the malloc_type bucket at the end of the freed memory. If
this memory is modified after it has been freed we can now report it's
previous owner.
Jeff Roberson [Thu, 2 May 2002 09:05:36 +0000 (09:05 +0000)]
Move around the dbg code a bit so it's always under a lock. This stops a
weird potential race if we were preempted right as we were doing the dbg
checks.
- Replaced the Atm_connection storage pool with an uma_zone of
Atm_connection items.
- Replaced the Atm_connvc storage pool with an uma_zone of Atm_connvc
items.
- Created void atm_cm_init(void *) and added it to the netatm init code.
I'm thinking that there will definetly be more ``subsystem'' init
functions to be added so I'll probably change these calls to be a for
loop through init routines (or something).
Jeff Roberson [Thu, 2 May 2002 07:22:19 +0000 (07:22 +0000)]
malloc/free(9) no longer require Giant. Use the malloc_mtx to protect the
mallochash. Mallochash is going to go away as soon as I introduce the
kfree/kmalloc api and partially overhaul the malloc wrapper. This can't happen
until all users of the malloc api that expect memory to be aligned on the size
of the allocation are fixed.
Juli Mallett [Thu, 2 May 2002 05:25:23 +0000 (05:25 +0000)]
Remove redundant declarations of getopt(3) externals (since <unistd.h> does
take care of them), and add __FreeBSD__ to the defined() checks for the
_PATH_DIVNAME.
xdm plays horrid tricks with PAM, and dumps core if it's allowed to call
pam_lastlog, so add a dummy session chain to avoid using the one from
pam.d/other. I assume gdm does something similar, so give it a dummy
session chain as well.
Juli Mallett [Thu, 2 May 2002 02:42:34 +0000 (02:42 +0000)]
Make -J a proper flag internal to the code (rather than just check for
use of replstr and lack of Iflag), and add -R, which when given with
-I controls the number of arguments on which replacement will be done.
Some people happen to think it's idiotic to limit to 5 arguments, so
let the user override it if they like.
Jeff Roberson [Thu, 2 May 2002 02:08:48 +0000 (02:08 +0000)]
Remove the temporary alignment check in free().
Implement the following checks on freed memory in the bucket path:
- Slab membership
- Alignment
- Duplicate free
This previously was only done if we skipped the buckets. This code will slow
down INVARIANTS a bit, but it is smp safe. The checks were moved out of the
normal path and into hooks supplied in uma_dbg.
Juli Mallett [Thu, 2 May 2002 02:06:03 +0000 (02:06 +0000)]
Rework some of the -I support so I can't find a way to make xargs(1) core or
corrupt memory. Simplifies the code in one or two places, also removes some
code that looks like it was bogus or incomplete.
Update strnsubst to have one or two extra conditions which maybe would make
it more efficient, or at least more versatile. This is likely a no-op.
Matt Jacob [Wed, 1 May 2002 21:58:36 +0000 (21:58 +0000)]
If we get a DATA UNDERRUN error from QLogic FC cards, but the RQCS_RU bit
is not set in the scsi completion status, or if the residual is clearly
nonsense, then this was a command that suffered the loss of one or more
FC frames in the middle of the exchange.
Set HBA_BOTCH and hope it will get retried. It's the only thing we can do.
Semen Ustimenko [Wed, 1 May 2002 19:23:04 +0000 (19:23 +0000)]
Add an epic_stats_update() function (called once per second). Even though
we don't collect any stats in it, we mii_tick() in it! This fix the bug
when autonegotiating fullduplex modes.
Also, pause activity before setting TXCON in epic_miibus_statchg(). Though
i've never seen problmes from not doing that, the documentation says we
need to do it.