]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
10 years agoMFC: r263121
brueffer [Thu, 27 Mar 2014 20:13:53 +0000 (20:13 +0000)]
MFC: r263121

Re-format the license to conform to our BSD license template as much
as possible.  This does not change the wording in any way.

Remove the 3rd clause ("advertising clause") of the BSD license as
permitted by the University of Berkeley on July 22, 1999.  While the
clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole
copyright holder of this file.

Reviewed by: imp, emaste, eadler

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

10 years agoMFC r262867
asomers [Thu, 27 Mar 2014 16:47:35 +0000 (16:47 +0000)]
MFC r262867

Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical buffers
drop packets".  It was caused by a check for the space available in a
sockbuf, but it was checking the wrong sockbuf.

sys/sys/sockbuf.h
sys/kern/uipc_sockbuf.c
Add sbappendaddr_nospacecheck_locked(), which is just like
sbappendaddr_locked but doesn't validate the receiving socket's space.
Factor out common code into sbappendaddr_locked_internal().  We
shouldn't simply make sbappendaddr_locked check the space and then call
sbappendaddr_nospacecheck_locked, because that would cause the O(n)
function m_length to be called twice.

sys/kern/uipc_usrreq.c
Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets,
because the receiving sockbuf's size limit is irrelevant.

tests/sys/kern/unix_seqpacket_test.c
Now that 185813 is fixed, pipe_128k_8k fails intermittently due to
185812.  Make it fail every time by adding a usleep after starting the
writer thread and before starting the reader thread in test_pipe.  That
gives the writer time to fill up its send buffer.  Also, clear the
expected failure message due to 185813.  It actually said "185812", but
that was a typo.

PR: kern/185813

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

10 years agoMFC r263423:
hselasky [Thu, 27 Mar 2014 06:59:56 +0000 (06:59 +0000)]
MFC r263423:
Try to resolve a possible deadlock when detaching USB devices which
create character devices. The deadlock can happen if an application is
issuing IOCTLs which require USB refcounting, at the same time the USB
device is detaching.

There is already a counter in place in the USB device structure to
detect this situation, but it was not always checked ahead of invoking
functions that might destroy character devices, like detach, set
configuration, set alternate interface or detach active kernel driver.

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

10 years agoMFC r263291 and r263292:
hselasky [Thu, 27 Mar 2014 06:55:26 +0000 (06:55 +0000)]
MFC r263291 and r263292:
Update USB template manual page.

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

10 years agoMFC r262501:
delphij [Thu, 27 Mar 2014 00:23:44 +0000 (00:23 +0000)]
MFC r262501:

Refresh our implementation of OpenBSD's Blowfish password format.

Notable changes:

 - Support of $2b$ password format to address a problem where very
   long passwords (more than 256 characters, when an integer
   overflow would happen and cause the length to wrap at 256).
 - Updated pseudo code in comments to reflect the reality.
 - Removed our local shortcut of processing magic string and rely
   on the centralized and tigntened validation.
 - Diff reduction from upstream.

For now we are still generating the older $2a$ format of password
but we will migrate to the new format once the format is formally
finalized.

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

10 years agoMFC r262991:
delphij [Wed, 26 Mar 2014 23:57:09 +0000 (23:57 +0000)]
MFC r262991:

Correct a typo in nlm_find_host_by_addr(): the intention of the
code is to give "<unknown>" rather than comparing the buffer
against it.

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

10 years agoMFC r262657:
dim [Wed, 26 Mar 2014 20:10:07 +0000 (20:10 +0000)]
MFC r262657:

Apply fix for lldb not linking after the sparc backend import.

Reported by: se
Pointy hat to: dim

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

10 years agoMFC r263349:
kib [Wed, 26 Mar 2014 16:59:28 +0000 (16:59 +0000)]
MFC r263349:
Make the array pointed to by AT_PAGESIZES auxv properly aligned.

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

10 years agoMFC r263312:
dim [Wed, 26 Mar 2014 07:42:43 +0000 (07:42 +0000)]
MFC r263312:

Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

  Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by: ashish
PR: ports/183064

MFC r263313:

Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

  ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by: mandree

