delphij [Mon, 6 Dec 2004 15:49:52 +0000 (15:49 +0000)]
Correct two bugs that may result in incorrect CBCP response for
administrator specified number.
The implementation in our version transmits extra zero byte that is a
violation of the Microsoft PPP Callback Control Protocol section 3.2[1].
This can lead to incorrect behavior on certain devices, as reported
in bin/50613.
Confirmed with: cbcp.c in ppp's cvs, rev. 1.4 and 1.15 [2]
Submitted by: Dmitry Pryanishnikov <dmitry at atlantis.dp.ua>
PR: bin/50613
rwatson [Mon, 6 Dec 2004 12:56:38 +0000 (12:56 +0000)]
Add a basic aio functionality regression test, which simply writes and
then reads from a fairly broad range of object types: regular file,
fifo, UNIX socketpair, pty, UNIX pipe, and an md device. Not a deep
test of functionality, just a basic test that aio_write followed by
aio_read returns the correct data in a relatively timely manner.
phk [Mon, 6 Dec 2004 12:40:45 +0000 (12:40 +0000)]
Remove the kern.rootdev sysctl.
Root filessytems (like NFS) don't have an associated disk device,
and even if they had, the exact semantics would be filesystem
dependent and should be implemented there.
pjd [Mon, 6 Dec 2004 11:28:02 +0000 (11:28 +0000)]
We don't have RAIDFrame anymore and it seems gvinum doesn't use SI_SUB_RAID,
so correct stale comment. The only SI_SUB_RAID consumer is gmirror right now.
phk [Mon, 6 Dec 2004 08:31:32 +0000 (08:31 +0000)]
For reasons unknown, the nfs locking code used a fifo to send requests to
userland and a dedicated system call to get replies.
The vnode-bypass of fifos broke this into a panic.
Ditch all the magic and create a device /dev/nfslock instead, and
use that for both directions apart from the shorter path, this is
also faster because the device driver runs Giant free using the
vnode bypass.
scottl [Mon, 6 Dec 2004 08:27:10 +0000 (08:27 +0000)]
Add support for the memory-mapped PCI Express configuration mechanism. This
actually is a property of the northbridge and applies to all PCI/PCI-X/PCIe
devices in the system, though only PCIe devices will respond to registers
higher than 256. This uses per-CPU pools of temporary mappings so that
the whole 256MB of configuration space doesn't have to be mapped all at
once. While the sf_buf API was considered for this, the fact that it
requires sleep locks and can return failure made it unsuitable for this use.
For now only the Intel Grantsdale and Lindenhurst (925 and 752x) chipsets are
supported. Since there doesn't appear to be a compatible way to determine
northbridge support, new chipsets will have to be explicitely added in the
future.
alc [Mon, 6 Dec 2004 00:43:40 +0000 (00:43 +0000)]
Update the Tigon 1 and 2 driver to use the sf_buf API for implementing
zero-copy receive of jumbo frames. This eliminates the need for the
jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h.
Remove it.
Note: Zero-copy receive of jumbo frames did not work without these changes;
I believe there was insufficient locking on the jumbo vm object.
scottl [Sun, 5 Dec 2004 23:48:17 +0000 (23:48 +0000)]
Fix a number of bugs and significantly alter the command execution path to
properly support bounce buffers and resource shortages. This allows the
driver to work properly and reliably with more than 4GB of RAM. Of the
three data paths that exist in the driver, (block, CAM, ioctl), the ioctl
path has not been well tested with these changes due to difficulty with
finding an application that uses it that actually works.
Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
rwatson [Sun, 5 Dec 2004 22:53:17 +0000 (22:53 +0000)]
Convert GIANT_REQUIRED; in nfs_mountroot() to NET_ASSERT_GIANT(),
and annotate that nfs_mountroot assumes it is OK to step on the
values in the global NFSv3 diskless structure as the mountroot
function is called during a serialized part of the boot, before
any other NFS client activity occurs.
phk [Sun, 5 Dec 2004 22:41:02 +0000 (22:41 +0000)]
VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases
doesn't. Most of the implementations have grown weeds for this so they
copy some fields from mnt_stat if the passed argument isn't that.
Fix this the cleaner way: Always call the implementation on mnt_stat
and copy that in toto to the VFS_STATFS argument if different.
marcel [Sun, 5 Dec 2004 22:30:28 +0000 (22:30 +0000)]
Fix null-pointer indirect function calls introduced in the previous
commit. In the new world order, the transitive closure on the vector
operations is not precomputed. As such, it's unsafe to actually use
any of the function pointers in an indirect function call. They can
be null, and we need to use the default vector in that case.
This is mostly a quick fix for the four function pointers that are
ed explicitly. A more generic or scalable solution is likely to see
the light of day.
rwatson [Sun, 5 Dec 2004 22:08:37 +0000 (22:08 +0000)]
Pass the inpcb reference into ip_getmoptions() rather than just the
inp->inp_moptions pointer, so that ip_getmoptions() can perform
necessary locking when doing non-atomic reads.
Lock the inpcb by default to copy any data to local variables, then
unlock before performing sooptcopyout().
alc [Sun, 5 Dec 2004 21:48:11 +0000 (21:48 +0000)]
Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted
the implementation of vm_pindex_t from 32 to 64 bits. (Thus, RELENG_4 is
not affected.) The consequence of this error would be a legimate write to
an extremely large file being treated as an errant attempt to write meta-
data.
rwatson [Sun, 5 Dec 2004 19:11:09 +0000 (19:11 +0000)]
Start working through inpcb locking for ip_ctloutput() by cleaning up
modifications to the inpcb IP options mbuf:
- Lock the inpcb before passing it into ip_pcbopts() in order to prevent
simulatenous reads and read-modify-writes that could result in races.
- Pass the inpcb reference into ip_pcbopts() instead of the option chain
pointer in the inpcb.
- Assert the inpcb lock in ip_pcbots.
- Convert one or two uses of a pointer as a boolean or an integer
comparison to a comparison with NULL for readability.
glebius [Sun, 5 Dec 2004 14:30:38 +0000 (14:30 +0000)]
- Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]
Noticed by: Roman Palagin [1]
Requested by: Yuri Y. Bushmelev [2]
MFC after: 1 week
rwatson [Sun, 5 Dec 2004 13:27:30 +0000 (13:27 +0000)]
Acquire socket receive buffer mutex before appending and then waking up
a receive socket in DDP. This reduces the number of mutex operations
required to deliver to a socket by two, and is the model used in other
protocols.
dhartmei [Sun, 5 Dec 2004 12:15:43 +0000 (12:15 +0000)]
IPv6 packets can contain headers (like options) before the TCP/UDP/ICMP6
header. pf finds the first TCP/UDP/ICMP6 header to filter by traversing
the header chain. In the case where headers are skipped, the protocol
checksum verification used the wrong length (included the skipped headers),
leading to incorrectly mismatching checksums. Such IPv6 packets with
headers were silently dropped.
rse [Sun, 5 Dec 2004 09:51:48 +0000 (09:51 +0000)]
Use "ifconfig -l" instead of "list_network_interfaces all" in
ifnet_rename() to support situations where rc.conf's $network_interfaces
variable is set to an explicit list of network interfaces (instead of
the default "auto").
Using "list_network_interfaces all" resulted in using
$network_interfaces for both interface _renaming_ and interface
_configuration_ which obviously cannot work either before (if the
new name is in $network_interfaces) or after (if the old name is in
$network_interfaces) renaming the interface.
imp [Sun, 5 Dec 2004 07:55:30 +0000 (07:55 +0000)]
Start to add GIANT_REQUIRED; macros in places where giant is required
and that I've verified things seem to basically work. I was able to
boot and hot plug usb devices. Please let me know if this causes
problems for anybody.
The push down of giant has proceeded to the point that this will start
to matter more and more.
marcel [Sun, 5 Dec 2004 06:59:01 +0000 (06:59 +0000)]
Source changes to allow building a cross-debugger. Move solib.c and
solib-svr4.c to the MD makefiles because they are native files for
alpha and sparc64, but target files for amd64, i386 and ia64.
Note that kgdb(1) does not yet build as a cross-debugger due to
libkvm.
marcel [Sun, 5 Dec 2004 06:02:21 +0000 (06:02 +0000)]
o Don't limit GPT as a rank 2 provider. Allow it to be connected
anywhere in the DAG. This includes configurations that are not
allowed by the EFI specification.
o Reject a GPT partition table if it's not preceeded by a PMBR.
There's no need to preserve the MBR partitioning anymore as GPT
is mature and with the first bullet extending the applicability
of GPT, it's better to be a bit more strict.
njl [Sun, 5 Dec 2004 01:35:18 +0000 (01:35 +0000)]
Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems. It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE). Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.
kris [Sat, 4 Dec 2004 23:30:36 +0000 (23:30 +0000)]
Add more frequently-used locale directories. This is in preparation
for cleanup of pkg-plist files with respect to handling of the share/locale
subdirectories.
pjd [Sat, 4 Dec 2004 21:20:59 +0000 (21:20 +0000)]
When initializing device, set d_softc and d_no fields for all components,
because we know it then and we need it when inserting a component which
wasn't destroyed while device was running.
Reported by: Michael Handler <handler@grendel.net>
MFC after: 1 week
marius [Sat, 4 Dec 2004 14:03:45 +0000 (14:03 +0000)]
Catch up with the new device name of sab(4). The entries for tty[a,b]
can't be removed as ofw_console(4) and zs(4) use them so one has to
live with some complaints about non-existent devices at boot time and
remove the respective entries locally for now.
mdodd [Fri, 3 Dec 2004 18:21:30 +0000 (18:21 +0000)]
- Move chip ID code into separate function.
- Initialize sc->pcn_type during ATTACH as softc contents may not surivive
from PROBE.
- Print out chip-id to assist with ongoing pcn(4) debugging efforts.
rse [Fri, 3 Dec 2004 14:10:04 +0000 (14:10 +0000)]
Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".