Commit Graph

116564 Commits

Author SHA1 Message Date
peter
0ac96cc344 Fix syscons on amd64. The SC_PIXEL_MODE commit from May 29th added a new
function pointer to the vga render dispatch table and initialized it with
vga_nop.  The problem is that vga_nop() is a varargs function, and the
table declares a non-varargs function pointer.  On amd64 (and I think ppc),
mixing varargs and non-varargs function pointers is fatal.

Change vga_nop() and gfb_nop() from varargs to non-varargs do-nothing
functions.  This stops the stack corruption that only happened on amd64.

Approved by:  re (scottl)
2005-06-14 02:43:45 +00:00
gshapiro
c1f0877e6f Use new OSTYPE(freebsd6).
Approved by:	re (scottl)
Requested by:	keramida
2005-06-14 02:25:17 +00:00
gshapiro
9b46bba4c2 This commit was generated by cvs2svn to compensate for changes in r147353,
which included commits to RCS files with non-trunk default branches.
2005-06-14 02:23:14 +00:00
gshapiro
3f99651e54 Import OSTYPE(freebsd6) support from sendmail open source repo for FreeBSD 6.0.
Approved by: re (scottl)
Requested by: keramida
2005-06-14 02:23:14 +00:00
jeff
1792584f2a - Remove vnode lock asserts at the end of vfs syscalls. These asserts were
used to ensure that we weren't exiting the syscall with a lock still
   held.  This wasn't safe, however, because we'd already executed a vput()
   and on a loaded system the vnode may have been free'd by the time we
   assert.  This functionality is also handled by the td_locks assert in
   userret, which doesn't tell you what the syscall was, but will at least
   panic before you deadlock.

Sponsored by:   Isilon Systems, Inc.
Discovred by:   Peter Holm
Approved by:	re (blanket vfs)
2005-06-14 01:14:40 +00:00
brooks
d6e60e9b86 Avoid a null pointer dereference by not expiring our lease if we don't
have an active one.

Submitted by:	sam
Reported by:	James Snow <snow at teardrop dot org>
Approved by:	re (dhclient blanket)
2005-06-13 23:43:08 +00:00
des
2b425cf5e2 Don't use a cast as an lvalue.
Add a redundant test to make it painfully obvious to the reader that this
code does not support IPv6.

Approved by:	re (dwhite)
MFC after:	1 week
2005-06-13 21:18:52 +00:00
sam
4e4b8392b5 revert 1.53; it breaks ibss merge
Noticed by:	Bruno Randolf
Approved by:	re (dwhite)
2005-06-13 21:01:06 +00:00
brooks
44ce56b077 Initialze ifp->if_softc.
Submitted by:	ume
2005-06-13 17:17:07 +00:00
sam
8637a9a96a resolve merge conflicts
Approved by:	re (dwhite)
2005-06-13 17:07:31 +00:00
sam
ef42ed26e0 This commit was generated by cvs2svn to compensate for changes in r147341,
which included commits to RCS files with non-trunk default branches.
2005-06-13 17:00:32 +00:00
sam
d1a1fd4aa9 stripped down import of hostapd 0.3.9
Approved by:	re (dwhite)
2005-06-13 17:00:32 +00:00
sam
959b8ed223 resolve merge conflicts 2005-06-13 16:54:21 +00:00
sam
848adee197 This commit was generated by cvs2svn to compensate for changes in r147338,
which included commits to RCS files with non-trunk default branches.
2005-06-13 16:43:14 +00:00
sam
b6ecc83f22 stripped down import of wpa_supplicant v0.3.9
Approved by:	re (dwhite)
2005-06-13 16:43:14 +00:00
brueffer
381a0db2e3 It's spelled 'preceded' of course.
Submitted by:	David Adam <zanchey@ucc.gu.uwa.edu.au>
Pointy hat to:	brueffer
2005-06-13 15:49:59 +00:00
brueffer
1f41c199ed Hex strings are _pre_ceeded by 0x, not _pro_ceeded.
PR:		82187
Submitted by:	Anthony Rogers <anthony.j.rogers@gmail.com>
Approved by:	re (blanket)
MFC after:	3 days
2005-06-13 07:55:15 +00:00
jeff
7a825fb457 - Don't make vgonel() globally visible, we want to change its prototype
anyway and it's not used outside of vfs_subr.c.
 - Change vgonel() to accept a parameter which determines whether or not
   we'll put the vnode on the free list when we're done.
 - Use the new vgonel() parameter rather than VI_DOOMED to signal our
   intentions in vtryrecycle().
 - In vgonel() return if VI_DOOMED is already set, this vnode has already
   been reclaimed.