MFC r263320:

Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.

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

10 years agoMFC r262613:
dim [Wed, 26 Mar 2014 07:31:57 +0000 (07:31 +0000)]
MFC r262613:

Merge the projects/clang-sparc64 branch back to head.  This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.

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

10 years agoMFC r263306:
kib [Tue, 25 Mar 2014 20:17:57 +0000 (20:17 +0000)]
MFC r263306:
Add some support for the PCI(e)-PCI bridges to the Intel VT-d driver.

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

10 years agoMFC r263305:
kib [Tue, 25 Mar 2014 20:16:28 +0000 (20:16 +0000)]
MFC r263305:
Provide a workaround by identity mapping the 32 pages after the bogus
entry start, which seems to be enough for the reported BIOS.

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

10 years agoMFC 262782:
trasz [Tue, 25 Mar 2014 13:18:09 +0000 (13:18 +0000)]
MFC 262782:

Fix missing unlock in persistent reservations code, which resulted in panics
with Hyper-V Failover Cluster.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r263356:
trasz [Tue, 25 Mar 2014 12:38:43 +0000 (12:38 +0000)]
MFC r263356:

Make the error message more clear.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261752:
trasz [Tue, 25 Mar 2014 12:33:16 +0000 (12:33 +0000)]
MFC r261752:

Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error.  This fixes interoperability with
OpenBSD initiator.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261751:
trasz [Tue, 25 Mar 2014 12:31:08 +0000 (12:31 +0000)]
MFC r261751:

The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of__printf0like.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261962:
trasz [Tue, 25 Mar 2014 12:26:00 +0000 (12:26 +0000)]
MFC r261962:

Mention that rctl(8) was sponsored by the Foundation.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261764:
trasz [Tue, 25 Mar 2014 12:24:18 +0000 (12:24 +0000)]
MFC r261764:

So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived ctld(8) zombies disappear.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261763:
trasz [Tue, 25 Mar 2014 12:22:30 +0000 (12:22 +0000)]
MFC r261763:

Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261762:
trasz [Tue, 25 Mar 2014 12:20:29 +0000 (12:20 +0000)]
MFC r261762:

Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261761:
trasz [Tue, 25 Mar 2014 12:18:37 +0000 (12:18 +0000)]
MFC r261761:

Update manual page to match recent auth-group "default" changes.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261760:
trasz [Tue, 25 Mar 2014 12:16:52 +0000 (12:16 +0000)]
MFC r261760:

Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it.  From now on, assigning auth-group to a target is no longer
mandatory.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261759:
trasz [Tue, 25 Mar 2014 12:14:48 +0000 (12:14 +0000)]
MFC r261759:

Make it possible to redefine portal-group "default".

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261758:
trasz [Tue, 25 Mar 2014 12:12:37 +0000 (12:12 +0000)]
MFC r261758:

Add auth-type.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261757:
trasz [Tue, 25 Mar 2014 12:10:30 +0000 (12:10 +0000)]
MFC r261757:

Rename a variable, no functional changes.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261756:
trasz [Tue, 25 Mar 2014 12:08:35 +0000 (12:08 +0000)]
MFC r261756:

Yacc cleanup; no functional changes.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261755:
trasz [Tue, 25 Mar 2014 12:06:42 +0000 (12:06 +0000)]
MFC r261755:

Make function ordering slightly more logical; no functional changes.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261754:
trasz [Tue, 25 Mar 2014 12:01:55 +0000 (12:01 +0000)]
MFC r261754:

Implement initiator-name and initiator-portal restrictions.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261753:
trasz [Tue, 25 Mar 2014 12:00:05 +0000 (12:00 +0000)]
MFC r261753:

Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261750:
trasz [Tue, 25 Mar 2014 11:58:24 +0000 (11:58 +0000)]
MFC r261750:

Improve check for duplicated paths.  It shows the warning twice for every
path (once for each duplicate found), but it should do for now.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261749:
trasz [Tue, 25 Mar 2014 11:53:47 +0000 (11:53 +0000)]
MFC r261749:

Refactor.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261768:
trasz [Tue, 25 Mar 2014 11:46:46 +0000 (11:46 +0000)]
MFC r261768:

