]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years ago- Set stable/9 branch to -PRERELEASE status.
gjb [Thu, 11 Jul 2013 19:04:19 +0000 (19:04 +0000)]
- Set stable/9 branch to -PRERELEASE status.
- Add 9.2 mdoc(7) macro.

Approved by: re (implicit)
Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252713:
wblock [Thu, 11 Jul 2013 15:55:57 +0000 (15:55 +0000)]
MFC r252713:

Whitespace fixes: remove tabs on blank links, spaces following content,
tabs after spaces.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252696:
wblock [Thu, 11 Jul 2013 15:53:19 +0000 (15:53 +0000)]
MFC r252696:

Put the power modes in a list to make them easier to find.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245910,r247370,r249371,r252492,r252586:
wblock [Thu, 11 Jul 2013 15:45:51 +0000 (15:45 +0000)]
MFC r245910,r247370,r249371,r252492,r252586:

r252586:

Add descriptions to the FILES list, fix some mdoc complaints, move the
"neither" entry out of the table in BOOTING.

r252492:

Add a new gptboot(8) man page.  Factor out the redundant information
in gpart(8) and boot(8), adding references to gptboot(8) in both.

r249371:

Remove kernel options from the SYNOPSIS. They are already documented in the
geom(4) manual page SYNOPSIS.

r247370:

Fix typo in EFI GPT GUID.

r245910:

Expand description of how gptboot and gptzfsboot choose a partition for
booting.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253211 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r246552): mention newgrp(1) and how to change the group password.
des [Thu, 11 Jul 2013 12:49:12 +0000 (12:49 +0000)]
MFH (r246552): mention newgrp(1) and how to change the group password.

PR: docs/167741

git-svn-id: svn://svn.freebsd.org/base/stable/9@253206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r246553): document and explain need for setuid bit.
des [Thu, 11 Jul 2013 12:47:06 +0000 (12:47 +0000)]
MFH (r246553): document and explain need for setuid bit.

PR: docs/167741

git-svn-id: svn://svn.freebsd.org/base/stable/9@253205 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253077: should_yield: protect from td_swvoltick being uninitialized
avg [Thu, 11 Jul 2013 12:42:46 +0000 (12:42 +0000)]
MFC r253077: should_yield: protect from td_swvoltick being uninitialized
or too stale

git-svn-id: svn://svn.freebsd.org/base/stable/9@253203 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoPartially MFC r249095:
mav [Thu, 11 Jul 2013 09:27:56 +0000 (09:27 +0000)]
Partially MFC r249095:
Add period script for graid(8) monitoring.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253091:
smh [Thu, 11 Jul 2013 09:10:17 +0000 (09:10 +0000)]
MFC r253091:
Added 4K QUIRK for OCZ Vertex 4 SSDs

git-svn-id: svn://svn.freebsd.org/base/stable/9@253200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245867:
yongari [Thu, 11 Jul 2013 08:41:45 +0000 (08:41 +0000)]
MFC r245867:
  For 57765 class controllers, set low watermark max receive frames to 1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253197 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245870:
yongari [Thu, 11 Jul 2013 08:18:00 +0000 (08:18 +0000)]
MFC r245870:
  bge_attach() can fail before attaching mii(4). So make sure to check
  bge_miibus before detaching mii(4).

git-svn-id: svn://svn.freebsd.org/base/stable/9@253195 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253069, r253074:
mav [Thu, 11 Jul 2013 07:17:03 +0000 (07:17 +0000)]
MFC r253069, r253074:
Add one more ID of Marvell SATA controller.
Add ID for Marvell 88SE9215 AHCI SATA controller.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253194 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253036:
mav [Thu, 11 Jul 2013 07:14:51 +0000 (07:14 +0000)]
MFC r253036:
Add quirk to configure headphones redirection on ASUS UX31A laptop.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253193 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253042:
dim [Thu, 11 Jul 2013 06:48:53 +0000 (06:48 +0000)]
MFC r253042:

Pull in r185616 from llvm trunk:

  FastISel can only append to basic blocks.

  Compute the insertion point from the end of the basic block instead of
  skipping labels from the front.

  This caused failures in landing pads when live-in copies where inserted
  before instruction selection.

I missed this change in r252720; without it, certain compilation flags
can cause exception labels to not be generated, but still referenced,
leading to link errors.

Reported by: zeising

git-svn-id: svn://svn.freebsd.org/base/stable/9@253192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix for lost software interrupts/cam lockup.
alfred [Thu, 11 Jul 2013 04:57:08 +0000 (04:57 +0000)]
Fix for lost software interrupts/cam lockup.

MFC: 252683

git-svn-id: svn://svn.freebsd.org/base/stable/9@253184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252714:
kib [Thu, 11 Jul 2013 04:47:44 +0000 (04:47 +0000)]
MFC r252714:
The tvp vnode on rename is usually unlinked.  Drop the cached null
vnode for tvp to allow the free of the lower vnode, if needed.

PR: kern/180236

git-svn-id: svn://svn.freebsd.org/base/stable/9@253183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC VirtIO r252703,r252707
bryanv [Thu, 11 Jul 2013 03:49:14 +0000 (03:49 +0000)]
MFC VirtIO r252703,r252707

r252703: Document new cache write mode tunables/sysctl
r252707: Minor cleanup and use my FreeBSD.org email

Also change the release where first appeared closer to reality.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253180 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r252673
rmacklem [Thu, 11 Jul 2013 01:30:24 +0000 (01:30 +0000)]
MFC: r252673
A problem with the old NFS client where large writes to large files
would sometimes result in a corrupted file was reported via email.
This problem appears to have been caused by r251719 (reverting
r251719 fixed the problem). Although I have not been able to
reproduce this problem, I suspect it is caused by another thread
increasing np->n_size after the mtx_unlock(&np->n_mtx) but before
the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes
updates to np->n_size, doing the vnode_pager_setsize() with the
mutex locked appears to avoid the problem.
Unfortunately, vnode_pager_setsize() where the new size is smaller,
cannot be called with a mutex held.
This patch returns the semantics to be close to pre-r251719 such that the
call to the vnode_pager_setsize() is only delayed until after the mutex is
unlocked when np->n_size is shrinking. Since the file is growing
when being written, I believe this will fix the corruption.

Tested by: remy.nonnenmacher@activnetworks.com

git-svn-id: svn://svn.freebsd.org/base/stable/9@253177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252231:
pfg [Wed, 10 Jul 2013 21:05:03 +0000 (21:05 +0000)]
MFC r252231:

sed: use getline() instead of fgetln().

In BSD, fgetln() available in libc but in Illumos the Solaris port had to
include it internally. It also seems to have caused problems [1].

Aid portability by using getline() instead.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252956:
pfg [Wed, 10 Jul 2013 20:56:04 +0000 (20:56 +0000)]
MFC r252956:

Implement SEEK_HOLE/SEEK_DATA for ext2fs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253118: Fix conditional (der should match the comment above it).
dteske [Wed, 10 Jul 2013 20:22:31 +0000 (20:22 +0000)]
MFC r253118: Fix conditional (der should match the comment above it).
MFC r253117:

Do two things: First, don't obscure the backtitle. Second, read ~/.dialogrc
if it exists to determine if use_shadow is true (ON) or false (OFF).

The purpose of determining the value of use_shadow is to know how many lines
to subtract from the maximum height value in assuring that the backtitle is
not obscured.

The detriment of obscuring the backtitle is that it provides information
that is not easily obtained elsewhere. That is the command-line shortcut
used to access the current menu. As you navigate from one dialog to the
next, invariably transparently corssing module boundaries, the backtitle
represents the command-line argument used to get there. Obscuring this
information with a widget that is too-tall and/or too-wide would see that
data go unnoticed (leaving few other ways to get that information in the
same helpful context).