Sponsored by:	Isilon Systems, Inc.
2005-06-13 06:26:55 +00:00
jeff
22b5cc07b0 - Clear v_dd in cache_zap() instead of cache_purge() as cache_purge() may
not be called in all cases where we free the cnp.

Sponsored by:	Isilon Systems, Inc.
2005-06-13 05:59:59 +00:00
jeff
659954b65e - We should never unlock a buf before we've cleared B_REMFREE. I believe
this is happening at the moment and sometimes causing panics later on the
   package cluster when we bremfree() a buf whose delayed bremfree() did not
   previously happen.

Sponsored by:	Isilon Systems, Inc.
2005-06-13 00:48:58 +00:00
jeff
df170ebc61 - It has long been my suspicion that we don't actually need a loop in
vn_lock().  Add an assert that will help me gain more confidence that this
   is correct.

Sponsored by:	Isilon Systems, Inc.
2005-06-13 00:47:29 +00:00
jeff
2ef7df2a1a - Add KTR_VFS events to vdestroy, vtruncbuf, vinvalbuf, vfreehead.
Sponsored by:	Isilon Systems, Inc.
2005-06-13 00:46:37 +00:00
jeff
bf15cf7167 - Add KTR_VFS messages for various name cache related events.
Sponsored by:	Isilon Systems, Inc.
2005-06-13 00:46:03 +00:00
jeff
c92b8a6f78 - Split one KASSERT in bremfree() into two to aid in debugging.
Sponsored by:	Isilon Systems, Inc.
2005-06-13 00:45:05 +00:00
jeff
d84cb858bb - switch_point is now unused. This doesn't break module binary compatability
since the structure is shrinking, not growing.
2005-06-12 22:33:06 +00:00
jeff
2599199edf - Dramatically simplify bioqdisksort(). We no longer do ordered bios so
most of the code to deal with them has been dead for sometime.  Simplify
   the code by doing an insert sort hinted by the current head position.

Met with apathy by:	arch@
2005-06-12 22:32:29 +00:00
marcel
433bf57177 Define IPI_PREEMPT. Update a nearby comment while I'm here. 2005-06-12 19:03:01 +00:00
mlaier
e15084485c Mark pf callouts as NET_MPSAFE.
Requested by:	yongari (serveral times)
Approved by:	re (blanket)
MFC after:	1 week
2005-06-12 16:46:20 +00:00
mlaier
f82a1d5a8e When doing matching based on dst_ip/src_ip make sure we are really looking
on an IPv4 packet as these variables are uninitialized if not.  This used to
allow arbitrary IPv6 packets depending on the value in the uninitialized
variables.

Some opcodes (most noteably O_REJECT) do not support IPv6 at all right now.

Reviewed by:	brooks, glebius
Security:	IPFW might pass IPv6 packets depending on stack contents.
Approved by:	re (blanket)
2005-06-12 16:27:10 +00:00
brooks
9377df35ab Build on pc98. 2005-06-12 16:21:44 +00:00
brooks
6a494e047b Stop the interface before detaching and freeing it, rather than after.
Reported by:	marius
2005-06-12 15:33:45 +00:00
scottl
1e38a48400 change 'dev' to 'sc->sc_dev' to fix the build.
Approved: re (implicit)
2005-06-12 15:25:19 +00:00
hrs
1ad4fd1131 New release notes:
security.jail.getfsstatroot_only
	--> security.jail.enforce_statfs renamed,
	struct ifnet change,
	acpi_ibm(4) improved,
	atkbdc(4) cleanup,
	arkbdc(4), syscons(4), and so on, enabled by default on sparc64,
	hwpmc(4) MI support,
	ng_tcpmss(4) added, and
	rexecd(8) removed.

Approved by:	re (implicitly)
2005-06-12 08:55:59 +00:00
pjd
d2fe610c90 Do not allocate memory while holding a mutex.
I introduce a very small race here (some file system can be mounted or
unmounted between 'count' calculation and file systems list creation),
but it is harmless.