Make the debug messages during ctld(8) shutdown less confusing.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261767:
trasz [Tue, 25 Mar 2014 11:45:03 +0000 (11:45 +0000)]
MFC r261767:

Show proper configuration file line numbers in error messages.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261766:
trasz [Tue, 25 Mar 2014 11:43:09 +0000 (11:43 +0000)]
MFC r261766:

Make ctld error out on invalid characters in ctl.conf.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r261765:
trasz [Tue, 25 Mar 2014 11:41:10 +0000 (11:41 +0000)]
MFC r261765:

Improve error reporting.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD
emaste [Mon, 24 Mar 2014 13:48:04 +0000 (13:48 +0000)]
MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD

  The NetBSD Foundation states "Third parties are encouraged to change the
  license on any files which have a 4-clause license contributed to the
  NetBSD Foundation to a 2-clause license."

  This change removes clauses 3 and 4 from copyright / license blocks that
  list The NetBSD Foundation as the only copyright holder.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r263471:
kib [Mon, 24 Mar 2014 12:40:53 +0000 (12:40 +0000)]
MFC r263471:
Initialize vm_map_entry member wiring_thread on the map entry creation.

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

10 years agoMerge r263497: fix ipfw + VIMAGE sysctls.
glebius [Mon, 24 Mar 2014 10:19:07 +0000 (10:19 +0000)]
Merge r263497: fix ipfw + VIMAGE sysctls.

PR: kern/187665

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

10 years agoMFC: r263441:
pfg [Sun, 23 Mar 2014 19:48:30 +0000 (19:48 +0000)]
MFC: r263441:

msdosfs: minor format fix - spaces vs tab

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

10 years agoMerge r263658 from head: remove unneeded fake _KERNEL definition.
glebius [Sun, 23 Mar 2014 19:07:14 +0000 (19:07 +0000)]
Merge r263658 from head: remove unneeded fake _KERNEL definition.
Should fix broken builds.

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

10 years agoTurn off warnings for building aicasm. Various versions of yacc exist,
dim [Sun, 23 Mar 2014 14:18:40 +0000 (14:18 +0000)]
Turn off warnings for building aicasm.  Various versions of yacc exist,
which can result in different warnings-as-errors in this tool, but these
are all completely harmless.

This is a direct commit to stable/7, stable/8, stable/9 and stable/10,
since this kernel build tool has already been removed in head.

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

10 years agoFurther refine the auth fail regex to catch more auth failures and
brueffer [Sun, 23 Mar 2014 12:58:48 +0000 (12:58 +0000)]
Further refine the auth fail regex to catch more auth failures and
reduce false positives.

The committed patch was provided by Christian Marg.

PR: 91732
Submitted by: Daniel O'Connor <doconnor at gsoft.com.au>
   Skye Poier <spoier at gmail.com>
   Alan Amesbury <amesbury at umn.edu>
   Christian Marg <marg at rz.tu-clausthal.de>

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

10 years agoMerge missed r262819, that fixes broken build.
glebius [Sun, 23 Mar 2014 06:05:58 +0000 (06:05 +0000)]
Merge missed r262819, that fixes broken build.

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

10 years agoMFC r263434:
gjb [Sun, 23 Mar 2014 02:29:28 +0000 (02:29 +0000)]
MFC r263434:
  Update commit template to include 'Relnotes:' tag, to
  help re@ track release notes candidates.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r263159:
hselasky [Sat, 22 Mar 2014 17:18:44 +0000 (17:18 +0000)]
MFC r263159:
Workaround for USB MIDI adapters which use non-supported values of
wMaxPacketSize for BULK endpoints.

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

10 years agoMFC r263155:
hselasky [Sat, 22 Mar 2014 17:16:40 +0000 (17:16 +0000)]
MFC r263155:
Add support for more sample rates to USB audio driver.

PR: usb/171254

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

10 years agoMFC of 263062:
mckusick [Sat, 22 Mar 2014 11:43:35 +0000 (11:43 +0000)]
MFC of 263062:

Avoid segment fault when attempting to clean up cylinder group
buffer cache.