So despite the fact that this change reduces the standard maximum height for
all widgets, there is a trap-door to prevent this calculation. If you want
to utilize the full screen height on the terminal (remember, this adjustment
is not made for Xdialog(1)) you can set $NO_BACKTITLE to 1 (or any non-NULL
value for that matter) and this calculation will be skipped. You will be
able to draw a widget that partially obscures the backtitle if-necessary.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253121: Adjust comments to fit within 80-columns.
dteske [Wed, 10 Jul 2013 20:20:23 +0000 (20:20 +0000)]
MFC r253121: Adjust comments to fit within 80-columns.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDirect commit to stable branch to fix ABI breakage:
trociny [Wed, 10 Jul 2013 19:42:07 +0000 (19:42 +0000)]
Direct commit to stable branch to fix ABI breakage:

In r227839, when removing libkvm dependency on procfs(5),
kvm_uread() function, used for reading from /proc/pid/mem, was
removed too. This change broke ABI.

Bring kvm_uread() back so that the ABI is kept. In head soname is
going to be bumped instead.

Reported by: rmh
Discussed on: arch
Suggested by: jilles

git-svn-id: svn://svn.freebsd.org/base/stable/9@253166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251765:
brooks [Wed, 10 Jul 2013 18:27:14 +0000 (18:27 +0000)]
MFC r251765:

Simplify the hierarchy target's logic.[0]

Run hierarchy with WORLDTMP in the path so it works when it is invoked
directly.  Such use is nearly alwasy wrong but appears to be common.[1]

PR: conf/178209 [0], conf/178547 [1]
Submitted by: Garrett Cooper <yaneurabeya@gmail.com> [0]

git-svn-id: svn://svn.freebsd.org/base/stable/9@253164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoJump on the 9.2r MFC bonanza and update ciss(4)
sbruno [Wed, 10 Jul 2013 17:16:10 +0000 (17:16 +0000)]
Jump on the 9.2r MFC bonanza and update ciss(4)

r250031
 - zero a data structure for notifications

r250022 r249977 r249947 r249908
 - handle cases of controllers advertising an sg_list of less than
   CISS_MAX_SG_ELEMENTS.  Fixes ciss(4) ZMR cases.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253160 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r252556): allow setting expiry to current date / time
des [Wed, 10 Jul 2013 14:16:39 +0000 (14:16 +0000)]
MFH (r252556): allow setting expiry to current date / time
MFH (r252688): fall back to sha512 if passwd_format is not set

git-svn-id: svn://svn.freebsd.org/base/stable/9@253157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r250736): add -N option to list jail name instead of number
des [Wed, 10 Jul 2013 14:14:48 +0000 (14:14 +0000)]
MFH (r250736): add -N option to list jail name instead of number

git-svn-id: svn://svn.freebsd.org/base/stable/9@253156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r250056,r250057): add -Z option to zero unused blocks.
des [Wed, 10 Jul 2013 14:13:37 +0000 (14:13 +0000)]
MFH (r250056,r250057): add -Z option to zero unused blocks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r249479): OPENPAM_DEBUG enables debugging but does not turn it on
des [Wed, 10 Jul 2013 14:11:51 +0000 (14:11 +0000)]
MFH (r249479): OPENPAM_DEBUG enables debugging but does not turn it on

git-svn-id: svn://svn.freebsd.org/base/stable/9@253154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r249479): OPENPAM_DEBUG enables debugging but does not turn it on
des [Wed, 10 Jul 2013 14:11:13 +0000 (14:11 +0000)]
MFH (r249479): OPENPAM_DEBUG enables debugging but does not turn it on

git-svn-id: svn://svn.freebsd.org/base/stable/9@253153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r252375): remove useless side effect which triggers a clang bug.
des [Wed, 10 Jul 2013 14:06:35 +0000 (14:06 +0000)]
MFH (r252375): remove useless side effect which triggers a clang bug.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC VirtIO r252702,r252703,r252704,r252706,r252707,r252708,r252709
bryanv [Wed, 10 Jul 2013 04:51:07 +0000 (04:51 +0000)]
MFC VirtIO r252702,r252703,r252704,r252706,r252707,r252708,r252709

This brings in several bug fixes and better conformance with various
aspects of the spec that have changed.

