Commit Graph

140227 Commits

Author SHA1 Message Date
delphij
ec5327b1cd Indent the else path, reduce diff against OpenBSD. 2008-07-18 23:35:31 +00:00
alc
493038bc03 Correct an error in pmap_change_attr()'s initial loop that verifies that the
given range of addresses are mapped.  Previously, the loop was testing the
same address every time.

Submitted by:	Magesh Dhasayyan
2008-07-18 22:05:51 +00:00
alc
07ead18715 Simplify pmap_extract()'s control flow, making it more like the related
functions pmap_extract_and_hold() and pmap_kextract().
2008-07-18 20:07:50 +00:00
jasone
1e148a8be3 Enhance arena_chunk_map_t to directly support run coalescing, and use
the chunk map instead of red-black trees where possible.  Remove the
red-black trees and node objects that are obsoleted by this change.  The
net result is a ~1-2% memory savings, and a substantial allocation speed
improvement.
2008-07-18 19:35:44 +00:00
alc
dba03ac26a Eliminate stale comments from kmem_malloc(). 2008-07-18 17:41:31 +00:00
kevlo
08fb11c891 Fix a longstanding bug, from Otto Moerbeck:
if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action

Obtained from:	OpenBSD
2008-07-18 15:05:14 +00:00
kevlo
1f1d4ebf9a Remove unnessasary cast 2008-07-18 14:55:22 +00:00
dwmalone
ea6fbedc68 Add a man page for the DNS accept filter. 2008-07-18 14:46:01 +00:00
dwmalone
f7cc3b4928 Add an accept filter for TCP based DNS requests. It waits until the
whole first request is present before returning from accept.
2008-07-18 14:44:51 +00:00
rwatson
4efb6d2a37 Eliminate use of the global ripsrc which was being used to pass address
information from rip_input() to rip_append().  Instead, pass the source
address for an IP datagram to rip_append() using a stack-allocated
sockaddr_in, similar to udp_input() and udp_append().

Prior to the move to rwlocks for inpcbinfo, this was not a problem, as
use of the global was synchronized using the ripcbinfo mutex, but with
read-locking there is the potential for a race during concurrent
receive.

This problem is not present in the IPv6 raw IP socket code, which
already used a stack variable for the address.

Spotted by:	mav
MFC after:	1 week (before inpcbinfo rwlock changes)
2008-07-18 10:47:07 +00:00
kmacy
6dfc39c2b6 revert local change 2008-07-18 07:10:33 +00:00
kmacy
eacfaa0e61 revert change from local tree 2008-07-18 07:07:57 +00:00
kmacy
96f4c28cd5 new vendor PHY support 2008-07-18 07:01:51 +00:00
kmacy
daba4ab7d8 revert changes accidentally included in last commit 2008-07-18 06:22:57 +00:00
alc
69e52692b2 Eliminate unused global variables. (These global variables became fields of
struct kva_md_info many years ago.)
2008-07-18 06:14:36 +00:00
kmacy
c01ed5ad9b import vendor fixes to cxgb 2008-07-18 06:12:31 +00:00
yongari
25c768ed0d Correct 1000Mbps link handling logic for JMC250. This should make
jme(4) run on 1000Mbps link.
2008-07-18 04:20:48 +00:00
das
c887e4b9e4 Sort the .PATH entries to give a more reasonable order of precedence:
1. architecture-specific files
     2. long double format-specific files
     3. bsdsrc
     4. src
     5. man
The original order was virtually the opposite of this.

This should not cause any functional changes at this time. The
difference is only significant when one wants to override, say, a
generic foo.c with a more specialized foo.c (as opposed to foo.S).
2008-07-18 02:18:34 +00:00
yongari
065c59620f Use DELAY() instead of pause if waiting time is less than 1ms.
This will fix driver hang if hz < 1000.

Pointed out by:	thompsa
2008-07-18 01:00:54 +00:00
luoqi
dc64dfc792 Fix a benign typo that would give out an incorrect warning message.
Change a get-or-set sequence on OHCI_COMMAND_STATUS register which
is "write to set" to a simple set.
2008-07-17 22:40:23 +00:00
simon
ea1061e2f6 Make it more clear what it means that SA_RESTART is set for signal
handlers added with signal(3).

Submitted by:	gnn (slightly modified by me)
MFC after:	1 week
2008-07-17 21:54:23 +00:00
danger
ac5e6208c0 - dns queries might go also over TCP, so allow it.
Approved by:	rink
MFC after:	1 week
2008-07-17 20:00:18 +00:00
kib
eff9ee09b4 Pair the VOP_OPEN call from do_execve() with the reciprocal VOP_CLOSE.
This was unnoticed because local filesystems usually do nothing
non-trivial in the close vop.