Found by:	FreeBSD Kernel Stress Test Suite: http://www.holm.cc/stress/
Reported by:	Peter Holm <peter@holm.cc>
2005-06-12 07:03:23 +00:00
brooks
2a4fb1caf1 Return NULL instead of a bogus pointer from if_alloc when if_com_alloc
fails.

Move detaching the ifnet from the ifindex_table into if_free so we can
both keep the sanity checks and actually delete the ifnets. [0]

Reported by:	gallatin [0]
Approved by:	re (blanket)
2005-06-12 00:53:03 +00:00
marcel
70b9333cb4 Refactor the NETSMBCRYPTO option so that it does the same on all
platforms. ARM is excluded as it doesn't yet have any crypto
sources.

Approved by: re (dwhite)
MFC after: 1 day
2005-06-12 00:47:21 +00:00
brooks
547b8204c4 Fix IPv6 neighbor discovery by using IF_LLADDR to get the mac address
instead of a particularly ugly cast + pointer math hack.

Reported by:	kuriyama, kris
2005-06-12 00:45:24 +00:00
hrs
c8414d76dd Document SA-05:10, SA-05:11, and SA-05:12.
Approved by:	re (implicitly)
2005-06-11 17:27:14 +00:00
brooks
f61b445ed2 s/sc_enaddr/enaddr/ to fix pc98 build.
Approved by:	re (blanket)
2005-06-11 16:30:43 +00:00
rwatson
dffb6088ac Add a stub libthr(3) man page to document what it is and why, as well as
to point at libmap.conf(5).  This will help answer questions about what
and why it is, although not in great detail.

Approved by:	re (scottl)
MFC after:	1 week
MFC note:	When MFC'd, don't MFC mention of work not yet MFC'd.
2005-06-11 15:27:56 +00:00
pjd
be79126844 Do not allocate memory based on not-checked argument from userland.
It can be used to panic the kernel by giving too big value.
Fix it by moving allocation and size verification into kern_getfsstat().
This even simplifies kern_getfsstat() consumers, but destroys symmetry -
memory is allocated inside kern_getfsstat(), but has to be freed by the
caller.

Found by:	FreeBSD Kernel Stress Test Suite: http://www.holm.cc/stress/
Reported by:	Peter Holm <peter@holm.cc>
2005-06-11 14:58:20 +00:00
maxim
e5e29d142d o setsockopt(2) cannot remove accept filter. [1]
o getsockopt(SO_ACCEPTFILTER) always returns success on listen socket
  even we didn't install accept filter on the socket.
o Fix these bugs and add regression tests for them.

Submitted by:	Igor Sysoev [1]
Reviewed by:	alfred
MFC after:	2 weeks
2005-06-11 11:59:48 +00:00
pjd
516791d26e Fix copy&paste bug. 2005-06-11 11:46:32 +00:00
jkoshy
f415d3086c Unbreak the PowerPC GENERIC build.
Reviewed by:	delphij
2005-06-11 10:59:02 +00:00
jeff
306b180d66 - Assert that we're not in the name cache anymore in vdestroy().
Sponsored by:	Isilon Systems, Inc.
2005-06-11 08:48:09 +00:00
jeff
8a4fe36603 - Assert that we're not adding a doomed vnode to the name cache.
Sponsored by:	Isilon Systems, Inc.
2005-06-11 08:47:30 +00:00
marcel
4729e22704 Avoid GCC optimizations from injecting a call to memset(?) in order
to initialize the buffer array in ata_raid_attach() by removing the
initializer. There's no memset(?) in the kernel. Instead, assign
'\0' to the first element. The buffer array holds strings only, so
this is functionally equivalent.

Applies to: ia64
Tripped over by: tinderbox
2005-06-11 03:21:20 +00:00
brooks
c9630d0c6a Move if_alloc() up so it's before mii_phy_probe(). 2005-06-11 01:37:46 +00:00
jeff
3625e8746b - Add KTR_VFS tracing to track the life of vnodes. Eventually KTR_VFS
events could be added to cover other interesting details.
 - Add some VNASSERTs to discover places where we access vnodes after
   they have been uma_zfree'd before we try to free them again.
 - Add a few more VNASSERTs to vdestroy() to be certain that the vnode is
   really unused.

Sponsored by:	Isilon Systems, Inc.
2005-06-11 01:16:46 +00:00
brooks
c2f7090316 Move if_alloc() up in fxp_attach() so there's an ifp before
mii_phy_probe() is called.

Committed via:	fxp0
2005-06-11 00:47:34 +00:00