marius [Tue, 28 Mar 2006 20:25:46 +0000 (20:25 +0000)]
- Move the check for too high HZ values from tick_init() to tick_start()
as we have to call tick_init() before cninit() in order to provide the
low-level console drivers with a working DELAY() which in turn means we
cannot use panic() in tick_init().
- s,to high, too high, in the panic string
Inspired by: kmacy's sun4v changes
MFC after: 3 days
simon [Tue, 28 Mar 2006 18:28:33 +0000 (18:28 +0000)]
Remove redundant ike rc.d script, since we do not have an IPsec IKE
daemon in the base system and all the IKE daemons in the Ports
Collection has their own rc.d script.
cognet [Tue, 28 Mar 2006 15:30:42 +0000 (15:30 +0000)]
Don't call audit_logout() if pwd is NULL, as audit_logout() attempts to
dereference it.
This will happen if we ^D at the Login: prompt without having provided a
valid login before.
Set pwd to NULL on bad login attempts to prevent audit_logout() from being
called for a user which didn't actually log on.
Reported by: Jerome Magnin jethro at docisland dot org
des [Tue, 28 Mar 2006 14:32:38 +0000 (14:32 +0000)]
Revert previous commit at davidxu's insistance. Instead, use __DECONST
(argh!) and rearrange the prototypes to make it clear that _umtx_op()
is not deprecated.
dwmalone [Tue, 28 Mar 2006 12:51:22 +0000 (12:51 +0000)]
This comment on various IPPORT_ defines was copied from in.h and
probably never fully applied to IPv6. Over time it has become more
stale, so replace it with something more up to date.
rwatson [Tue, 28 Mar 2006 10:16:38 +0000 (10:16 +0000)]
Remove manual assignment of m_pkthdr from one mbuf to another in
ipsec_copypkt(), as this is already handled by the call to M_MOVE_PKTHDR(),
which also knows how to correctly handle MAC m_tags. This corrects a panic
when running with MAC and KAME IPSEC.
PR: kern/94599
Submitted by: zhouyi zhou <zhouyi04 at ios dot cn>
Reviewed by: bz
MFC after: 3 days
des [Tue, 28 Mar 2006 09:18:34 +0000 (09:18 +0000)]
The undocumented and deprecated system call _umtx_op() takes two pointer
arguments. The first one is never used (all callers pass in 0); the
second is sometimes used to pass in a struct timespec * which is used as
a timeout and never modified. Constify that argument so callers can pass
a const struct timespec * without jumping through hoops.
davidxu [Mon, 27 Mar 2006 23:50:21 +0000 (23:50 +0000)]
Remove priority mutex code because it does not work correctly,
to make it work, turnstile like mechanism to support priority
propagating and other realtime scheduling options in kernel
should be available to userland mutex, for the moment, I just
want to make libthr be simple and efficient thread library.
sam [Mon, 27 Mar 2006 18:15:24 +0000 (18:15 +0000)]
Add eapol_version config parameter so folks with clients that (bogusly)
require the authenticator announce EAPOL version 1 don't have to hack
the code to get a working setup.
Discussed with Jouni; he's committed a similar set of changes to
his devel branch and I sent him these changes so I'm committing
this on the vendor branch in the expectation it will appear in
the next import.
jhb [Mon, 27 Mar 2006 15:59:48 +0000 (15:59 +0000)]
If the XSDT address in the RSDP for an ACPI 2.0 machine is NULL, then fall
back to using the RSDT instead. ACPI-CA already follows this same strategy
as a workaround for yet another instance of brain-damaged BIOS writers.
cognet [Mon, 27 Mar 2006 12:56:29 +0000 (12:56 +0000)]
*sigh*
Move the -lbsdxml after -lgeom, so that ld doesn't get confused and pretend
he can't find the symbol from libbsdxml needed in libgeom.
This should fix the rescue build breakage.
rwatson [Mon, 27 Mar 2006 09:10:09 +0000 (09:10 +0000)]
Add a simple netipx TODO list to the end of README, since there are a
number of problems with netipx that I have not yet resolved, and I
don't want them lost track of.
sam [Mon, 27 Mar 2006 05:22:35 +0000 (05:22 +0000)]
implement set(IEEE80211_IOC_STA_STATS) for hostapd; for
now just make it clear station statistics (could read
a stat block and assign to caller can do partial changes)
rwatson [Mon, 27 Mar 2006 00:48:21 +0000 (00:48 +0000)]
In spx_output(), use M_DONTWAIT instead of M_TRYWAIT, as we hold the
ipxpcb mutex. Contrary to the comment, even in 4.x this was unsafe,
as parallel use of the socket by another process would result in pcb
corruption if the mbuf allocation slept.
wkoszek [Mon, 27 Mar 2006 00:46:22 +0000 (00:46 +0000)]
For now, bring back some of the old bits as a fix for specifying md(4)
device number at creation time with -u option. Together with XMLizing
mdconfig(8), I broke this functionality.
This change is temporary. Complete fix will be commited soon.
rwatson [Mon, 27 Mar 2006 00:03:37 +0000 (00:03 +0000)]
Add spxabort, a simple netipx/spx regression test that triggers
pru_abort() by closing a listen socket while completed connections are
presenting in its listen queue. Unfortunately, it's difficult to
trigger the other two pru_abort() cases using user APIs, so they are
not covered by this test.
jasone [Sun, 26 Mar 2006 23:41:35 +0000 (23:41 +0000)]
Allow the 'n' option to decrease the number of arenas below the default,
to as little as one arena. Also, limit the number of arenas to avoid a
potential invariant violation in base_alloc().
wkoszek [Sun, 26 Mar 2006 23:21:11 +0000 (23:21 +0000)]
Teach md(4) and mdconfig(8) how to understand XML. Right now there won't be
a problem with listing large number of md(4) devices. Either 'list' or
'query' mode uses XML.
Additionally, new functionality was introduced. It's possible to pass
multiple devices to -u:
rwatson [Sun, 26 Mar 2006 22:44:37 +0000 (22:44 +0000)]
Add a sysctl, regression.sonewconn_earlytest, which when options
REGRESSION is enabled, allows user space to dictate that sonewconn()
should skip it's "skip the hard work" check to see if the listen
queue is full, and instead proceed with allocation of a socket and
trimming of the overflowed queue. This makes it easier to test the
queue overflow logic.
cognet [Sun, 26 Mar 2006 22:03:43 +0000 (22:03 +0000)]
Implement pmap_object_init_pt() the way it is on sparc64/alpha, by doing
nothing except asserting the vm object is locked, and a device object,
instead of a useless printf.
rwatson [Sun, 26 Mar 2006 19:37:37 +0000 (19:37 +0000)]
In various SPX protocol entry points from the socket layer, check
IPXP_DROPPED before continuing, and return EINVAL or ECONNRESET if
it is flagged. It's unclear why each situation should be one or
the other, but it is copied from netinet which has the same bugs.
rwatson [Sun, 26 Mar 2006 19:10:27 +0000 (19:10 +0000)]
Add simple regression test to ping pong a data packet over SPX in stream
mode. Support both connection via connect() and sendto(), but don't
compile in sendto() for now, since netipx doesn't appear to actually
implement that (doh).
rwatson [Sun, 26 Mar 2006 18:25:53 +0000 (18:25 +0000)]
Add a simple IPX datagram regression test, which opens two IPX datagram
sockets, binds a local port, sends a datagram, and confirms that it is
received.
rwatson [Sun, 26 Mar 2006 17:42:04 +0000 (17:42 +0000)]
Add a short README with configuration hints to get the netipx regression
tests up and running. This is likely a message to myself in six months
when I've completely forgotten how.
rwatson [Sun, 26 Mar 2006 15:49:35 +0000 (15:49 +0000)]
Modify ipxsocket regression test to create and close sockets several
times, with variable length sleeps between socket() and close(). This
will help to ensure that IPX/SPX timers fire while the sockets are
open, and hence have PCB's on the IPX pcb list, so that if timers are
going to stumble over PCB types they don't expect, it will happen as
part of this test.
rwatson [Sun, 26 Mar 2006 15:41:44 +0000 (15:41 +0000)]
Add a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark them
as belonging to SPX. This replaces the implicit assumption that the cb
pointer for non-SPX pcb's will be NULL. This isn't required in TCP/IP
as different pcb lists are maintained for different IP protocols; IPX
stores all pcbs on the same global ipxpcb_list.
jkoshy [Sun, 26 Mar 2006 12:20:54 +0000 (12:20 +0000)]
MFP4: Support for profiling dynamically loaded objects.
Kernel changes:
Inform hwpmc of executable objects brought into the system by
kldload() and mmap(), and of their removal by kldunload() and
munmap(). A helper function linker_hwpmc_list_objects() has been
added to "sys/kern/kern_linker.c" and is used by hwpmc to retrieve
the list of currently loaded kernel modules.
The unused `MAPPINGCHANGE' event has been deprecated in favour
of separate `MAP_IN' and `MAP_OUT' events; this change reduces
space wastage in the log.
Bump the hwpmc's ABI version to "2.0.00". Teach hwpmc(4) to
handle the map change callbacks.
Change the default per-cpu sample buffer size to hold
32 samples (up from 16).
Increment __FreeBSD_version.
libpmc(3) changes:
Update libpmc(3) to deal with the new events in the log file; bring
the pmclog(3) manual page in sync with the code.
pmcstat(8) changes:
Introduce new options to pmcstat(8): "-r" (root fs path), "-M"
(mapfile name), "-q"/"-v" (verbosity control). Option "-k" now
takes a kernel directory as its argument but will also work with
the older invocation syntax.
Rework string handling in pmcstat(8) to use an opaque type for
interned strings. Clean up ELF parsing code and add support for
tracking dynamic object mappings reported by a v2.0.00 hwpmc(4).
Report statistics at the end of a log conversion run depending
on the requested verbosity level.
Reviewed by: jhb, dds (kernel parts of an earlier patch)
Tested by: gallatin (earlier patch)
rwatson [Sun, 26 Mar 2006 11:30:31 +0000 (11:30 +0000)]
Define two new inpcb flags in the inp_vflag field, which for whatever
reason, seems to be where new flags are getting defined:
INP_DROPPED - The protocol has terminated this connection and the socket
is not reusable: when the socket code enters the protocol,
an error is immediately returned. This will substitute for
NULLing the so_pcb socket field, helping to implement the
invariant that all valid sockets have valid pcb's in TCP.
INP_SOCKREF - The protocol has become the owner of the socket reference,
and will need to free it when freeing the pcb, which will
be used when a TCP socket is closed but still has queued
data.
mjacob [Sun, 26 Mar 2006 07:16:17 +0000 (07:16 +0000)]
Correct bad format args. Interesting- the lines that generated
the error on sparc64 hadn't changed since the last checkin, pass
LINT on other platforms and mpt doesn't work on sparc64 anyway
and the tinderbox build didn't work for me in a cross build case
on my main build machine (which runs RELENG_6). Sigh. Still
need to try harder.
rwatson [Sun, 26 Mar 2006 01:44:35 +0000 (01:44 +0000)]
Take contrib/openbsm/etc configuration files off the vendor branch in
order to add $FreeBSD$ tags, which helps mergemaster better manage
updating them.
Requested by: several
Obtained from: TrustedBSD Project
rwatson [Sat, 25 Mar 2006 17:28:42 +0000 (17:28 +0000)]
Rework IPX/SPX socket and pcb reference model:
- Introduce invariant that all IPX/SPX sockets will have valid so_pcb
pointers to ipxpcb structures, and that for SPX, the control block
pointer will always be valid. Don't attempt to free the socket or
pcb at various odd points, such as disconnect.
- Add a new ipxpcb flag, IPXP_DROPPED, which will be set in place of
freeing PCB's so that this invariant can be maintained. This flag
is now checked instead of a NULL check in various socket protocol
calls.
- Introduce many assertions that this invariant holds.
- Various pieces of code, such as the SPX timer code, no longer needs
to jump through hoops in case it frees a PCB while running.
- Break out ipx_pcbfree() from ipx_pcbdetach(). Likewise
spx_pcbdetach().
- Comment on some SMP-related limitations to the SPX code.
rwatson [Sat, 25 Mar 2006 15:03:29 +0000 (15:03 +0000)]
Restructure spx_attach() to properly free memory in the event that one
of its allocations fails. Allocate the ipxp last so as to avoid having
to free it if another allocation goes wrong.
Normalize retrieval of ipxp and cb from socket in spx_sp_attach(), and
add assertions.
rwatson [Sat, 25 Mar 2006 14:44:05 +0000 (14:44 +0000)]
In spx_ctloutput(), acquire the ipxp lock around read operations,
especially reads of spx header structures, which will now be cached
in the stack until they can be copied out after releasing the lock.
Panic if a bad socket option direction is passed in by the caller.
gnn [Sat, 25 Mar 2006 13:38:52 +0000 (13:38 +0000)]
First steps towards IPSec cleanup.
Make the kernel side of FAST_IPSEC not depend on the shared
structures defined in /usr/include/net/pfkeyv2.h The kernel now
defines all the necessary in kernel structures in sys/netipsec/keydb.h
and does the proper massaging when moving messages around.
mjacob [Sat, 25 Mar 2006 07:08:27 +0000 (07:08 +0000)]
Some fairly major changes to this driver.
A) Fibre Channel Target Mode support mostly works
(SAS/SPI won't be too far behind). I'd say that
this probably works just about as well as isp(4)
does right now. Still, it and isp(4) and the whole
target mode stack need a bit of tightening.
B) The startup sequence has been changed so that
after all attaches are done, a set of enable functions
are called. The idea here is that the attaches do
whatever needs to be done *prior* to a port being
enabled and the enables do what need to be done for
enabling stuff for a port after it's been enabled.
This means that we also have events handled by their
proper handlers as we start up.
C) Conditional code that means that this driver goes
back all the way to RELENG_4 in terms of support.
D) Quite a lot of little nitty bug fixes- some discovered
by doing RELENG_4 support. We've been living under Giant
*waaaayyyyy* too long and it's made some of us (me) sloppy.
E) Some shutdown hook stuff that makes sure we don't blow
up during a reboot (like by the arrival of a new command
from an initiator).
There's been some testing and LINT checking, but not as
complete as would be liked. Regression testing with Fusion
RAID instances has not been possible. Caveat Emptor.
scottl [Sat, 25 Mar 2006 06:14:32 +0000 (06:14 +0000)]
Add a driver for the new LSI MegaRAID SAS controller family. The 'MFI' name
is derived from the phrase 'MegaRAID Firmware Interface' used by LSI. This
driver provides a block interface to logical disks on the card and a minimal
management device. It is MPSAFE, INTR_FAST, and 64-bit capable.
Thanks to Dell for providing hardware to test with and IronPort for
sponsoring the work.