njl [Wed, 23 Feb 2005 16:42:56 +0000 (16:42 +0000)]
Import a rewrite of p4tcc for the cpufreq(4) framework. This includes
a bugfix of clearing the On-Demand flag when going back to 100%. It
has been tested and works on an IBM R32. Note original work done by
Ted Unangst and sobomax@.
jeff [Wed, 23 Feb 2005 10:05:43 +0000 (10:05 +0000)]
- Enable SMP VFS by default on current. More users are needed to turn up
any remaining bugs. Anyone inconvenienced by this can still disable it
in the loader.
kientzle [Wed, 23 Feb 2005 06:57:04 +0000 (06:57 +0000)]
Don't return NULL if there's no error message;
return a generic text message instead.
(Someday, I'll track down all the places that
are generating errors but not recording messages. ;-/
njl [Wed, 23 Feb 2005 03:20:00 +0000 (03:20 +0000)]
If a register width is less than 8, assume the BIOS author thought it was
in units of bytes and adjust accordingly. This is found at least on the
Sony PCG-505BX.
jeff [Wed, 23 Feb 2005 00:11:14 +0000 (00:11 +0000)]
- Only the xlock holder should be calling VOP_LOCK on a vp once VI_XLOCK
has been set. Assert that this is the case so that we catch filesystems
who are using naked VOP_LOCKs in illegal cases.
jeff [Tue, 22 Feb 2005 23:59:11 +0000 (23:59 +0000)]
- Add a check for xlock in vop_lock_assert. Presently the xlock is
considered to be as good as an exclusive lock, although there is still a
possibility of someone acquiring a VOP LOCK while xlock is held.
imp [Tue, 22 Feb 2005 22:07:18 +0000 (22:07 +0000)]
Belkin F5D5020 is an OEM'd card from RACORE based on the AX88190
chipset. Add support for this card. Office Max has them on sale and
I was surprised that we didn't have it in our supported list when I
plugged it in...
jhb [Tue, 22 Feb 2005 21:52:52 +0000 (21:52 +0000)]
- Add a new quirk to indicate that pin 0 of the first I/O APIC is really
IRQ 0 and not an ExtINT pin. The MADT enumerators ignore the PC-AT flag
and ignore overrides that map IRQ 0 to pin 2 when this quirk is present.
- Add a block comment above the quirks to document each quirk so that we
can use more verbose descriptions quirks.
jhb [Tue, 22 Feb 2005 21:50:41 +0000 (21:50 +0000)]
If mixed mode is not enabled by the APIC enumerator (MPTable always does,
ACPI MADT only does if the PC-AT flag is set), then don't assume that pin 0
on the first I/O APIC is an ExtINT pin. Instead, assume that it is ISA
IRQ 0.
andre [Tue, 22 Feb 2005 17:40:40 +0000 (17:40 +0000)]
Bring back the full packet destination manipulation for 'ipfw fwd'
with the kernel compile time option:
options IPFIREWALL_FORWARD_EXTENDED
This option has to be specified in addition to IPFIRWALL_FORWARD.
With this option even packets targeted for an IP address local
to the host can be redirected. All restrictions to ensure proper
behaviour for locally generated packets are turned off. Firewall
rules have to be carefully crafted to make sure that things like
PMTU discovery do not break.
glebius [Tue, 22 Feb 2005 16:24:55 +0000 (16:24 +0000)]
Remove promisc counter from parent interface in carp_clone_destroy(),
so that parent interface is not left in promiscous mode after carp
interface is destroyed.
This is not perfect, since promisc counter is added when carp
interface is assigned an IP address. However, when address is removed
parent interface is still in promiscuous mode. Only removal of
carp interface removes promisc from parent. Same way in OpenBSD.
phk [Tue, 22 Feb 2005 15:51:07 +0000 (15:51 +0000)]
Reap more benefits from DEVFS:
List devfs_dirents rather than vnodes off their shared struct cdev, this
saves a pointer field in the vnode at the expense of a field in the
devfs_dirent. There are often 100 times more vnodes so this is bargain.
In addition it makes it harder for people to try to do stypid things like
"finding the vnode from cdev".
Since DEVFS handles all VCHR nodes now, we can do the vnode related
cleanup in devfs_reclaim() instead of in dev_rel() and vgonel().
Similarly, we can do the struct cdev related cleanup in dev_rel()
instead of devfs_reclaim().
rename idestroy_dev() to destroy_devl() for consistency.
Add LIST_ENTRY de_alias to struct devfs_dirent.
Remove v_specnext from struct vnode.
Change si_hlist to si_alist in struct cdev.
String new devfs vnodes' devfs_dirent on si_alist when
we create them and take them off in devfs_reclaim().
Fix devfs_revoke() accordingly. Also don't clear fields
devfs_reclaim() will clear when called from vgone();
Let devfs_reclaim() call dev_rel() instead of vgonel().
Move the usecount tracking from dev_rel() to devfs_reclaim(),
and let dev_rel() take a struct cdev argument instead of vnode.
Destroy SI_CHEAPCLONE devices in dev_rel() (instead of
devfs_reclaim()) when they are no longer used. (This
should maybe happen in devfs_close() instead.)
phk [Tue, 22 Feb 2005 15:06:30 +0000 (15:06 +0000)]
vp->v_id is a private field for the vfs namecache and it is a big mistake
that NFS ever started using it and an even bigger that it got copied&pasted
to nwfs and smbfs.
rwatson [Tue, 22 Feb 2005 15:03:25 +0000 (15:03 +0000)]
When prepending an LCC SNAP header to an atalk outgoing ethernet packet,
allocate the additional mbuf (if needed) using a non-sleeping memory
allocation.
phk [Tue, 22 Feb 2005 14:52:00 +0000 (14:52 +0000)]
vp->v_id is a private field for the vfs namecache and it is a big mistake
that NFS ever started using it. Long time ago I added the necessary
vhold()/vdrop() calls to replace it, but forgot to remove the v_id code.
glebius [Tue, 22 Feb 2005 14:21:59 +0000 (14:21 +0000)]
- In if_link_state_change() extract function body from if-block, to improve
readability.
- Call carp_carpdev_state() from if_link_state_change() if interface has
associated CARP interface.
rwatson [Tue, 22 Feb 2005 14:20:29 +0000 (14:20 +0000)]
Convert the aa_ifaddr timeout to a callout, and run the aarprobe callout
MPSAFE. Acquire the aarptab_mtx to make sure that the callout and msleep
in the ioctl thread don't race.
phk [Tue, 22 Feb 2005 13:56:15 +0000 (13:56 +0000)]
Neuter DRM(mapbufs) until somebody finds time to try to fix it.
It is _never_ OK to find a vnode from a struct cdev because you have
no way of telling if you get the right one. You might be in jail or
chroot for instance.
phk [Tue, 22 Feb 2005 13:39:46 +0000 (13:39 +0000)]
Neuter linux_ustat() until somebody finds time to try to fix it.
The fundamental problem is that we get only the lower 8 bits of the
minor device number so there is no guarantee that we can actually
find the disk device in question at all.
This was probably a bigger issue pre-GEOM where the upper bits
signaled which slice were in use.
The secondary problem is how we get from (partial) dev_t to vnode.
The correct implementation will involve traversing the mount list
looking for a perfect match or a possible match (for truncated
minor).
glebius [Tue, 22 Feb 2005 08:03:09 +0000 (08:03 +0000)]
Do not print kernel debugging on console. In case of serial console
this can cause a really heavy load on system. Several kernel debugging
messages can be triggered even remotely (e.g. bad ARP replies).
Use kern.warning instead, so that really significant messages still
will be printed on console.
Reviewed by: current@
MFC after: 1 week
Security: this change fixes a DoS condition, when default system
console is serial, and box is flooded with bogus ARP
packets
harti [Tue, 22 Feb 2005 07:58:53 +0000 (07:58 +0000)]
Invent the LST_FOREACH macro for looping through a list. In contrast
to the Lst_ForEach function this macro reduces the number of function
calls per invocation by N + 1 (where N is the number of list elements)
and increases code locality thereby increasing readability and
(maybe) performance.
glebius [Tue, 22 Feb 2005 07:50:02 +0000 (07:50 +0000)]
In in_pcbconnect_setup() jailed sockets are treated specially: if local
address is not supplied, then jail IP is choosed and in_pcbbind() is called.
Since udp_output() does not save local addr after call to in_pcbconnect_setup(),
in_pcbbind() is called for each packet, and this is incorrect.
So, we shall treat jailed sockets specially in udp_output(), we will save
their local address.
This fixes a long standing bug with broken sendto() system call in jails.
glebius [Tue, 22 Feb 2005 07:39:15 +0000 (07:39 +0000)]
In in_pcbconnect_setup() remove a check that route points at
loopback interface. Nobody have explained me sense of this check.
It breaks connect() system call to a destination address which is
loopback routed (e.g. blackholed).
njl [Tue, 22 Feb 2005 06:34:53 +0000 (06:34 +0000)]
Increase the maximum to wait for a transition from 1 to 10 ms. In some
modes, systems may take longer. If the status values don't match, try
matching just the lowest 8 bits if no bits above 8 are set in the desired
value. The IBM R32 has other bits set in the status register that are
irrelevant to the expected value.
imp [Tue, 22 Feb 2005 05:12:25 +0000 (05:12 +0000)]
MFp4: Optimize in/out macros. Cache the handle and tag in softc and
use them in the macros. Since the rman_get_bus{tag,handle} transitioned
from macros to function calls, this unpessimizes that conversion.
njl [Tue, 22 Feb 2005 00:40:13 +0000 (00:40 +0000)]
Set the start of the cooling time later on, when we're actually performing
the switch. Other interim tests (i.e., for minimum runtime) could
invalidate the start time. This fixes transitions to cooler states in that
now they go to the next active state (_AC0 -> _AC1) instead of going
straight to off (_AC0 -> off).
bmah [Tue, 22 Feb 2005 00:29:22 +0000 (00:29 +0000)]
New release notes: SysV IPC objects with MAC support, auxio(4), pcii,
rtc (+MFC), uart(4) default tty driver for sparc64 (+MFC),
snd_audiocs(4) (+MFC), cp(4)/ctau(4)/cx(4) MPSAFE (+MFC), em(4)
hardware VLAN support disabled by default (+MFC), fxp(4) flow control
disabled by default (+MFC), sppp(4) FR support (+MFC), libgpib.
njl [Mon, 21 Feb 2005 23:38:41 +0000 (23:38 +0000)]
Since the GPE handler is directly called by ACPI-CA and it may have unknown
locks held, specify the ACPI_ISR flag to keep it from acquiring any more
mutexes (which could potentially sleep.) This should fix "could sleep"
warning messages on the following path:
rwatson [Mon, 21 Feb 2005 21:58:17 +0000 (21:58 +0000)]
In the current world order, solisten() implements the state transition of
a socket from a regular socket to a listening socket able to accept new
connections. As part of this state transition, solisten() calls into the
protocol to update protocol-layer state. There were several bugs in this
implementation that could result in a race wherein a TCP SYN received
in the interval between the protocol state transition and the shortly
following socket layer transition would result in a panic in the TCP code,
as the socket would be in the TCPS_LISTEN state, but the socket would not
have the SO_ACCEPTCONN flag set.
This change does the following:
- Pushes the socket state transition from the socket layer solisten() to
to socket "library" routines called from the protocol. This permits
the socket routines to be called while holding the protocol mutexes,
preventing a race exposing the incomplete socket state transition to TCP
after the TCP state transition has completed. The check for a socket
layer state transition is performed by solisten_proto_check(), and the
actual transition is performed by solisten_proto().
- Holds the socket lock for the duration of the socket state test and set,
and over the protocol layer state transition, which is now possible as
the socket lock is acquired by the protocol layer, rather than vice
versa. This prevents additional state related races in the socket
layer.
This permits the dual transition of socket layer and protocol layer state
to occur while holding locks for both layers, making the two changes
atomic with respect to one another. Similar changes are likely require
elsewhere in the socket/protocol code.
Reported by: Peter Holm <peter@holm.cc>
Review and fixes from: emax, Antoine Brodin <antoine.brodin@laposte.net>
Philosophical head nod: gnn
New release notes: EN-05:01.nfs (+MFC), EN-05:02.sk (+MFC),
EN-05:03.ipi (+MFC).
To be consistent with other documentation, the release documentation
will henceforth include the one-word keyword (e.g. "fetch", "procfs"
above) in the names of advisories and errata.
bmah [Mon, 21 Feb 2005 20:19:03 +0000 (20:19 +0000)]
New release notes: MemGuard, psm(4) improved Synaptics Touchpad
support, hme(4) MPSAFE (+MFC), random port number allocation fix,
IPX/SPX locking, gshsec(8), dump(8) -n, some ipfw(8) abbreviated
options deprecated, libarchive ISO and ZIP support, rpmatch(3),
telnet(1)/telnetd(8) -S, manpage cleanup.
MFCs noted: cd9660 less chatty,
Modified release notes: Fix typo (s/icss/ichss/) [1], add missing
"driver" in a couple of notes.
das [Mon, 21 Feb 2005 17:44:57 +0000 (17:44 +0000)]
Use double arithmetic instead of simulating it with two floats. This
results in a performance gain on the order of 10% for amd64 (sledge),
ia64 (pluto1), i386+SSE (Pentium 4), and sparc64 (panther), and a
negligible improvement for i386 without SSE. (The i386 port still
uses the hardware instruction, though.)
mlaier [Mon, 21 Feb 2005 17:30:10 +0000 (17:30 +0000)]
Only send packet to bpf if we are committed to send it. Previously it was
possible that the same packet would show up multiple times. This poses some
constraints on the TBD locking for snc(4) (see comment).
mlaier [Mon, 21 Feb 2005 17:11:09 +0000 (17:11 +0000)]
Don't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. It
was a bad idea, but since it is done like this in the vendor source we keep
it around for older versions. As a safe guard against future misuse we don't
even define CALLOUT_INITIALIZER anymore.
This fixes ALTQ after callout_init_mtx() and takes altq_var.h off the vendor
branch.
Submitted by: Divacky Roman <xdivac02NOstud.fit.vutbrSPAMcz> (w/ changes)
hrs [Mon, 21 Feb 2005 16:45:49 +0000 (16:45 +0000)]
New release notes:
prompt parameter support in autoboot loader command,
uplcom(4) CTS support,
dc(4) ALTQ support,
IPv6 MTU feedback disabled,
ipfw(8) ALTQ classification and tagging, and
newsyslog -d option.
Update release notes:
F/pc98 still uses OLDCARD[1], and
fix some typos:
s/compatability/compatibility
s/behaviour/behavior/.
das [Mon, 21 Feb 2005 16:04:23 +0000 (16:04 +0000)]
Remove the i387 versions of atan(), atan2(), and atan2f().
They are slower than the MI routines on modern hardware,
except for degenerate cases such as the Pentium 4.