r252702: Convert VirtIO to use ithreads instead of taskqueues
r252703: Block driver bug fixes and spec changes
r252704: Balloon driver improvements
r252706: Minor network driver improvements
r252707: Minor misc VirtIO changes
r252708: PCI driver bug fixes and cleanup
r252709: Fix SCSI driver lock not owned panic

git-svn-id: svn://svn.freebsd.org/base/stable/9@253132 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252404:
yongari [Wed, 10 Jul 2013 01:32:58 +0000 (01:32 +0000)]
MFC r252404:
  Fix triggering false watchdog timeout as done in bce(4) when
  controller is in PAUSE state.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253130 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252402:
yongari [Wed, 10 Jul 2013 01:29:51 +0000 (01:29 +0000)]
MFC r252402:
  Fix triggering false watchdog timeout when controller is in PAUSE
  state.  Previously it used to check if controller has sent a
  PAUSE frame to the remote peer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253128 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252227:
yongari [Wed, 10 Jul 2013 01:26:22 +0000 (01:26 +0000)]
MFC r252227:
  Don't blidly clear GPIOs configuration. Just use firmware configured
  one.  This change also fixes non-working traffic LED on BCM57780.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253126 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r252528
rmacklem [Wed, 10 Jul 2013 00:31:28 +0000 (00:31 +0000)]
MFC: r252528
A problem with the old NFS client where large writes to large files
would sometimes result in a corrupted file was reported via email.
This problem appears to have been caused by r251719 (reverting
r251719 fixed the problem). Although I have not been able to
reproduce this problem, I suspect it is caused by another thread
increasing np->n_size after the mtx_unlock(&np->n_mtx) but before
the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes
updates to np->n_size, doing the vnode_pager_setsize() with the
mutex locked appears to avoid the problem.
Unfortunately, vnode_pager_setsize() where the new size is smaller,
cannot be called with a mutex held.
This patch returns the semantics to be close to pre-r251719 (actually
pre-r248567, r248581, r248567 for the new client) such that the call to
vnode_pager_setsize() is only delayed until after the mutex is
unlocked when np->n_size is shrinking. Since the file is growing
when being written, I believe this will fix the corruption.
A better solution might be to replace the mutex with a sleep lock,
but that is a non-trivial conversion, so this fix is hoped to be
sufficient in the meantime.

Tested by: remy.nonnenmacher@activnetworks.com

git-svn-id: svn://svn.freebsd.org/base/stable/9@253124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 252408, 252557:
hrs [Tue, 9 Jul 2013 07:59:47 +0000 (07:59 +0000)]
MFC 252408, 252557:

Do not display a warning message in a jail without AF_INET6 support.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253062 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252501:
hrs [Tue, 9 Jul 2013 07:51:11 +0000 (07:51 +0000)]
MFC r252501:

Add Planex MZK-UE150N.

Submitted by: Yusuke Tanaka

git-svn-id: svn://svn.freebsd.org/base/stable/9@253059 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252203:
mav [Mon, 8 Jul 2013 17:20:05 +0000 (17:20 +0000)]
MFC r252203:
Add test for SATA registers writability and skip using them if it failed.

There are some systems reported, where PCI BAR(5), used for SATA registers
access, is present, but not functional.  Attempt to use it brakes devices
detection logic.  Try to detect those cases on attach by setting and testing
some bits in SControl register.  If bits are unsettable, fallback to legacy
ATA without hot-plug detection, speed control/reporting, etc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253041 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252204, r252250:
mav [Mon, 8 Jul 2013 16:02:03 +0000 (16:02 +0000)]
MFC r252204, r252250:
Add bunch of names for Seagate and HGST vennor-specififc ASC/ASCQ codes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253039 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252569:
mav [Mon, 8 Jul 2013 15:59:11 +0000 (15:59 +0000)]
MFC r252569:
Fix NULL-deference kernel panic on attempt of destroying non-existing
ramdisk-backed CTL LUN.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249468:
mav [Mon, 8 Jul 2013 15:54:38 +0000 (15:54 +0000)]
MFC r249468:
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning.  NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph".  If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253037 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r241726:
andre [Mon, 8 Jul 2013 13:24:18 +0000 (13:24 +0000)]
MFC r241726:

 Move UMA socket zone initialization from uipc_domain.c to uipc_socket.c
 into one place next to its other related functions to avoid confusion.

