tuexen [Tue, 20 Mar 2012 19:42:40 +0000 (19:42 +0000)]
MFC r232866:
This fixes PR 165210. Basically we just
add in the netgraph interface to the list of
acceptable interfaces. A todo at the next
IETF code blitz, though is we need to review
why we screen interfaces, there was a reason ;-).
From rrs@.
kensmith [Mon, 19 Mar 2012 22:20:47 +0000 (22:20 +0000)]
We seem to be having issues with a bug in the loader that causes it to
estimate the program header size for the kernel wrong. It can result
in the kernel build failing with the message:
ld: kernel.debug: Not enough room for program headers (allocated 5, need 6)
ld: final link failed: Bad value
Tinderbox builds were failing with this message a short time ago, and
I encountered it while preparing the i386 build machine for the 8.3-RC2
builds.
Konstantin has looked at it and believes the issue was fixed in recent
versions of binutils. It is a bit too late in the release process to
be messing around with the loader and/or binutils. This workaround
seems to take care of the problem for now.
jhb [Mon, 19 Mar 2012 20:15:18 +0000 (20:15 +0000)]
MFC 225096:
Fix if_addr_mtx recursion in mld6.
mld_set_version() is called only from mld_v1_input_query() and
mld_v2_input_query() both holding the if_addr_mtx lock, and then calling
into mld_v2_cancel_link_timers() acquires it the second time, which results
in mtx recursion. To avoid that, delay if_addr_mtx acquisition until after
mld_set_version() is called; while here, further reduce locking scope
to protect only the needed pieces: if_multiaddrs, in6m_lookup_locked().
eadler [Mon, 19 Mar 2012 01:51:53 +0000 (01:51 +0000)]
MFC r231306:
Fix NULL ptr dereference in setusercontext if pwd is null,
LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
setpriority) fails.
hrs [Sun, 18 Mar 2012 10:45:36 +0000 (10:45 +0000)]
MFC r216650:
Add IFT_L2VLAN to the list that is capable of supplying the ingredients
of the EUI64 part of an IPv6 address. Otherwise vlans will all use the
MAC address of the first ethernet interface of the system.
sbruno [Fri, 16 Mar 2012 23:58:35 +0000 (23:58 +0000)]
MFC r226702
Author: obrien
Date: Mon Oct 24 20:52:41 2011 UTC (4 months, 3 weeks ago)
Changed paths: 3
Log Message:
* Don't give the impression that this compiler is GPLv3.
(It is "well known" that GCC 4.2.2 is GPLv3.)
* Don't give the impression that this compiler isn't "trustable".
* Fix dependency nit.
jhb [Fri, 16 Mar 2012 21:28:29 +0000 (21:28 +0000)]
MFC 226340,226340:
Use queue(3) macros instead of home-rolled versions in several places in
the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next'
macros.
mav [Wed, 14 Mar 2012 14:14:16 +0000 (14:14 +0000)]
Dummy-initizlize variables to fix build breakage after r232942, because of
gcc falsely reporting variables as uninitialized. Code committed at that
revision don't even touch half of mentioned variables.
This is direct commit to 8-STABLE, as HEAD and 9-STABLE have no problem.
marius [Wed, 14 Mar 2012 10:02:42 +0000 (10:02 +0000)]
MFC: r232822
Fix a bug introduced in r223938 (MFC'ed to stable/8 in r224411); on
big-endian machines coping a 32-bit quantum bytewise to the address of
a 64-bit variable results in writing to the "wrong" 32-bit half so adjust
the address accordingly. This fix is implemented in a hackish way for
two reasons:
o in order to be able to get it into 8.3 with zero impact on the little-
endian architectures where this bug has no effect and
o to avoid blowing the x86 boot2 out of the water again when compiling
it with clang, which all sane versions of this fix tested do.
This change fixes booting from UFS1 file systems on big-endian machines.
mav [Tue, 13 Mar 2012 20:37:08 +0000 (20:37 +0000)]
MFC r229288:
Remove unneeded checks for CAM_DEV_QFRZN after cam_periph_runccb() call.
cam_periph_runccb() since the beginning checks it and releases device queue.
After r203108 it even clears CAM_DEV_QFRZN flag after that to avoid double
release, so removed code is unreachable now.
mav [Tue, 13 Mar 2012 20:34:33 +0000 (20:34 +0000)]
MFc r228846:
Use READ CAPACITY(16) to get information about device physical sectors.
As soon as not all devices support READ CAPACITY(16), automatically fall
back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST
status returned.
It also provides first bits of information about Logical Block Provisioning
(aka UNMAP/TRIM) support by the device.
bz [Mon, 12 Mar 2012 22:13:17 +0000 (22:13 +0000)]
MFC r232515:
Rather than printing the output from route add for all FIBs just print them
for the default FIB followed by a statement with a list of FIB numbers for
all the other FIBs we install the routes for.
tuexen [Mon, 12 Mar 2012 21:52:31 +0000 (21:52 +0000)]
MFC r232723,r232726:
Fix a bug reported by Peter Holm which results in a crash:
Verify in sctp_peeloff() that the socket is a one-to-many
style SCTP socket.
rstone [Sat, 10 Mar 2012 02:27:04 +0000 (02:27 +0000)]
MFC r230984:
Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
set on the new thread. This prevents the thread from inadvertently
inheriting affinity from a random sibling.
kib [Wed, 7 Mar 2012 18:33:11 +0000 (18:33 +0000)]
Synchronize nullfs with HEAD, mostly merge all locking changes.
Tested by: pho
MFC r229428:
Document the state of the lowervp vnode for null_nodeget().
MFC r229431:
Do the vput() for the lowervp in the null_nodeget() for error case too.
Several callers of null_nodeget() did the cleanup itself, but several
missed it, most prominent being null_bypass(). Remove the cleanup from
the callers, now null_nodeget() handles lowervp free itself.
MFC r229600 (by dim):
In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode
pointer 'lowervp' instead of 'vp', which is uninitialized at that point.
MFC r230304 (by rea):
Use hashdestroy() instead of naive free().
MFC r232299:
Move the code to destroy half-contructed nullfs vnode into helper
function null_destroy_proto() from null_insmntque_dtr(). Also
apply null_destroy_proto() in null_nodeget() when we raced and a vnode
is found in the hash, so the currently allocated protonode shall be
destroyed.
Lock the vnode interlock around reassigning the v_vnlock.
MFC r232301:
Always request exclusive lock for the lower vnode in nullfs_vget().
The null_nodeget() requires exclusive lock on lowervp to be able to
insmntque() new vnode.
MFC r232303:
In null_reclaim(), assert that reclaimed vnode is fully constructed,
instead of accepting half-constructed vnode. Previous code cannot decide
what to do with such vnode anyway, and although processing it for hash
removal, paniced later when getting rid of nullfs reference on lowervp.
While there, remove initializations from the declaration block.
MFC r232304:
Document that null_nodeget() cannot take shared-locked lowervp due to
insmntque() requirements.
MFC r232305:
Allow shared locks for reads when lower filesystem accept shared locking.
MFC r232383:
Do not expose unlocked unconstructed nullfs vnode on mount list.
Lock the native nullfs vnode lock before switching the locks.
kib [Tue, 6 Mar 2012 11:16:14 +0000 (11:16 +0000)]
MFC r232239:
Fix a race in top non-interactive mode. Use plain sleep(3) call instead
of arming timer and then pausing. If SIGALRM is delivered before pause(3)
is entered, top hangs.
Add regression tests scripts for multi-IP FIBs exercising the send,
receive and forward path tagging packets with both the ifconfig fib
option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
testing both setfib(2) as well as the SO_SETFIB socket option.
At 16 FIBs a total of over 64k return codes/replies/stati are checked,
sometimes multiple times (in different ways, e.g. the reflected request
as well as ipfw counter values).
The scripts need two or three machines to run and are thus not added
to the tools/regression framework but only to tools/test.
MFC r232114:
Update scripts to work around two sh(1) bugs found in stable/8:
1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.
Correct typos and improve some details forwarding.sh already
had in initiator, esp. related to ipfw accepting if the default
is deny.
Add an extra stat call to the "delay" function in addition to the
touch which together is still a lot faster than sleep 1 but seems
to help a lot more to mitigate the unrelated kernel race seen.
Add regression tests for the setsockopt(2) SO_SETFIB socket option.
Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks. This would catch bugs as fixed
in (r230938,)r230981.
ken [Mon, 5 Mar 2012 19:01:23 +0000 (19:01 +0000)]
MFC 232411:
Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
cards that should be handled by the mfi(4) driver.
The root of the problem is that the mpt(4) driver was masking off the
bottom bit of the PCI device ID when deciding which cards to attach to.
It appears that a number of the mpt(4) Fibre Channel cards had a LAN
variant whose PCI device ID was just one bit off from the FC card's device
ID. The FC cards were even and the LAN cards were odd.
The problem was that this pattern wasn't carried over on the SAS and
parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device
IDs were either even numbers, or they would get masked to a supported
adjacent PCI device ID, and everything worked well.
Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
SAS device IDs for their new MegaRAID cards. This is causing the mpt(4)
driver to attach to the RAID cards instead of the mfi(4) driver.
The solution is to stop masking off the bottom bit of the device ID, and
explicitly list the PCI device IDs of all supported cards.
This change should be a no-op for mpt(4) hardware. The only intended
functional change is that for the 929X, the is_fc variable gets set. It
wasn't being set previously, but needs to be because the 929X is a Fibre
Channel card.
hrs [Mon, 5 Mar 2012 18:40:53 +0000 (18:40 +0000)]
MFC r225682:
Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts(). This fixes
inconsistency when options are specified by both setsockopt() and ancillary
data types.
delphij [Mon, 5 Mar 2012 17:09:16 +0000 (17:09 +0000)]
MFC r232202:
Drop setuid status while doing file operations to prevent potential
information leak. This changeset is intended to be a minimal one
to make backports easier.
delphij [Mon, 5 Mar 2012 17:06:34 +0000 (17:06 +0000)]
MFC r231888:
Put the signal trap output to standard error instead of standard output.
Without this change, pressing ^T could result in rc.d script putting
junk strings like:
Script <filename> running
in configuration files when redirecting standard output to these files.
emaste [Thu, 1 Mar 2012 19:43:28 +0000 (19:43 +0000)]
MFC r232267:
Workaround for PCIe 4GB boundary issue
Enforce a boundary of no more than 4GB - transfers crossing a 4GB
boundary can lead to data corruption due to PCIe limitations. This
change is a less-intrusive workaround that can be quickly merged back
to older branches; a cleaner implementation will arrive in HEAD later
but may require KPI changes.
r231743
=======
Enhance documentation, improve interoperability, and fix defects in
FreeBSD's front and back Xen blkif interface drivers.
sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Replace FreeBSD specific multi-page ring impelementation with
support for both the Citrix and Amazon/RedHat versions of this
extension.
sys/dev/xen/blkfront/blkfront.c:
o Add a per-instance sysctl tree that exposes all negotiated
transport parameters (ring pages, max number of requests,
max request size, max number of segments).
o In blkfront_vdevice_to_unit() add a missing return statement
so that we properly identify the unit number for high numbered
xvd devices.
sys/dev/xen/blkback/blkback.c:
o Add static dtrace probes for several events in this driver.
o Defer connection shutdown processing until the front-end
enters the closed state. This avoids prematurely tearing
down the connection when buggy front-ends transition to the
closing state, even though the device is open and they
veto the close request from the tool stack.
o Add nodes for maximum request size and the number of active
ring pages to the exising, per-instance, sysctl tree.
o Miscelaneous style cleanup.
sys/xen/interface/io/blkif.h:
o Add extensive documentation of the XenStore nodes used to
implement the blkif interface.
o Document the startup sequence between a front and back driver.
o Add structures and documenatation for the "discard" feature
(AKA Trim).
o Cleanup some definitions related to FreeBSD's request
number/size/segment-limit extension.
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
sys/xen/xenbus/xenbusvar.h:
Add the convenience function xenbus_get_otherend_state() and
use it to simplify some logic in both block-front and block-back.
r231836
=======
Fix "_" vs. "-" typo in a comment. No functional changes.
r231837
=======
Fix typo in a printf string: "specificed" -> "specified".
r231839
=======
Fix a bug in the calculation of the maximum I/O request size.
The previous code did not limit the I/O request size based on
the maximum number of segments supported by the back-end. In
current practice, since the only back-end supporting chained
requests is the FreeBSD implementation, this limit was never
exceeded.
sys/dev/xen/blkfront/block.h:
Add two macros, XBF_SEGS_TO_SIZE() and XBF_SIZE_TO_SEGS(),
to centralize the logic of reserving a segment to deal with
non-page-aligned I/Os.
sys/dev/xen/blkfront/blkfront.c:
o When negotiating transfer parameters, limit the
max_request_size we use and publish, if it is greater
than the maximum, unaligned, I/O we can support with
the number of segments advertised by the backend.
o Don't unilaterally reduce the I/O size published to
the disk layer by a single page. max_request_size
is already properly limited in the transfer parameter
negotiation code.
o Fix typos in printf strings:
"max_requests_segments" -> "max_request_segments"
"specificed" -> "specified"
r231883
=======
Fix regression in the handling of blkback close events for
devices that are unplugged via QEMU.
sys/dev/xen/blkback/blkback.c:
Toolstack initiated closures change the frontend's state
to Closing. The backend must change to Closing as well,
even if we can't actually close yet, in order for the
frontend to notice and start the closing process.
r232308
=======
blkif interface comment cleanups. No functional changes
sys/xen/interface/io/blkif.h:
o Insert space in "Red Hat".
o Fix typo "discard-aligment" -> "discard-alignment"
o Fix typo "unamp" -> "unmap"
o Fix typo "formated" -> "formatted"
o Clarify the text for "params".
o Clarify the text for "sector-size".
o Clarify the text for "max-requests" in the backend section.
thompsa [Wed, 29 Feb 2012 20:22:45 +0000 (20:22 +0000)]
MFC r232008,232010,232080,232089
Using the flowid in the mbuf assumes the network card is giving a good hash for
the traffic flow, this may not be the case giving poor traffic distribution.
Add a sysctl which allows us to fall back to our own flow hash code.
brueffer [Sat, 25 Feb 2012 18:48:06 +0000 (18:48 +0000)]
MFC: r231871
Switch the license boilerplates to our standard one.
Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages
Approved by: re (kib), jkoshy, gnn, rpaulo, fabient (copyright holders)
marius [Sat, 25 Feb 2012 00:35:28 +0000 (00:35 +0000)]
MFC: r231913
- Probe BCM57780.
- In case the parent is bge(4), don't set the Jumbo frame settings unless
the MAC actually is Jumbo capable as otherwise the PHY might not have the
corresponding registers implemented. This is also in line with what the
Linux tg3 driver does.
PR: 165032
Submitted by: Alexander Milanov
Approved by: re (kib)
Obtained from: OpenBSD
glebius [Fri, 24 Feb 2012 12:32:50 +0000 (12:32 +0000)]
Merge r230598 by kmacy from head:
A flowtable entry can continue referencing an llentry indefinitely
if the entry is repeatedly referenced within its timeout window.
This change clears the LLE_VALID flag when an llentry is removed
from an interface's hash table and adds an extra check to the
flowtable code for the LLE_VALID flag in llentry to avoid retaining
and using a stale reference.