Marcel Moolenaar [Fri, 15 Aug 2003 05:52:48 +0000 (05:52 +0000)]
Fix the generation of coredumps. We did not take the dirty registers
that were on the kernel stack into account. For now we write them
out to the register stack of the process before creating the dump.
This however is not the final solution. The problem is that we may
invalidate the coredump by overwriting vital information due to an
invalid backing store pointer. Instead we need to write the dirty
registers to an unused region of VM which will result in a seperate
segment in the coredump. For now we can at least get to all the
registers from a coredump.
Marcel Moolenaar [Fri, 15 Aug 2003 05:46:33 +0000 (05:46 +0000)]
Add an instruction group break after the move to application register
and the move to control register to avoid dependency violations when
these functions are used. Note that explicit data and instruction
serialization also need to be in a subsequent instruction group.
This too requires that we have an igrp break here.
Marcel Moolenaar [Fri, 15 Aug 2003 05:40:59 +0000 (05:40 +0000)]
Introduce two machine specific ptrace(2) requests: PT_GETKSTACK and
PT_SETKSTACK. These requests allow the tracing process to access the
dirty registers of the traced process that are on the kernel stack.
Note that there's currently no way to access the rnat register for
those dirty registers that are not (yet) covered by a nat collection
point. The interface for this is still being slept on.
Also note that implied by these requests is the division of work:
The tracing process has to keep track of where registers are spilled
and is responsible to figure out where the NaT bit of the stacked
registers are at any time during the execution of the traced process.
The kernel provides the interfaces but will not abstract the fact
that the register stack can be split. This model does not follow
the approach taken in Linux where PT_PEEK and PT_POKE deals with
this automagically.
Marcel Moolenaar [Fri, 15 Aug 2003 05:25:06 +0000 (05:25 +0000)]
Add or finish support for machine dependent ptrace requests. When we
check for permissions, do it for all requests, not the known requests.
Later when we actually service the request we deal with the invalid
requests we previously caught earlier.
This commit changes the behaviour of the ptrace(2) interface for
boundary cases such as an unknown request without proper permissions.
Previously we would return EINVAL. Now we return EBUSY or EPERM.
Platforms need to define __HAVE_PTRACE_MACHDEP when they have MD
requests. This makes the prototype of cpu_ptrace() visible and
introduces a call to this function for all requests greater or
equal to PT_FIRSTMACH.
Greg Lehey [Fri, 15 Aug 2003 04:36:53 +0000 (04:36 +0000)]
vinum_scandisk:
Correctly handle additional disks without BIOS partition tables.
Previously, vinum_scandisk stopped scanning additional disks for
native partitions after any good partition was found. This applies
to all platforms, but was a particular problem on systems without
BIOS partition tables.
Nate Lawson [Fri, 15 Aug 2003 02:17:23 +0000 (02:17 +0000)]
Don't install a system notify handler. Move the device notify handler
installation to just before we're ready to handle events. Make a loop
more readable (no functional change).
Nate Lawson [Fri, 15 Aug 2003 02:10:38 +0000 (02:10 +0000)]
Fix a couple changes that were incorrect in updating for 0619. Only unlock
the hardware mutex if it is held. Re-add calls to Enable/Clear fixed events.
This is not known to have caused problems. Bug symptoms might have included
instability after an aborted suspend attempt or power/sleep buttons not
being enabled.
Cameron Grant [Thu, 14 Aug 2003 21:16:46 +0000 (21:16 +0000)]
add a read-only sysctl to display the number of entries in the fixed size
kobj global method table; also kassert that the table has not overflowed
when defining a new method.
there are indications that the table is being overflowed in certain
situations as we gain more kobj consumers- this will allow us to check
whether kobj is at fault. symptoms would be incorrect methods being called.
Robert Watson [Thu, 14 Aug 2003 18:55:31 +0000 (18:55 +0000)]
Commit 1 of 2 to fix ffsinfo(8) for UFS2.
Update ffsinfo(8) to use new UFS2 support in the growfs(8) debugging
functions. Largely consists of renaming fields and types to be aware
of the UFS1/UFS2 distinction, relying on libufs(3) to open and sanity
check the device/file/label accessed.
Since libufs(3) now handles label/UFS interactions, remove -L argument.
Note: when submitted, this patch had substantial style changes. I've
attempted to remove the restyling from the patch to separate the
functional and style changes.
Bruce A. Mah [Thu, 14 Aug 2003 18:52:45 +0000 (18:52 +0000)]
Begin snipping out the lists of specific devices from the Hardware
Notes. These duplicate information that ideally should live in the
manual pages for individual drivers, and can easily become
out-of-date. (This in fact is already the case.)
Hypertext versions of the hardware notes already contain links to
on-line versions of the manual pages.
The first two drivers to get this treatment are amr(4) and aac(4).
Robert Watson [Thu, 14 Aug 2003 18:40:59 +0000 (18:40 +0000)]
Commit 1 of 2 to fix ffsinfo(8) for UFS2.
Add support for UFS2 to the UFS debugging routines in growfs; required
to update ffsinfo(8) for UFS2. A variety of types and fs variables are
renamed to reflect UFS1/2 structures. Also, the print routines for
inodes are now split into separate UFS1 and UFS2 versions. We now
define dbg_dump_csum_total(), but lose the printing of rotational
information since that's not present in UFS2. In the future, we may
want to re-add this functionality to print it solely for UFS1.
Hartmut Brandt [Thu, 14 Aug 2003 15:27:32 +0000 (15:27 +0000)]
Now that routes for IP over ATM may look much more complex than before,
use the atmconfig(8) utility instead of route(8) to install those routes.
For this we need a new rc.conf variable natm_static_routes that works
just like static_routes except that the referenced routes use the syntax
of atmconfig(8).
Robert Watson [Thu, 14 Aug 2003 15:26:44 +0000 (15:26 +0000)]
Add p_candebug() check to access a process map file in procfs; limit
access to map information for processes that you wouldn't otherwise
have debug rights on.
Pierre Beyssac [Thu, 14 Aug 2003 14:15:16 +0000 (14:15 +0000)]
Add support for the newer Moxa PCI 8-port, 16550-compatible based
CP-168U board. It initializes and attaches in the same way as the
older (but higher performance) C168H. The only difference is the
board ID, which is 0x1681.
David Greenman [Thu, 14 Aug 2003 11:02:03 +0000 (11:02 +0000)]
Removed check of st_rdev changing in the -F support. st_rdev for regular
files is usually the first direct block pointer. Since FreeBSD does
automatic block reallocation to reduce filesystem fragmentation, the
file being tailed can be relocated to different blocks 'on-the-fly',
making the check for st_rdev unreliable. The result of this bug is
tail -F pseudo-randomnly thinking the file was rotated when it wasn't,
and as a result, spews out the entire file trying to catch up.
Josef Karthauser [Thu, 14 Aug 2003 00:15:23 +0000 (00:15 +0000)]
Crank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
the Palm device and the USB host controller deadlock. The USB host
controller is expecting an early-end-of-transmission packet with 0
data, and the Palm doesn't send one because it's already communicated
the amount of data it's going to send in a header (which ucom/uvisor
are oblivious to). This is the problem that has been known on the
pilot-link lists as the "[Free]BSD USB problem", but not understood.
Submitted by: Nathan J. Williams <nathanw@MIT.EDU>
Bill Paul [Wed, 13 Aug 2003 22:39:21 +0000 (22:39 +0000)]
Set the TX hardware checksum offload bits on all the descriptors of a
multi-fragment transmission. I'm not sure if this is a bug or a requirement
that I overlooked with going through the documentation, but the sample
8169 NIC that I have seems to require it at least some of the time or
else it botches TCP checksums on segments that span multiple descriptors.
Sam Leffler [Wed, 13 Aug 2003 22:09:44 +0000 (22:09 +0000)]
Delay creating ic_bss until after the super-class has a chance
to override the method pointers for manipulating nodes; this fixes
a problem where the ic_bss node was not being created properly
for the ath driver causing the driver to scribble on random memory.
Sam Leffler [Wed, 13 Aug 2003 21:49:35 +0000 (21:49 +0000)]
Use IEEE80211_RATE_MAXSIZE instead of IEEE80211_RATE_SIZE to validate the
rate set element id from an AP. This allows stations to associate with
AP's that violate the 802.11 spec by sending >8 rates. This corrects a
recent regression; older code did likewise.
Sam Leffler [Wed, 13 Aug 2003 21:29:35 +0000 (21:29 +0000)]
Close a race where ath_intr is installed and may be called before
the HAL is setup: use sc_invalid to discard such entries into
ath_intr. This can easily happen if the device is assigned a shared IRQ.
Sam Leffler [Wed, 13 Aug 2003 20:42:53 +0000 (20:42 +0000)]
o add missing {}'s that to safe_dmamap_uniform that caused extraneous copies
for partly-aligned operations through /dev/crypto (unlikely)
o add missing case in iov code that never showed up because of the above bug
Submitted by: "Jason L. Wright" <jason@thought.net>
MFC after: 3 days
Alan Cox [Wed, 13 Aug 2003 20:01:38 +0000 (20:01 +0000)]
- The vm_object pointer in pipe_buffer is unused. Remove it.
- Check for successful initialization of pipe_zone in pipeinit()
rather than every call to pipe(2).
Bosko Milekic [Wed, 13 Aug 2003 18:37:25 +0000 (18:37 +0000)]
Add LIST_FOREACH_SAFE, which is like LIST_FOREACH but allows you
to walk the list and remove the current item and destroy/free it.
Alexander Kabaev will likely do the equivalent for the other list
types, but I just happened to have this one sitting in a local
non-FreeBSD tree already.
Add the Dell PERC 3/DCL to the list of supported devices. This has been
in the hardware notes for a long time, but was never added to this
manual page.
Hartmut Brandt [Wed, 13 Aug 2003 10:20:57 +0000 (10:20 +0000)]
The syncache has made use of TCPDEBUG problematic, because the SYN
segments are lost for the application. This broke, for example,
ports/benchmarks/dbs which needs the SYN segment to filter the
contents of the trace buffer for the connection it is interested in.
This patch makes the SYN segments available again. Unfortunately they
are now associated with the listening socket instead of the new one, so
a change to applications is required, but without this patch it wouldn't
work altogether.
Hartmut Brandt [Wed, 13 Aug 2003 08:50:42 +0000 (08:50 +0000)]
The tcp_trace call needs the length of the header. Unfortunately the
code has rotten a bit so that the header length is not correct at
the point when tcp_trace is called. Temporarily compute the correct
value before the call and restore the old value after. This makes
ports/benchmarks/dbs to almost work.
Hartmut Brandt [Wed, 13 Aug 2003 08:46:54 +0000 (08:46 +0000)]
A number of patches in the last years have created new return paths
in tcp_input that leave the function before hitting the tcp_trace
function call for the TCPDEBUG option. This has made TCPDEBUG mostly
useless (and tools like ports/benchmarks/dbs not working). Add
tcp_trace calls to the return paths that could be identified in this
maze.
Hartmut Brandt [Wed, 13 Aug 2003 07:42:07 +0000 (07:42 +0000)]
Implement two command line options that allow one to change the
file descriptors that are used for input and output. That allows
one, for example, to use nghook to bi-directionally pipe the
input and output into/from another non-netgraph-aware program.
Hartmut Brandt [Wed, 13 Aug 2003 07:35:07 +0000 (07:35 +0000)]
Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address
some process is waiting on.
A small statistics tool for gauging the statistical significance
of data from benchmarks etc. Implements "Student's t" for various
confidence levels, defaults to 95%.
If your benchmarks are not significant at the 95% confidence level,
we don't want to hear about it.
Marcel Moolenaar [Wed, 13 Aug 2003 03:59:18 +0000 (03:59 +0000)]
Don't run verify directly as that would require the perl script to
have execute permissions. Run "perl verify" instead. Replace all
occurences of the hardcoding of ./verify with $(VERIFY) to allow
it to be overridden as well.
Marcel Moolenaar [Wed, 13 Aug 2003 03:20:10 +0000 (03:20 +0000)]
Don't use VM_MIN_KERNEL_ADDRESS to check if the faulting address is
in user space or kernel space. VM_MIN_KERNEL_ADDRESS starts after the
gateway page, which means that improper memory accesses to the gateway
page while in user mode would panic the kernel. Use VM_MAX_ADDRESS
instead. It ends before the gateway page. The difference between
VM_MIN_KERNEL_ADDRESS and VM_MAX_ADDRESS is exactly the gateway page.
Marcel Moolenaar [Wed, 13 Aug 2003 02:49:50 +0000 (02:49 +0000)]
Put an instruction group break between the move to ar.rnat and the
move to ar.rsc. The RSE must be in enforced lazy mode when writing
to RSE modifyable registers. In this case we restore the RSE NaT
collection register ar.rnat. I have seen 2 general exception faults
on pluto1 now that indicate that the move to ar.rsc has already
happened prior to the move to ar.rnat, meaning that the RSE is not
in enforced lazy mode anymore. The ia64 dependency and instruction
ordering rules seem to allow having both registers written to in
the same instruction group, provided ar.rsc is written to later than
ar.rnat (based on the ordering semantics). It appears that we may
be pushing our luck. For now, put them in seperate cycles (by means
of the instruction group break). If we ever get a general exception
fault on the move to ar.rnat again, we have definite proof that
something else is fishy.
John Baldwin [Tue, 12 Aug 2003 19:33:36 +0000 (19:33 +0000)]
- Convert Alpha over to the new calling conventions for cpu_throw() and
cpu_switch() where both the old and new threads are passed in as
arguments. Only powerpc uses the old conventions now.
- Update comments in the Alpha swtch.s to reflect KSE changes.