MFC r241729:

 Move socket UMA zone initialization functionality together into
 one place.

MFC r241779:

 Tidy up somaxconn (accept queue limit) and related functions
 and move it together into one place.

git-svn-id: svn://svn.freebsd.org/base/stable/9@253035 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252846:
gjb [Mon, 8 Jul 2013 01:46:11 +0000 (01:46 +0000)]
MFC r252846:

 - Add SRC_FORCE_CHECKOUT configuration option to force svn to checkout
   the src/ tree into a directory that contains files/directories, such
   as a case where a custom kernel configuration file is specified.

 - Allow specification of multiple KERNCONFs to pass to 'make release'.

 - Move evaluation of NODOCS/NOPORTS earlier, and set based on how the
   release process expects these options to be evaluated.

 - Wrap KERNCONF specification in double quotes, and use 'eval' so multiple
   kernel configurations do not cause the build to fail in strange ways.

 - Set WITHOUT_X11 for the port build flags for the documentation toolchain
   build.  Also run 'clean distclean' targets during port build.

PR: 180192
MFC after: 3 days
Approved by: kib (mentor, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253019 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of tzdata2013d, 253009
edwin [Sun, 7 Jul 2013 22:27:36 +0000 (22:27 +0000)]
MFC of tzdata2013d, 253009

- Morocco:
  announced that the year's Ramadan daylight-savings transitions
  would be 2013-07-07 and 2013-08-10.

- Israel:
  As of 2013, DST starts at 02:00 on the Friday before the last
  Sunday in March.  DST ends at 02:00 on the first Sunday after
  October 1, unless it occurs on the second day of the Jewish Rosh
  Hashana holiday, in which case DST ends a day later (i.e. at 02:00
  the first Monday after October 2).  [Rosh Hashana holidays are
  factored in until 2100.]

git-svn-id: svn://svn.freebsd.org/base/stable/9@253010 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC bsdconfig(8) and sysrc(8) from HEAD. (shazam!)
dteske [Sun, 7 Jul 2013 19:13:34 +0000 (19:13 +0000)]
MFC bsdconfig(8) and sysrc(8) from HEAD. (shazam!)

git-svn-id: svn://svn.freebsd.org/base/stable/9@252995 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252720:
dim [Sun, 7 Jul 2013 19:05:35 +0000 (19:05 +0000)]
MFC r252720:

Pull in r185594 from llvm trunk:

  Add MachineBasicBlock::addLiveIn().

  This function adds a live-in physical register to an MBB and ensures
  that it is copied to a virtual register immediately.

Pull in r185615 from llvm trunk:

  Live-in copies go *after* EH_LABELs.

  This will soon be tested by exception handling working at all.

Pull in r185617 from llvm trunk:

  Simplify landing pad lowering.

  Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
  landing pad arguments. These nodes were previously legalized into
  CopyFromReg nodes, but that never worked properly because the
  CopyFromReg node weren't guaranteed to be  scheduled at the top of the
  basic block.

  This meant the exception pointer and selector registers could be
  clobbered before being copied to a virtual register.

  This patch copies the two physical registers to virtual registers at
  the beginning of the basic block, and lowers the landingpad instruction
  directly to two CopyFromReg nodes reading the *virtual* registers. This
  is safe because virtual registers don't get clobbered.

  A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
  nodes.

Together, these changes fix llvm PR 16038 ('qt4 webcore file results in
"Bad machine code: Using an undefined physical register"'), and should
make it possible again to compile the www/qt4-webkit port again on the
i386 arch, without using a CPUTYPE=i686 or higher setting.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252993 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252779:
tuexen [Sun, 7 Jul 2013 17:08:59 +0000 (17:08 +0000)]
MFC r252779:
Fix a bug were only 2048 streams where usable even though more than
2048 streams were negotiated on the wire. While there, remove the
hard coded limit of 2048 streams.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252978 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252718:
tuexen [Sun, 7 Jul 2013 17:06:33 +0000 (17:06 +0000)]
MFC r252718:
When processing an incoming ABORT, SHUTDOWN_COMPLETE or ERROR (NAT related)
chunk, take always the T-bit into account, when checking the verification
tag.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252585:
tuexen [Sun, 7 Jul 2013 17:04:23 +0000 (17:04 +0000)]
MFC r252585:
Code cleanups.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252976 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251248:
tuexen [Sun, 7 Jul 2013 17:01:35 +0000 (17:01 +0000)]
MFC r251248:
Use LIST_EMPTY when appropriate.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251054:
tuexen [Sun, 7 Jul 2013 16:59:33 +0000 (16:59 +0000)]
MFC r251054:
Remove redundant checks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250756:
tuexen [Sun, 7 Jul 2013 16:55:57 +0000 (16:55 +0000)]
MFC r250756:
Set errno to ETIMEDOUT if an SCTP association times out during
setup.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250754:
tuexen [Sun, 7 Jul 2013 16:53:44 +0000 (16:53 +0000)]
MFC r250754:
Don't send an ABORT chunk with verification 0.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252972 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250466:
tuexen [Sun, 7 Jul 2013 16:51:17 +0000 (16:51 +0000)]
MFC r250466:
Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLY
socket option for SCTP sockets in the same way as for UDP or TCP
sockets.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249333:
tuexen [Sun, 7 Jul 2013 16:31:07 +0000 (16:31 +0000)]
MFC r249333:
Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248953:
tuexen [Sun, 7 Jul 2013 16:29:16 +0000 (16:29 +0000)]
MFC r248953:
Add a macro for checking for IPv4 link local addresses.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248172:
tuexen [Sun, 7 Jul 2013 16:25:39 +0000 (16:25 +0000)]
MFC r248172:
Return an error if sctp_peeloff() fails because a socket can't be allocated.
sctp_peeloff() uses sonewconn() also in cases where listen() wasn't called.
So honor this use case.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r247412:
tuexen [Sun, 7 Jul 2013 16:16:32 +0000 (16:16 +0000)]
MFC r247412:
Fix a potential race in returning setting errno when an
association goes down.
Reported by Mozilla in
https://bugzilla.mozilla.org/show_bug.cgi?id=845513

git-svn-id: svn://svn.freebsd.org/base/stable/9@252967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246687:
tuexen [Sun, 7 Jul 2013 16:13:54 +0000 (16:13 +0000)]
MFC r246687:
Send the adaptation layer indication only if set by the user.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252966 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246674:
tuexen [Sun, 7 Jul 2013 16:11:13 +0000 (16:11 +0000)]
MFC r246674:
Don't send kernel provided information in the User Initiated
ABORT cause, since the user can also provide this kind of
information. So the receiver doesn't know who provided the
information.
While there: Fix a bug where the stack would send a malformed
ABORT chunk when using a send() call with SCTP_ABORT|SCT_SENDALL
flags.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246635:
tuexen [Sun, 7 Jul 2013 16:08:34 +0000 (16:08 +0000)]
MFC r246635:
Make sure that received packets for removed addresses are handled
consistently. While there, make variable names consistent.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246629:
tuexen [Sun, 7 Jul 2013 16:05:35 +0000 (16:05 +0000)]
MFC r246629:
Improve code style. No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246595:
tuexen [Sun, 7 Jul 2013 16:03:58 +0000 (16:03 +0000)]
MFC r246595:
Cleanup the handling of address scopes. Announce in the INIT/INIT-ACK
only the supported address types. While there, do some whitespace
cleanups.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252961 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246588:
tuexen [Sun, 7 Jul 2013 16:01:00 +0000 (16:01 +0000)]
MFC r246588:
Fix a bug where HEARTBEATs were still sent in SHUTDOWN_SENT or
SHUTDOWN_ACK_SENT state. While there, make the corresponding
code consistent.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244730:
tuexen [Sun, 7 Jul 2013 15:57:12 +0000 (15:57 +0000)]
MFC r244730:
Some cleanups.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244729:
tuexen [Sun, 7 Jul 2013 15:55:01 +0000 (15:55 +0000)]
MFC r244729:
Minor cleanups of debug messages.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252958 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244728:
tuexen [Sun, 7 Jul 2013 15:52:37 +0000 (15:52 +0000)]
MFC r244728:
Fix a copy and paste error.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252957 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244033:
tuexen [Sun, 7 Jul 2013 15:50:01 +0000 (15:50 +0000)]
MFC r244033:
Get it compiling without INET and INET6 support (mainly userland stack).

git-svn-id: svn://svn.freebsd.org/base/stable/9@252955 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244026:
tuexen [Sun, 7 Jul 2013 15:47:44 +0000 (15:47 +0000)]
MFC r244026:
Use correct padding of the ABORT chunk in case of an user initiated
abort cause is used.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244021:
tuexen [Sun, 7 Jul 2013 15:18:09 +0000 (15:18 +0000)]
MFC r244021:
Ensure that the padding of the last parameter of an INIT chunk
is not included in the chunk length as required by RFC 4960.
While there, cleanup sctp_send_initiate().

git-svn-id: svn://svn.freebsd.org/base/stable/9@252953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252504:
lstewart [Sun, 7 Jul 2013 14:14:44 +0000 (14:14 +0000)]
MFC r252504:

Import an implementation of the CAIA Delay-Gradient (CDG) congestion control
algorithm, which is based on the 2011 v0.1 patch release and described in the
paper "Revisiting TCP Congestion Control using Delay Gradients" by David Hayes
and Grenville Armitage. It is implemented as a kernel module compatible with the
modular congestion control framework.

CDG is a hybrid congestion control algorithm which reacts to both packet loss
and inferred queuing delay. It attempts to operate as a delay-based algorithm
where possible, but utilises heuristics to detect loss-based TCP cross traffic
and will compete effectively as required. CDG is therefore incrementally
deployable and suitable for use on shared networks.

In collaboration with: David Hayes <david.hayes at ieee.org> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco University Research Program and FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@252951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243565:
tuexen [Sun, 7 Jul 2013 13:20:35 +0000 (13:20 +0000)]
MFC r243565:
Add support for sctp_peeloff() also in the front states of the
association.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243564:
tuexen [Sun, 7 Jul 2013 13:18:19 +0000 (13:18 +0000)]
MFC r243564:
Find the endpoint for an incoming packet also if the endpoint
comes from sctp_peeloff().

git-svn-id: svn://svn.freebsd.org/base/stable/9@252949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243558:
tuexen [Sun, 7 Jul 2013 13:15:56 +0000 (13:15 +0000)]
MFC r243558:
Allow shutdown() to be used on fds returned from sctp_peeloff().

git-svn-id: svn://svn.freebsd.org/base/stable/9@252948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243516:
tuexen [Sun, 7 Jul 2013 13:13:41 +0000 (13:13 +0000)]
MFC r243516:
Remove unused function.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243302:
tuexen [Sun, 7 Jul 2013 13:10:31 +0000 (13:10 +0000)]
MFC r243302:
Cleanup the code a bit, which improves the portability.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243300:
tuexen [Sun, 7 Jul 2013 13:09:17 +0000 (13:09 +0000)]
MFC r243300:
Fix the handling of mapped IPv6 addresses in sctp_connectx().

git-svn-id: svn://svn.freebsd.org/base/stable/9@252945 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243186:
tuexen [Sun, 7 Jul 2013 13:07:42 +0000 (13:07 +0000)]
MFC r243186:
Add support for SCTP/UDP/IPV6.
his completes the support of
http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-udp-encaps

git-svn-id: svn://svn.freebsd.org/base/stable/9@252944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r243157:
tuexen [Sun, 7 Jul 2013 13:04:31 +0000 (13:04 +0000)]
MFC r243157:
Get the accounting working. We now have counters how many
chunks for each SCTP outgoing stream are in the send and
sent queue.
While there, improve the naming of NR-SACK related constants
recently introduced.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242714:
tuexen [Sun, 7 Jul 2013 12:57:45 +0000 (12:57 +0000)]
MFC r242714:
Add per outgoing stream accounting for chunks in the send
and sent queue. This provides no functional change, but is
a preparation for an upcoming stream reset improvement.
Done with rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242708, r242709:
tuexen [Sun, 7 Jul 2013 12:54:15 +0000 (12:54 +0000)]
MFC r242708, r242709:
Improve PR-SCTP if used in combination with NR-SACK.
Based on work done by Mohammad Rajiullah.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242627:
tuexen [Sun, 7 Jul 2013 12:50:04 +0000 (12:50 +0000)]
MFC r242627:
Move from early SSN assignment to late SSN assignment.
This doesn't change functionality, but makes upcoming change
much easier.
Developed with rrs@ at the IETF 85.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242512:
tuexen [Sun, 7 Jul 2013 12:34:47 +0000 (12:34 +0000)]
MFC r242512:
Fix errno in a couple of error cases.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242327:
tuexen [Sun, 7 Jul 2013 12:32:30 +0000 (12:32 +0000)]
MFC r242327:
Whitespace changes due to upstream integration of SCTP changes in the
FreeBSD code base.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242326:
tuexen [Sun, 7 Jul 2013 12:29:01 +0000 (12:29 +0000)]
MFC r242326:
Add braces (as used elsewhere in the SCTP code).

git-svn-id: svn://svn.freebsd.org/base/stable/9@252937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240849:
tuexen [Sun, 7 Jul 2013 12:25:28 +0000 (12:25 +0000)]
MFC r240849:
Whitespace change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240848:
tuexen [Sun, 7 Jul 2013 11:58:43 +0000 (11:58 +0000)]
MFC r240848:
Declare a static function as such.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252935 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240842:
tuexen [Sun, 7 Jul 2013 11:56:28 +0000 (11:56 +0000)]
MFC r240842:
Fix a bug related to handling Re-config chunks. It is not true that
the association can be removed if the socket is gone.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252934 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240826:
tuexen [Sun, 7 Jul 2013 11:53:34 +0000 (11:53 +0000)]
MFC r240826:
Small cleanups. No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240507:
tuexen [Sun, 7 Jul 2013 11:50:51 +0000 (11:50 +0000)]
MFC r240507:
Small cleanups. No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240263:
tuexen [Sun, 7 Jul 2013 11:47:06 +0000 (11:47 +0000)]
MFC r240263:
Whitespace changes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240250:
tuexen [Sun, 7 Jul 2013 11:44:32 +0000 (11:44 +0000)]
MFC r240250:
Whitespace cleanup.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252930 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240198:
tuexen [Sun, 7 Jul 2013 11:41:12 +0000 (11:41 +0000)]
MFC r240198:
Don't include a structure containing a flexible array in another
structure.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240158:
tuexen [Sun, 7 Jul 2013 11:36:46 +0000 (11:36 +0000)]
MFC r240158:
Get rid of a gcc'ism.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252928 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240148:
tuexen [Sun, 7 Jul 2013 11:33:51 +0000 (11:33 +0000)]
MFC r240148:
Using %p in a format string requires a void *.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240115:
tuexen [Sun, 7 Jul 2013 11:28:44 +0000 (11:28 +0000)]
MFC r240115:
Use the consistenly the size of a variable. This helps to keep the code
simpler for the userland implementation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240114:
tuexen [Sun, 7 Jul 2013 11:26:15 +0000 (11:26 +0000)]
MFC r240114:
Whitespace change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252925 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r239035:
tuexen [Sun, 7 Jul 2013 11:20:12 +0000 (11:20 +0000)]
MFC r239035:
Testing an interface property should depend on the interface, not
on an address.

git-svn-id: svn://svn.freebsd.org/base/stable/9@252924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r238455:
tuexen [Sun, 7 Jul 2013 11:15:54 +0000 (11:15 +0000)]
MFC r238455:
Use case for selecting the address family (as in other places).

git-svn-id: svn://svn.freebsd.org/base/stable/9@252923 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f