PR:             187221
Submitted by:   Petr Lampa <lampa@fit.vutbr.cz>
Obtained from:  Petr Lampa <lampa@fit.vutbr.cz>
MFC after:      1 week

MFC of 262488:

Arguments for malloc and calloc should be size_t, not int.
Use proper bounds check when trying to free cached memory.

Spotted by: Xin Li
Tested by:  Dmitry Sivachenko
MFC after:  2 weeks

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

10 years agoMFC r263181:
bdrewery [Sat, 22 Mar 2014 10:47:49 +0000 (10:47 +0000)]
MFC r263181:

  Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion.

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

10 years agoMFC r263180:
bdrewery [Sat, 22 Mar 2014 10:40:04 +0000 (10:40 +0000)]
MFC r263180:

  Fix ABI from /usr/local/etc/pkg.conf not being respected.

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

10 years agoMFC 262999
edavis [Fri, 21 Mar 2014 23:04:23 +0000 (23:04 +0000)]
MFC 262999
Fixed MSI interrupt allocation and handling.
Fixed a DMA mapping leak that occurs when defragmenting packet chains.

Approved by: davidch (mentor)

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

10 years agoMFC r262868
asomers [Fri, 21 Mar 2014 22:43:00 +0000 (22:43 +0000)]
MFC r262868

Only use -lpthread for unix_seqpacket_test, not for all test programs.

MFC r262894

kern/Makefile
        Set WARNS=5 for all files in this directory
kern/unix_seqpacket_test.c
Fix compiler warnings.  Most were benign, but rcvbuf_oversized
wasn't working as intended because I forgot to set the buffer sizes.

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

10 years agoMFC 261991:
dim [Fri, 21 Mar 2014 17:53:59 +0000 (17:53 +0000)]
MFC 261991:

Upgrade our copy of llvm/clang to 3.4 release.  This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC 262121 (by emaste):

Update lldb for clang/llvm 3.4 import

This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by: DARPA, AFRL

MFC 262186 (by emaste):

Fix mismerge in r262121

A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.

MFC 262303:

Pull in r197521 from upstream clang trunk (by rdivacky):

  Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by: jhibbits

MFC 262611:

Pull in r196874 from upstream llvm trunk:

  Fix a crash that occurs when PWD is invalid.

  MCJIT needs to be able to run in hostile environments, even when PWD
  is invalid. There's no need to crash MCJIT in this case.

  The obvious fix is to simply leave MCContext's CompilationDir empty
  when PWD can't be determined. This way, MCJIT clients,
  and other clients that link with LLVM don't need a valid working directory.

  If we do want to guarantee valid CompilationDir, that should be done
  only for clients of getCompilationDir(). This is as simple as checking
  for an empty string.

  The only current use of getCompilationDir is EmitGenDwarfInfo, which
  won't conceivably run with an invalid working dir. However, in the
  purely hypothetically and untestable case that this happens, the
  AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by: decke

MFC 262809:

Pull in r203007 from upstream clang trunk:

  Don't produce an alias between destructors with different calling conventions.

  Fixes pr19007.

(Please note that is an LLVM PR identifier, not a FreeBSD one.)

This should fix Firefox and/or libxul crashes (due to problems with
regparm/stdcall calling conventions) on i386.

Reported by: multiple users on freebsd-current
PR: bin/187103

MFC 263048:

Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

Apparently some versions of CMake still rely on this archaic feature...

Reported by: rakuco

MFC 263049:

Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp.  This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all.  These directories are now only used
if you pass -stdlib=libstdc++.

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

10 years agoMerge r262763, r262767, r262771, r262806 from head:
glebius [Fri, 21 Mar 2014 15:15:30 +0000 (15:15 +0000)]
Merge r262763, r262767, r262771, r262806 from head:
  - Remove rt_metrics_lite and simply put its members into rtentry.
  - Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This
    removes another cache trashing ++ from packet forwarding path.
  - Create zini/fini methods for the rtentry UMA zone. Via initialize
    mutex and counter in them.
  - Fix reporting of rmx_pksent to routing socket.
  - Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode.

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