Reported and tested by:	Rick Macklem
MFC after:	2 weeks
2008-07-17 16:44:07 +00:00
gallatin
57b9f1fb86 Clean up mxge's use of callouts as pointed out by jhb,
and handle NIC hardware watchdog resets.

- remove buggy code at the top of mxge_tick() which tried
  to detect a race which is already detected in the kernel's
  callout code.

- move callout_stop() and callout_reset() into mxge_close()
  mxge_open() rather than doing the callout manipulation
  all over the place.

- use callout_drain(), rather than callout_stop() to prevent
  a potential race between mxge_tick() and mxge_detach()
  which could lead to softclock using a destroyed mutex

- restructure the mxge_tick() and mxge_watchdog_reset()
  routines to avoid resetting a callout, and then
  immediately stopping it if the watchdog reset routine
  is called, and fails.

- enable the driver to handle NIC hardware watchdog
  resets by restoring the NIC's PCI config space, which is
  lost when the NIC hardware watchdog triggers.

Reviewed by: jhb (previus version)
2008-07-17 15:46:35 +00:00
flz
26c7a0cd2b Don't set PACKAGE_BUILDING while installing packages.
Submitted by:	erwin
Discussed on:	http://lists.freebsd.org/pipermail/freebsd-ports/2008-June/049074.html
MFC after:	1 week
2008-07-17 15:08:26 +00:00
jhb
42cd7531f9 Before updating the password database, the pw(8) utility first performs a
sanity check by invoking "pwd_mkdb -C".  However, if this failed it
silently returned success.  Fix this so it fails the update operation
instead.

MFC after:	1 week
2008-07-17 13:47:59 +00:00
dougb
f25eee8d08 Add the shutdown KEYWORD to those scripts that start persistent services
to allow them to do a "clean" shutdown.

I purposely avoided making changes to network-related stuff since the
system shutting down is pretty conclusive, and there may be complicated
dependencies on the network that I would rather not try to unravel.

I also skipped kerberos-related stuff for the reasons above, and
because I have no way to test it.
2008-07-16 19:50:29 +00:00
dougb
cc4d6b8e36 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ed
12460029b8 Move the TCSA* definitions out of _KERNEL. They are processed in libc.
The tcsetattr() routine already converts the TCSA* arguments to their
respective TIOCSETA* ioctl's in the C library. There is no need to have
these definitions inside the kernel.

Approved by:	philip (mentor, implicit)
2008-07-16 12:36:39 +00:00
ed
edbfc4f6f4 Sort the ioctl's in <sys/ttycom.h> by number.
I think one of the reasons why we have so many conflicts in the TTY
ioctl category, is because the ioctl's aren't ordered logically. This
commit only sorts them by number. The comments may still be inaccurate.

Approved by:	philip (mentor)
2008-07-16 11:23:15 +00:00
ed
27f054a7ef Remove OTTYDISC, NETLDISC and NTTYDISC definitions.
When I ported most applications away from <sgtty.h>, I noticed none of
them were actually using these definitions. I kept them in place,
because I didn't want to touch tools like pstat(8) and stty(1).

In preparation for the MPSAFE TTY layer, remove these definitions. This
doesn't have any impact with respect to binary compatibility (see
tty_conf.c).

We couldn now add an #error to <sys/ioctl_compat.h> when included
outside the kernel. Unfortunately, kdump's mkioctls includes this file
unconditionally.

Approved by:	philip (mentor)
2008-07-16 11:20:04 +00:00
rwatson
aaeba0f3d2 Fix error in comment.
MFC after:	3 weeks
2008-07-16 10:55:50 +00:00
yongari
8949e679ff Fix a multicast handling regression on VT6105M introduced in
vr(4) overhauling(r177050).

It seems that filtering multicast addresses with multicast CAM
entries require accessing 'CAM enable bit' for each CAM entry.
Subsequent accessing multicast CAM control register without
toggling the 'CAM enable bit' seem to no effects.
In order to fix that separate CAM setup from CAM mask configuration
and CAM entry modification. While I'm here add VLAN CAM filtering
feature which will be enabled in future(FreeBSD now can receive
VLAN id insertion/removal event from vlan(4) on the fly).

For VT6105M hardware, explicitly disable VLAN hardware tag
insertion/stripping and enable VLAN CAM filtering for VLAN id 0.
This shall make non-VLAN frames set VR_RXSTAT_VIDHIT bit in Rx
status word.

Added multicast/VLAN CAM address definition to header file.

