Kelly Yancey [Wed, 28 Dec 2005 20:36:55 +0000 (20:36 +0000)]
Add support for printing IPSEC protocol stats if the kernel was compiled
with FAST_IPSEC rather than the KAME IPSEC stack.
Note that the output of "netstat -s -p ipsec" differs depending on which
stack is compiled into the kernel since they each keep different stats.
This delta also adds the "esp", "ah", and "ipcomp" protocol stats, which
are also available when the kernel is compiled with the FAST_IPSEC stack
(e.g. "netstat -s -p esp").
Submitted by: Matt Titus <titus at nttmcl dot com>
MFC after: 3 days
Fix the order of the stereo channels (left <-> right).
From the PR:
---snip---
I think I have found the change which reversed the channels.
Revision 1.44 of emu10k1.c, which added Audigy support, has the line
I don't have Audigy, so I'm not sure if the problem affects Audigy cards
too. The order of the channels can't be tested by just altering mixer
settings. Here's a small program to test if the channels are reversed on
your sound card:
You should hear a sound on the left channel followed by a sound on the
right channel. If you hear a sound on the right channel first, the
channels are reversed.
---snip---
Owners of an audigy card should verify if it DTRT and report back.
Robert Watson [Wed, 28 Dec 2005 12:42:12 +0000 (12:42 +0000)]
Add 'juggle', a simple IPC micro-benchmark that uses various IPC types to
perform varying number of small IPC operations. It runs using a single
process and one thread, a single process and two threads, and using
multiple processes. Critical to its performance measure are the cost and
frequency of context switches, locking overhead, and threading
performance. The benchmark generates .csv output appropriate for reading
into a spreadsheet to generate summary statistics and perform statistical
tests easily.
Gleb Smirnoff [Wed, 28 Dec 2005 10:15:01 +0000 (10:15 +0000)]
When in rev. 1.47 cardbus_alloc_resources() function was moved from
cardbus_cis.c to this file, some code was not merged and thus resource
list entries were invalid. They didn't have a resources attached to
them.
However, the problem was masked for some time later, because newer
resources list entries were added to the head of the list, and
resource_list_find() always returned the first matching resource list
entry. Usually the underlying driver allocated a valid resource and
added it to the head of the list, and invalid one wasn't used.
In rev. 1.174 of subr_bus.c the sorting of resource list entries was
reversed demasking the problem in cardbus_alloc_resources().
This commit fixes the problem returning back some code from
cardbus_cis.c, pre-1.49 revisions.
Scott Long [Wed, 28 Dec 2005 08:14:35 +0000 (08:14 +0000)]
Fix a serious regression from the busdma conversion. Check to make sure
that we don't overrun the tx descriptor ring before actually trying to
overrun it.
Pyun YongHyeon [Wed, 28 Dec 2005 02:57:19 +0000 (02:57 +0000)]
Bring big-endian architecture support for ti(4).
. remove unnecessay header files after Scott's bus_dma(9) commit.
. remove global variable tis which was introduced at the time of
zero_copy(9) changes. The variable tis was not used at all. The
same applyes to ti_links in softc so axe it.
. deregister variables.
. axe ti_vhandle and switch to use explicit register access for
accessing NIC local memory. Creates three variants of ti_mem to
read/write NIC local memory(ti_mem_read, ti_mem_write) and clearing
NIC local memory(ti_mem_zero). This greatly enhances code
readability and have ti(4) drop using shared memory scheme for
Tigon 1. As Tigon 1 switched to use explicit register access for Tx,
axe ti_tx_ring_nic/ti_cmd_ring in softc.(Tigon 2 used to host ring
scheme which means there is no need to access NIC local memory via
register access for Tx and NIC would DMA the modified Tx rings into
its local memory.) [1]
. introduce new macro TI_EVENT_*/TI_CMD_* to handle NIC envent/command.
Instead of using bit fields assginment for accessing the event, use
shift operations to set/get it. [1]
. add additional check for valid DMA tags in ti_free_dmamaps().
. add missing bus_dmamap_sync/bus_dmamap_unload in ti_free_*_ring_*.
. fix locking nits(MTX_RECURSE mutex) and make ti(4) MPSAFE.
. change data type of ti_rdata_phys to bus_addr_t and don't blindly
cast to uint32_t.
. rearrange detach path and make ti(4) survive during device detach.
. for Tigon 1, use explicit register access for checking Tx descriptors
in ti_encap()/ti_txeof(). [1]
. properly call bus_dmamap_sync(9) for updating statistics.
. remove extra semicolon in ti_encap()
. rewrite loading MAC address to work on strict-alignment architectures.
. move TI_RD_OFF macro to if_tireg.h
. axe ETHER_ALIGN as it's already defined in <net/ethernet.h>.
. make macros immuine from expansion by adding parenthesis and do-while.
. remove alpha specific hack as vtophys(9) is no longer used in ti(4)
after Scott's bus_dma(9) fix.
In realloc(9), determine size of the original block based on
UMA_SLAB_MALLOC flag.
In some circumstances (I observed it when I was doing a lot of reallocs)
UMA_SLAB_MALLOC can be set even if us_keg != NULL.
If this is the case we have wonderful, silent data corruption, because less
data is copied to the newly allocated region than should be.
I'm not sure when this bug was introduced, it could be there undetected
for years now, as we don't have a lot of realloc(9) consumers and it was
hard to reproduce it...
...but what I know for sure, is that I don't want to know who introduce
the bug:) It took me two/three days to track it down (of course most of
the time I was looking for the bug in my own code).
Fix watch address truncation. The address was truncated when it was passed to
amd64_set_watch() as 'unsigned int' and 'unsigned int' is 32bit long on amd64.
Even with that fix hardware watchpoint don't work for me on amd64, ie. when
I set the watchpoint and write a byte there, nothing happens.
Garrett Wollman [Tue, 27 Dec 2005 19:55:21 +0000 (19:55 +0000)]
Merge tzdata2005r from vendor branch. Only significant change is to
update those Canadian provinces which have announced that they will
follow the new US DST rules.
Garrett Wollman [Tue, 27 Dec 2005 19:52:05 +0000 (19:52 +0000)]
No sooner did I make noises about seeing the last timezone update of
2005 when another one comes out. This one, even ADO hopes will be the
last of the year.
Obtained from: Arthur Olson, ftp://elsie.nci.nih.gov/pub/tzdata2005r.tar.gz
Søren Schmidt [Tue, 27 Dec 2005 18:22:11 +0000 (18:22 +0000)]
Change the probes in ATA to return a negative value on success.
This allows other driver to take over if needed during probe, and allows
me to distribute new drivers as modules.
Maxim Sobolev [Mon, 26 Dec 2005 21:23:57 +0000 (21:23 +0000)]
Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structure
with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually
allow executing elf dynamic binaries (aka shared libraries). When it is
requested to execute ET_DYN elf image check if this flag is on after we
know the elf brand allowing execution if so.
PR: kern/87615
Submitted by: Marcin Koziej <creep@desk.pl>
Gleb Smirnoff [Mon, 26 Dec 2005 10:39:21 +0000 (10:39 +0000)]
Add simple suspend and resume methods. We call em_stop() on suspend and
em_init() on resume. With this change the network is ready right after
resume, without half minute lag.
Wilko Bulte [Sun, 25 Dec 2005 23:29:59 +0000 (23:29 +0000)]
We will not be responsible for damage to equipment, your ego, county wide
power outages, spontaneously generated mini (or larger) black holes,
planetary disruptions, or personal injury or worse that may result from the
use of this material.
-- taken from Samuel M. Goldwasser's
Sam's Strobe FAQ Notes on the Troubleshooting
and Repair of Electronic Flash Units and Strobe Lights
Tom Rhodes [Sun, 25 Dec 2005 10:36:30 +0000 (10:36 +0000)]
Kill the BUGS section, and remove a similar line noted under -T. As far
as I know, Sun's NFS support works with TCP just fine. This is even
hinted at in the PR.
Tom Rhodes [Sat, 24 Dec 2005 22:37:59 +0000 (22:37 +0000)]
Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert
between a 32-bit integer and a radix-64 ASCII string. The l64a_r() function
is a NetBSD addition.
PR: 51209 (based on submission, but very different)
Reviewed by: bde, ru
Tom Rhodes [Sat, 24 Dec 2005 22:22:17 +0000 (22:22 +0000)]
Make tv_sec a time_t on all platforms but alpha. Brings us more in line with
POSIX. This also makes the struct correct we ever implement an i386-time64
architecture. Not that we need too.
Reviewed by: imp, brooks
Approved by: njl (acpica), des (no objects, touches procfs)
Tested with: make universe
Joseph Koshy [Sat, 24 Dec 2005 17:00:33 +0000 (17:00 +0000)]
- Don't print an errno string when reporting dropped samples.
- Prevent an unsuccessful exec() of a target program from triggering
a false 'dropped samples' message.
Alexander Kabaev [Sat, 24 Dec 2005 15:37:30 +0000 (15:37 +0000)]
Make lookups for relocations from old unversioned binaries return
oldest versioned symbol available. Do not accept hidden symbols for
all other versions.
Use "<obj->path>: <error message>" for all error messages in new
functions to make them more consistent.
Alan Cox [Sat, 24 Dec 2005 04:57:50 +0000 (04:57 +0000)]
Maintain the lock on the vnode for most of exec_elfN_imgact().
Specifically, it is required for the I/O that may be performed by
elfN_load_section().
Avoid an obscure deadlock in the a.out, elf, and gzip image
activators. Add a comment describing why the deadlock does not occur
in the common case and how it might occur in less usual circumstances.
Eliminate an unused variable from exec_aout_imgact().
David Xu [Sat, 24 Dec 2005 02:59:29 +0000 (02:59 +0000)]
Avoid kernel panic when attaching a process which may not be stopped
by debugger, e.g process is dumping core. Only access p_xthread if
P_STOPPED_TRACE is set, this means thread is ready to exchange signal
with debugger, print a warning if P_STOPPED_TRACE is not set due to
some bugs in other code, if there is.
The patch has been tested by Anish Mistry mistry.7 at osu dot edu, and
is slightly adjusted.
Warner Losh [Fri, 23 Dec 2005 21:54:56 +0000 (21:54 +0000)]
Build ed on amd64. The pci attachment works with qemu on amd64.
I'm holding off on building on sparc64 and others because I don't know
if this driver has had all the inb/outb removed (I think it has). Nor
do I know if there are byte ordering issues. There are very few word
operations on an NE2000, but I've not had time to audit them all.
Ceri Davies [Fri, 23 Dec 2005 15:31:37 +0000 (15:31 +0000)]
Commands like gmirror, graid3, ... and others which use dlopen() to load
classes from say, /lib/geom, cannot be statically linked completely.
Moreover, those shared objects may require other shared objects (i.e.
for geom, libraries like -lmd, -lcrypto).
The libs_so extension to crunchgen fixes this by allowing some libraries
to be linked in dynamically. This requires that a copy of rtld and the
shared libraries be made available to the crunched binary, and so is not
suitable for all environments. Crunchgen configurations which do not
use the 'libs_so' keyword are unaffected and produce identical binaries
with and without this commit.
Approved by: murray (mentor, in spirit), jhb
In collaboration with: Adrian Steinmann <ast at marabu dot ch>
MFC After: 6 weeks
Peter Grehan [Fri, 23 Dec 2005 13:05:27 +0000 (13:05 +0000)]
Mark the return address of the call to ast() in the generic trap
handling code so the stack trace unwinders don't start trying to
go into user-space.
Found by trying to create core dumps with a KTR_COMPILE/KTR_GEOM
kernel, which results in a stack_save() call in the ast() coredump
path - this created a panic, and then calling 'trace' in ddb resulted
in the black screen of death after printing out most of the backtrace.
Warner Losh [Fri, 23 Dec 2005 02:18:01 +0000 (02:18 +0000)]
Add the example that green@ used in his commit log for the dump to a
pipe functionality. I've done a cvs log main.c about a dozen times
now. Maybe others will find this useful.
Garrett Wollman [Thu, 22 Dec 2005 23:40:21 +0000 (23:40 +0000)]
Merge tzdata2005q from vendor branch. Data changes for the following
locales: Azerbaijan, Brazil, Cuba, Gaza, Georgia, Jordan, Kirgizstan,
Nicaragua, Uruguay.
John Baldwin [Thu, 22 Dec 2005 22:16:09 +0000 (22:16 +0000)]
Tweak how the MD code calls the fooclock() methods some. Instead of
passing a pointer to an opaque clockframe structure and requiring the
MD code to supply CLKF_FOO() macros to extract needed values out of the
opaque structure, just pass the needed values directly. In practice this
means passing the pair (usermode, pc) to hardclock() and profclock() and
passing the boolean (usermode) to hardclock_cpu() and hardclock_process().
Other details:
- Axe clockframe and CLKF_FOO() macros on all architectures. Basically,
all the archs were taking a trapframe and converting it into a clockframe
one way or another. Now they can just extract the PC and usermode values
directly out of the trapframe and pass it to fooclock().
- Renamed hardclock_process() to hardclock_cpu() as the latter is more
accurate.
- On Alpha, we now run profclock() at hz (profhz == hz) rather than at
the slower stathz.
- On Alpha, for the TurboLaser machines that don't have an 8254
timecounter, call hardclock() directly. This removes an extra
conditional check from every clock interrupt on Alpha on the BSP.
There is probably room for even further pruning here by changing Alpha
to use the simplified timecounter we use on x86 with the lapic timer
since we don't get interrupts from the 8254 on Alpha anyway.
- On x86, clkintr() shouldn't ever be called now unless using_lapic_timer
is false, so add a KASSERT() to that affect and remove a condition
to slightly optimize the non-lapic case.
- Change prototypeof arm_handler_execute() so that it's first arg is a
trapframe pointer rather than a void pointer for clarity.
- Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.