Commit Graph

112712 Commits

Author SHA1 Message Date
harti
cc70147d10 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.
2005-02-22 07:58:53 +00:00
glebius
310c8c169a 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.

PR:		kern/26506
Reviewed by:	rwatson
MFC after:	2 weeks
2005-02-22 07:50:02 +00:00
glebius
83e2511b96 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).

Reviewed by:	silence on net@
MFC after:	2 weeks
2005-02-22 07:39:15 +00:00
njl
5cbcec83c6 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.
2005-02-22 06:34:53 +00:00
njl
18eb415fc0 Support disabling individual cpufreq drivers with hints, e.g.,
hint.ichss.0.disabled="1"
2005-02-22 06:31:45 +00:00
imp
49d4d6052b 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.
2005-02-22 05:12:25 +00:00
green
acf420c37c Do not fail to initialize callouts (on SMP only) -- it leads to crashing. 2005-02-22 04:27:05 +00:00
imp
2e641b9520 Minor optimization of calling enable_16bit. We always have to call it
and error is going to be right for both forks of the if, so just
return that.
2005-02-22 03:37:04 +00:00
delphij
463d854200 MFS5: Minor style(9) tweak. 2005-02-22 02:56:42 +00:00
sam
8b3ca8995c remove dead code
Submitted by:	Coverity Prevent analysis tool
2005-02-22 01:26:48 +00:00
njl
8bb4dc961a 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).

Submitted by:	Alexandre "Sunny" Kovalenko (Alex.Kovalenko / verizon.net)
2005-02-22 00:40:13 +00:00
bmah
d715804966 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.
2005-02-22 00:29:22 +00:00
njl
048c9a791d 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:

    msleep()
    AcpiOsWaitSemaphore()
    AcpiUtAcquireMutex()
    AcpiDisableGpe()
    EcGpeHandler()
    AcpiEvGpeDispatch()
    AcpiEvGpeDetect()
    AcpiEvGpeDetect()
    AcpiEvSciXruptHandler()
2005-02-21 23:38:41 +00:00
rwatson
a584d6bac9 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
2005-02-21 21:58:17 +00:00
ru
90a98ed5e7 Fixed compilation warnings. 2005-02-21 21:02:25 +00:00
bmah
2c42cc51df MFR4_11: SA-04:16.fetch (+MFC), SA-04:17.procfs (+MFC).
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.
2005-02-21 20:53:57 +00:00
bmah
ada849da43 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.

Submitted by:	njl [1]
2005-02-21 20:19:03 +00:00
fjoe
58ce51bc02 Bump __FreeBSD_version for vswprintf(3) fix. Some ports depend on it. 2005-02-21 19:43:18 +00:00
fjoe
18f4748f0e Fix EOVERFLOW detection in vswprintf(3)
Reviewed by:	tjr
MFC after:	2 weeks
2005-02-21 19:41:44 +00:00
das
a013256746 Use hardware instructions for sqrt() and sqrtf(). 2005-02-21 18:27:57 +00:00
das
348e558ea8 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.)
2005-02-21 17:44:57 +00:00
mlaier
51c8edd2a7 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).

Obtained from:	DragonFlyBSD
Submitted by:	Joerg Sonnenberger
Reviewed by:	rwatson
2005-02-21 17:30:10 +00:00
mlaier
d8941ec173 Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" with
renamed interfaces.

PR:		kern/77645
Reported by:	Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by:	yongari
MFC after:	3 days
2005-02-21 17:20:00 +00:00
mlaier
182c8a8b7d 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)
2005-02-21 17:11:09 +00:00
hrs
394d288af6 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/.

Spotted by:	nyan[1]
2005-02-21 16:45:49 +00:00
das
809e3d1502 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.

PR:		67469
2005-02-21 16:04:23 +00:00
ps
9de5ed2486 Fix an overflow when calculating the number of kilobytes from the
number of pages.

Obtained from:	Yahoo!
2005-02-21 14:35:00 +00:00
rwatson
6192656b5d When aborting a UNIX domain socket bind() because VOP_CREATE() failed,
make sure to call vn_finished_write(mp) before returning.