PR:	kern/125010, kern/125024
MFC after:	1 week
2008-07-16 08:35:29 +00:00
yongari
dc88e0e3e5 Fix VR_RXSTAT_RX_OK bit definition which lasted for more than 9
years. All datasheet I have indicates the bit 15 is the
VR_RXSTAT_RX_OK. The bit 14 is reserved for all Rhine family
except VT6105M. VT6105M uses that bit to indicate a VLAN frame
with matching CAM VLAN id.
Use the VR_RXSTAT_RX_OK instead of VR_RXSTAT_RXERR when vr(4)
checks the validity of received frame.
This should fix occasional dropping frames on VT6105M.

Tested by:	Goran Lowkrantz ( goran.lowkrantz at ismobile dot com )
MFC after:	1 week
2008-07-16 08:02:23 +00:00
rwatson
7cf9955507 Invoke err() with a format string rather than directly with a passed
command line argument.

Submitted by:	Alfredo Ortega <alfredo at coresecurity dot com>
Thanks to:	Core Security Technologies
MFC after:	3 days
2008-07-15 16:07:34 +00:00
rwatson
6d9661b224 Merge last of a series of rwlock conversion changes to UDP, which
completes the move to a fully parallel UDP transmit path by using
global read, rather than write, locking of inpcbinfo in further
semi-connected cases:

- Add macros to allow try-locking of inpcb and inpcbinfo.
- Always acquire an incpcb read lock in udp_output(), which stablizes the
  local inpcb address and port bindings in order to determine what further
  locking is required:
  - If the inpcb is currently not bound (at all) and are implicitly
    connecting, we require inpcbinfo and inpcb write locks, so drop the
    read lock and re-acquire.
  - If the inpcb is bound for at least one of the port or address, but an
    explicit source or destination is requested, trylock the inpcbinfo
    lock, and if that fails, drop the inpcb lock, lock the global lock,
    and relock the inpcb lock.
  - Otherwise, no further locking is required (common case).
- Update comments.

In practice, this means that the vast majority of consumers of UDP sockets
will not acquire any exclusive locks at the socket or UDP levels of the
network stack.  This leads to a marked performance improvement in several
important workloads, including BIND, nsd, and memcached over UDP, as well
as significant improvements in pps microbenchmarks.

The plan is to MFC all of the rwlock changes to RELENG_7 once they have
settled for a weeks in the tree.

Tested by:	ps, kris (older revision), bde
MFC after:	3 weeks
2008-07-15 15:38:47 +00:00
rpaulo
2d49f66781 Fix commment in typo.
M    tcp_output.c
2008-07-15 10:32:35 +00:00
danger
00069ec25e Update the definition of modspecific structure
PR:		docs/125630
2008-07-15 10:06:37 +00:00
alc
d4de04e9b1 Update bus_dmamem_alloc()'s first call to malloc() such that M_WAITOK is
specified when appropriate.

Reviewed by:	scottl
2008-07-15 03:34:49 +00:00
delphij
eae79cfa0f Add quirk for Dell D630 laptops.
Tested by:	Quake Lee <quakelee geekcn org>,
		Robert Noland <rnoland 2hip net>
MFC after:	1 week
Approved by:	ariff
2008-07-15 02:34:44 +00:00
jkim
5faf505c39 Allow injecting big packets via bpf(4) up to min(MTU, 16K-byte).
MFC after:	1 week
2008-07-14 22:41:48 +00:00
obrien
c131962593 Match the implementation of the inline function from libkern.h. 2008-07-14 21:36:02 +00:00
eri
253913181a Fix carp(4) panics that can occur during carp interface configuration.
Approved by:	mlaier (mentor)
Reported by:	Scott Ullrich
MFC after:	1 week
2008-07-14 20:11:51 +00:00
phk
35ea526131 Unmangle an E.W.Dijkstra quote. 2008-07-14 18:45:06 +00:00
jfv
188dc0a4d4 Add event notification at attach/detach so the NIC
is able to detect it and do hardware filtering.
2008-07-14 18:40:21 +00:00
jfv
fbb0502c9b Add an event handler to the vlan driver so the NIC driver
becomes aware of it, and gets the VLAN ID. This will allow
the easy use of VLAN hardware filtering by adapters that
support it.
2008-07-14 18:38:52 +00:00
brueffer
bc03990ad8 Manpage for the et(4) driver.
Obtained from:	DragonFly
2008-07-14 18:15:43 +00:00
trhodes
b82c051e92 Fill in the string portion of the bluetooth stack version sysctl.
Approved by:	emax
2008-07-14 13:45:05 +00:00
gahr
75a36a87b2 - Enhance volume handling
PR:		125054
Submitted by:	gahr
Approved by:	cperciva
2008-07-14 13:22:09 +00:00
dougb
67437d52b5 Change the character prefixed to the svn version to "r" since that seems
to be how they are commonly referred to.
2008-07-13 20:08:38 +00:00