10 years agoMFC r263304:
kib [Fri, 21 Mar 2014 13:31:56 +0000 (13:31 +0000)]
MFC r263304:
Trim at EOL.

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

10 years agoMFC r262408 (by ian):
dim [Fri, 21 Mar 2014 00:19:20 +0000 (00:19 +0000)]
MFC r262408 (by ian):

Eliminate an unused-var warning by wrapping #if 0 around some tables of
values that were probably entered "for completeness" from a datasheet, and
for all I know may be useful/necessary some day.

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

10 years agoMFC r262393 (by ian):
dim [Thu, 20 Mar 2014 23:48:18 +0000 (23:48 +0000)]
MFC r262393 (by ian):

Fix a typo _IMX51_TZICRREG_H_ -> _IMX51_TZICREG_H_ (extra R)

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

10 years agoMFC r260183: MFV r260154 + 260182:
delphij [Thu, 20 Mar 2014 00:28:53 +0000 (00:28 +0000)]
MFC r260183: MFV r260154 + 260182:

4369 implement zfs bookmarks
4368 zfs send filesystems from readonly pools

Illumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332

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

10 years agoMFC r259850: MFV r258384:
delphij [Thu, 20 Mar 2014 00:24:35 +0000 (00:24 +0000)]
MFC r259850: MFV r258384:

2583 Add -p (parsable) option to zfs list

illumos/illumos-gate@43d68d68c1ce08fb35026bebfb141af422e7082e

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

10 years agoMFC r256999 (smh):
delphij [Thu, 20 Mar 2014 00:10:58 +0000 (00:10 +0000)]
MFC r256999 (smh):

Added support for the 'zfs list -t snap' and 'zfs snap' aliases which are
available under Oracle Solaris 11.

This includes an update to the ZFS(8) man page to reflect all the
available alias (snap, umount, and recv).

Initial changes obtained from ZFS On Linux + fixes for man page and cmd
help:
https://github.com/zfsonlinux/zfs/commit/10b75496bb0cb7a7b8146c263164adc37f1d176a
https://github.com/zfsonlinux/zfs/commit/cf81b00a73fe47fdb21586ac1cc179b734540973

Obtained from:  https://github.com/zfsonlinux/zfs

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

10 years agoMFC r260181:
delphij [Thu, 20 Mar 2014 00:05:23 +0000 (00:05 +0000)]
MFC r260181:

Fix build on platforms where atomic_swap_64 is not available.

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

10 years agoMFC r260157: MFV r260153:
delphij [Thu, 20 Mar 2014 00:01:19 +0000 (00:01 +0000)]
MFC r260157: MFV r260153:

4121 vdev_label_init should treat request as succeeded when pool
     is read only

illumos/illumos-gate@973c78e94bf9634782164382c9e291bf81161fa5

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

10 years agoMFC r260150: MFV r259170:
delphij [Wed, 19 Mar 2014 23:55:03 +0000 (23:55 +0000)]
MFC r260150: MFV r259170:

4370 avoid transmitting holes during zfs send

4371 DMU code clean up

illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f

NOTE: Make sure the boot code is updated if a zpool upgrade is
done on boot zpool.

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

10 years agoMFC r260141: MFV r258385:
delphij [Wed, 19 Mar 2014 23:50:13 +0000 (23:50 +0000)]
MFC r260141: MFV r258385:

(Note: this change is not applicable to FreeBSD and the file
is not included in build.  It's integrated for completeness).

4128 disks in zpools never go away when pulled

illumos/illumos-gate@39cddb10a31c1c2e66aed69e6871d09caa4c8147

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

10 years agoMFC r260138: MFV r242733:
delphij [Wed, 19 Mar 2014 23:44:03 +0000 (23:44 +0000)]
MFC r260138: MFV r242733:

3306 zdb should be able to issue reads in parallel
3321 'zpool reopen' command should be documented in the man page
and help message

illumos/illumos-gate@31d7e8fa33fae995f558673adb22641b5aa8b6e1

FreeBSD porting notes: the kernel part of this changeset depends
on Solaris buf(9S) interfaces and are not really applicable for
our use.  vdev_disk.c is patched as-is to reduce diverge from
upstream, but vdev_file.c is left intact.

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

10 years agoMFC r259813 + r259813: MFV r258374:
delphij [Wed, 19 Mar 2014 23:36:12 +0000 (23:36 +0000)]
MFC r259813 + r259813: MFV r258374:

4171 clean up spa_feature_*() interfaces

4172 implement extensible_dataset feature for use by other zpool
features

illumos/illumos-gate@2acef22db7808606888f8f92715629ff3ba555b9

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

10 years agoMFC r259860 (by mjacob):
dim [Wed, 19 Mar 2014 22:50:14 +0000 (22:50 +0000)]
MFC r259860 (by mjacob):

Harvest one no longer used constant string.

Remove another and place it into play in the
normally ifdef protected zone it would be used
int.

Noticed by: dim

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

10 years agoMFC r258005: Merge upstream LLVM r192118:
emaste [Wed, 19 Mar 2014 20:46:02 +0000 (20:46 +0000)]
MFC r258005: Merge upstream LLVM r192118:

  Formally added an explicit enum for DWARF TLS support. No functionality
  change.

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258003: Merge upstream LLVM r182803:
emaste [Wed, 19 Mar 2014 19:31:21 +0000 (19:31 +0000)]
MFC r258003: Merge upstream LLVM r182803:

  [Mips] Add Mips specific dynamic table entry tags.

Sponsored by: DARPA, AFRL

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

10 years agoMerge r257485: install netpfil/pf includes.
glebius [Wed, 19 Mar 2014 13:37:51 +0000 (13:37 +0000)]
Merge r257485: install netpfil/pf includes.

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

10 years agoMFC r258897: Update LLDB to upstream r196322 snapshot
emaste [Wed, 19 Mar 2014 13:24:47 +0000 (13:24 +0000)]
MFC r258897: Update LLDB to upstream r196322 snapshot

  Upstream revisions of note:
  r196298 - Fix use of std::lower_bound
  r196322 - Fix log message for new invalidation checks

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258892: lldb: Threaded inferior support for FreeBSD
emaste [Wed, 19 Mar 2014 13:19:56 +0000 (13:19 +0000)]
MFC r258892: lldb: Threaded inferior support for FreeBSD

  This is in the process of being submitted to the upstream LLDB
  repository.  The thread list functionality is modelled in part on
  GDBRemoteCommunicationClient.

  LLDB bug pr16696 and code review D2267

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258884: Update LLDB to upstream r196259 snapshot
emaste [Wed, 19 Mar 2014 13:18:42 +0000 (13:18 +0000)]
MFC r258884: Update LLDB to upstream r196259 snapshot

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258873: Workaround lldb issue with main module base address
emaste [Wed, 19 Mar 2014 13:16:58 +0000 (13:16 +0000)]
MFC r258873: Workaround lldb issue with main module base address

  On FreeBSD lldb sometimes reloads the the main module's (executable's)
  symbols at the wrong address.  Work around this for now by explicitly
  reloading at base_address=0 when it happens.

  A proper fix is needed but early testers have reported this issue so
  this workaround should allow them to make further progress.

  http://llvm.org/bugs/show_bug.cgi?id=17880

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258098: Merge upstream LLDB r194487:
emaste [Wed, 19 Mar 2014 13:15:16 +0000 (13:15 +0000)]
MFC r258098: Merge upstream LLDB r194487:

  Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

  In order to help track down llvm.org/pr17226.

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258094: lldb: Correct a standalone debug file path
emaste [Wed, 19 Mar 2014 13:13:47 +0000 (13:13 +0000)]
MFC r258094: lldb: Correct a standalone debug file path

  For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
  should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

  ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

  Upstream defect pr17903 (http://llvm.org/pr17903)

Sponsored by: DARPA, AFRL

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

10 years agoMFC r258054: Update LLDB to upstream r194122 snapshot
emaste [Wed, 19 Mar 2014 13:11:35 +0000 (13:11 +0000)]
MFC r258054: Update LLDB to upstream r194122 snapshot

  Inludes minor changes relative to upstream, for compatibility with
  FreeBSD's in-tree LLVM 3.3:

  - Reverted LLDB r191806, restoring use of previous API.
  - Reverted part of LLDB r189317, restoring previous enum names.
  - Work around missing LLVM r192504, using previous registerEHFrames API
    (limited functionality).
  - Removed PlatformWindows header include and init/terminate calls.

Sponsored by: DARPA, AFRL

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

10 years agoMFC r263095:
kib [Wed, 19 Mar 2014 13:09:17 +0000 (13:09 +0000)]
MFC r263095:
Initialize paddr to handle the case of zero size.

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

10 years agoMFC r263092:
kib [Wed, 19 Mar 2014 13:04:16 +0000 (13:04 +0000)]
MFC r263092:
Do not vdrop() the tmpfs vnode until it is unlocked.  The hold
reference might be the last, and then vdrop() would free the vnode.

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

10 years agoMFC r263080:
kib [Wed, 19 Mar 2014 13:02:17 +0000 (13:02 +0000)]
MFC r263080:
Use correct types for sizeof() in the calculations for the malloc(9) sizes.

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

10 years agoMFC r263079:
kib [Wed, 19 Mar 2014 12:55:57 +0000 (12:55 +0000)]
MFC r263079:
The auio structure is only initialized when the vnode is symlink,
avoid reading from it otherwise.

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

10 years agoMerge r259562,r259566,r259638,r259645,r260124 by melifaro:
glebius [Wed, 19 Mar 2014 09:36:29 +0000 (09:36 +0000)]
Merge r259562,r259566,r259638,r259645,r260124 by melifaro:

  Switch netstat -rn to use standard API for retrieving list
  of routes instead of peeking inside in-kernel radix via kget.

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

10 years agoMerge r262747: remove extraneous ifa_ref()/ifa_free().
glebius [Wed, 19 Mar 2014 09:23:58 +0000 (09:23 +0000)]
Merge r262747: remove extraneous ifa_ref()/ifa_free().

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

10 years agoMFC r263105, r263106:
gjb [Wed, 19 Mar 2014 01:43:03 +0000 (01:43 +0000)]
MFC r263105, r263106:

r263105:
  Add hyperv manual pages provided by Microsoft, formatted
  for FreeBSD standards.  Very little, if any, content was
  modified.

r263106:
  Connect the hyperv driver manuals to the build.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r263021:
bdrewery [Wed, 19 Mar 2014 00:53:24 +0000 (00:53 +0000)]
MFC r263021:

  Support Last-Modified behind proxies which return UTC instead of GMT.

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

10 years agoMerge r263091: fix mbuf flags clash that lead to failure of operation
glebius [Tue, 18 Mar 2014 16:56:05 +0000 (16:56 +0000)]
Merge r263091: fix mbuf flags clash that lead to failure of operation
of IPSEC and packet filters.

PR: kern/185876
PR: kern/186755

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

10 years agoMFC r262741:
mav [Tue, 18 Mar 2014 14:18:45 +0000 (14:18 +0000)]
MFC r262741:
Do not retry on CAM_FUNC_NOTAVAIL error, but return immediately.

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

10 years agoMFC r262754: MFV r253848 (mm):
delphij [Tue, 18 Mar 2014 00:59:49 +0000 (00:59 +0000)]
MFC r262754: MFV r253848 (mm):

Update vendor/xz from v5.0 branch to post-5.0.5

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

10 years agoMFC r262325:
markj [Tue, 18 Mar 2014 00:55:19 +0000 (00:55 +0000)]
MFC r262325:
Print a backtrace if the SDT(9) stub gets called so that there's at least
some hope of figuring out how it happened.

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

10 years agoMFC r259535:
markj [Tue, 18 Mar 2014 00:29:33 +0000 (00:29 +0000)]
MFC r259535:
The fasttrap fork handler is responsible for removing tracepoints in the
child process that were inherited from its parent. However, this should
not be done in the case of a vfork, since the fork handler ends up removing
the tracepoints from the shared vm space, and userland DTrace probes in the
parent will no longer fire as a result.

Now the child of a vfork may trigger userland DTrace probes enabled in its
parent, so modify the fasttrap probe handler to handle this case and handle
the child process in the same way that it would handle the traced process.
In particular, if once traces function foo() in a process that vforks, and
the child calls foo(), fasttrap will treat this call as having come from the
parent. This is the behaviour of the upstream code.

While here, add #ifdef guards to some code that isn't present upstream.

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

10 years agoMFC r263120:
dim [Mon, 17 Mar 2014 20:42:45 +0000 (20:42 +0000)]
MFC r263120:

Pull in r201021 from upstream libc++ trunk:

  Fix for PR18735 - self-assignment for map/multimap gives incorrect
  results in C++03

(Please note: that is an LLVM PR identifier, not a FreeBSD one.)

Reported by: rakuco

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

10 years agoMFC r262676:
delphij [Mon, 17 Mar 2014 19:09:00 +0000 (19:09 +0000)]
MFC r262676:

All callers of static method load_nvlist() in spa.c handles error case,
so there is no reason to assert that we won't hit an error.  Instead,
just return that error to caller and have the upper layer handle it.

Obtained from: FreeNAS
Reported by: rodrigc
Reviewed by: Matthew Ahrens

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

10 years agoMFC r262972:
hselasky [Mon, 17 Mar 2014 06:38:40 +0000 (06:38 +0000)]
MFC r262972:
Ignore USB keyboard driver calls from critical sections.

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

10 years agoMFC r263107:
davidxu [Mon, 17 Mar 2014 05:03:53 +0000 (05:03 +0000)]
MFC r263107:

To avoid missing a chance to cancel thread, call _pthread_testcancel at the
beginning of _sem_timedwait.

Submitted by: Eric van Gyzen &lt; eric at vangyzen dot net &gt;

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

10 years agoMFC r263153, r263154:
kevlo [Mon, 17 Mar 2014 02:14:13 +0000 (02:14 +0000)]
MFC r263153, r263154:

- Similar to r246614, fix panic on removing urtwn(4).  It happens because
  nodes are freed after the adapter is gone.

- Reset the bit of the R92C_MCUFWDL associated with checksum report
  before loading firmware page.  It may fix this problem:
  "urtwn0: timeout waiting for checksum report"

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

10 years agoPull in r192123 from upstream llvm trunk (by Benjamin Kramer):
dim [Sun, 16 Mar 2014 16:33:25 +0000 (16:33 +0000)]
Pull in r192123 from upstream llvm trunk (by Benjamin Kramer):

  X86: Fix type check. Just because an integer type is illegal doesn't
  mean it's i64.

  Fixes PR17495, where an i24 triggered this code. It's intended to
  optimize i64 loads on 32 bit x86.

Fixes "Cannot select" fatal errors when building the audio/jack port
with ALSA support turned on.

This is a direct commit to stable/9 and stable/10, since head already
has the commit as part of an upgrade to llvm/clang 3.4.

Reported by: Radim Kolar <hsn@sendmail.cz> via http://llvm.org/bugs/

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

10 years agoMFC r262663:
hselasky [Sat, 15 Mar 2014 18:19:09 +0000 (18:19 +0000)]
MFC r262663:
- Make pointer easier to control when moving slowly.
- Increase chance of vertical scrolling as vertical scrolling is used more often.

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

10 years agoMFC r261421
jhibbits [Sat, 15 Mar 2014 00:23:35 +0000 (00:23 +0000)]
MFC r261421

Add driver for the ADT7460/ADT7467 fan controller found in later PowerBooks
and iBooks.  Original work by andreast.

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

10 years agoMFC r261422
jhibbits [Fri, 14 Mar 2014 16:42:20 +0000 (16:42 +0000)]
MFC r261422

Make gas accept any PowerPC instruction by default.  This is a local change,
and will not be submitted upstream.

Discussed with:       nwhitehorn,rdivacky

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

10 years agoMFC
hselasky [Fri, 14 Mar 2014 09:42:57 +0000 (09:42 +0000)]
MFC
Sync usb.conf file to head branch.

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

10 years agoMFC r262550, r262551 and r262554:
hselasky [Fri, 14 Mar 2014 09:11:09 +0000 (09:11 +0000)]
MFC r262550, r262551 and r262554:
Add support for kqfilter to USB character devices.

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