MFC after:	3 days
2005-02-21 14:21:50 +00:00
harti
11a97cc4a9 Style: fix indendation to be 8 and use tabulators. Fix lines longer than
80 characters and slightly reorder functions to get rid of static
prototypes.
2005-02-21 13:36:22 +00:00
mr
46022e907c Document the terabyte "-s" parameter in the usage string.
Split the usage line to not exceed 80 chars.
2005-02-21 09:09:07 +00:00
harti
752cf25142 Forgot to set *freePtr to FALSE in another place.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-21 08:10:21 +00:00
harti
d0a8599bcf Fix a bug in handling archive members: when a member was not found
when looking into an already hashed archive, the code tried to use
the name shortened to the maximum length allowed for the archive.
Unfortunately it passed a buffer of junk to the hashing routine when
the name actually wasn't too long. Theoretically this could lead to
a false positive.
2005-02-21 08:06:34 +00:00
imp
d6158b2d21 Minor style(9)isms. 2005-02-21 07:22:50 +00:00
scottl
0ff8ddd038 - Remove dead code.
- Protect against negative values as array indexes.

Submitted by: Coverity Prevent analysis tool
2005-02-21 05:17:29 +00:00
scottl
12ea03770d Check for BIOS version 3.0 as well as 3.1.
Submitted by: Coverity Prevent analysis tool
2005-02-21 00:32:03 +00:00
scottl
3c8e6b027c Reference a pointer correctly when copying to it's location.
Submitted by: Coverity Prevent analysis tool
2005-02-21 00:28:36 +00:00
scottl
86862c1cfa Check the correct periph pointer after search for it.
Submitted by: Coverity Prevent analysis tool
2005-02-20 23:51:20 +00:00
scottl
90d564346f Protect against trying to free a non-existant peripheral.
Submitted by: Coverity Prevent analysis tool
MFC After: 3 days
2005-02-20 23:45:49 +00:00
njl
e28062fb9c Don't attach ichss if est is present. On systems that seem to support both,
the multi-setting EST is preferable.
2005-02-20 23:41:20 +00:00
rwatson
4f168421d3 style(9)-ize function headers, remove use of 'register'.
MFC after:	3 days
2005-02-20 23:22:13 +00:00
kan
d42d823cbc Restore r1.2 change to use TARGET_ARCH.
Submitted by:	kris
2005-02-20 23:06:03 +00:00
das
3094a472ae Remove VFS_START(). Its original purpose involved the mfs filesystem,
which is long gone.

Discussed with:	mckusick
Reviewed by:	phk
2005-02-20 23:02:20 +00:00
das
652a55ac26 Replace the workaround for a deadlock bug in Coda with a different
workaround that does not rely on vfs_start().
2005-02-20 23:01:57 +00:00
kan
a3edc3c04e Attempt to make kgdb little more useful and easy to use. Properly initialize
it to recognise what ABI  to use on amd64 (and possibly others) platform.
Display PID and process name as a part of the 'info threads' output, TIDs
alone are too confusing. Introduce new commmands 'tid <tid>' and 'proc <pid>'
to accompany gdb's default 'thread <thread num>' to make the task of switching
between different contexts easier.
2005-02-20 22:55:07 +00:00
das
cd1b2aaaaa Remove i387 versions of asin() and acos(). Although the hardware
instruction was faster on the 486, it's slower than our MD version on
modern processors.

Determined by:	bde
PR:		67469
2005-02-20 22:51:08 +00:00
das
c2d8acd776 Remove the float versions of the i387 trig functions obtained from
NetBSD.  They're buggy, giving particularly for inputs larger in
magnitude than 2**63.

Noticed by:	bde
PR:		67469
2005-02-20 22:50:40 +00:00
bmah
3eb22bc8c0 New release notes: cpufreq(4), uaudio(4) improvements, GENERIC SCSI
boot-time probe shorter, ACPI-CA 20041119, FILE 4.12, lukemftp
20050219.

Resorted tzdata note.
2005-02-20 22:22:32 +00:00
rwatson
bf532e31d9 Add a simple regression test for stream UNIX domain sockets and the
bind()/connect() system calls, which is intended to confirm that the
right successes and errors occur when rendezvousing via the file system
name space.
2005-02-20 22:21:53 +00:00
cognet
81752be77a MFp4: get the code that set the pc correctly to work, remove a few IQ31244
specific mappings from locore.S, re-organize iq31244_machdep.c to work with
the new locore.S

Spotted out by:	jmg
2005-02-20 21:34:59 +00:00
imp
7ddf025729 Be more verbose on errors with CIS reading. This should be a noop, but
appears to fix the ath problem that had been reported.  I don't see how
it can, so there's likely some other hidden bug.
2005-02-20 20:36:16 +00:00