]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r304779, r304780, r304781, r304782, r304802
cy [Sat, 27 Aug 2016 02:53:21 +0000 (02:53 +0000)]
MFC r304779, r304780, r304781, r304782, r304802

r304779:

  Revert r298887 (spelling fix) and remove $FreeBSD$ because text changes
  to leap-seconds invaldidates validation hash at the end of the file.

  Remove svn:keywords and replace with fbsd:nokeywords=yes to
  support this change.

r304780:

  Change the algorithm by which /var/db/leap-seconds is updated.

  1. Use the leap-seconds version number (update time) to determine
     whether to update the file or not.

  2. If the version numbers of the files is the same, use the later
     expiry date to determine which file to use.

  Suggested by: ian@

r304781:

  Add logic to replace the working ntp leap-seconds file in /var/db
  if it contains a $FreeBSD$ header. The header will cause the file
  to fail checksum of the hash causing ntpd to ignore the file.

r304782:

  Make validation of the leap-seconds file unconditional.

r304802:

  Remove the gratuitous check for $FreeBSD$ and rename the function
  to ntpd_init_leapfile, to ensure a copy exists in /var/db if a copy
  isn't already there.

  Reported by: ache@

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

7 years agoMFC r304721:
cy [Sat, 27 Aug 2016 02:27:29 +0000 (02:27 +0000)]
MFC r304721:

Fixup man page formatting.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
Discussed with: bjk@

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

7 years agoBump __FreeBSD_version after LC_*_MASK fix
ache [Fri, 26 Aug 2016 21:26:33 +0000 (21:26 +0000)]
Bump __FreeBSD_version after LC_*_MASK fix

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

7 years agoMFC r304703, r304755
ache [Fri, 26 Aug 2016 21:19:23 +0000 (21:19 +0000)]
MFC r304703, r304755

1) _locale.h
LC_*_MASK bit shifting order was partially broken from the initial commit
time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the
right order.

The order here should match XLC_* from "xlocale_private.h" which, in turn,
match LC_* publicly visible order from <locale.h> which determines how
locale components are stored in the structure.
LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale()
and equivalent shift loop in the newlocale(), so mapped to some wrong
components (excluding two mentioned above).

Formally the fix is ABI breakage, but old code using those masks
never works properly in any case.
Only newlocale() and querylocale() are affected.

2) msgcat.c
Use current locale (f.e. set by thread). It was global locale always
previously.

PR:     211743

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

7 years agoMFC r304342:
hselasky [Fri, 26 Aug 2016 12:06:43 +0000 (12:06 +0000)]
MFC r304342:
Add support for setting blocking and non-blocking mode on /dev/rdma_cm
by returning success on FIONBIO and FIOASYNC IOCTLs. The actual flags
handling is done by the kern_ioctl() function.

Reported by: Alex Bowden <alex.bowden@outlook.com>
Sponsored by: Mellanox Technologies

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

7 years agoMFC 303766
sephe [Fri, 26 Aug 2016 06:19:12 +0000 (06:19 +0000)]
MFC 303766
    tcp/lro: If timestamps mismatch or it's a FIN, force flush.

    This keeps the segments/ACK/FIN delivery order.

    Before this patch, it was observed: if A sent FIN immediately after
    an ACK, B would deliver FIN first to the TCP stack, then the ACK.
    This out-of-order delivery causes one unnecessary ACK sent from B.

    Reviewed by:    gallatin, hps
    Obtained from:  rrs, gallatin
    Sponsored by:   Netflix (rrs, gallatin), Microsoft (sephe)
    Differential Revision:  https://reviews.freebsd.org/D7415

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

7 years agoMFC r295632
ache [Thu, 25 Aug 2016 19:55:31 +0000 (19:55 +0000)]
MFC r295632

getln: We cannot expand the buffer beyond INT_MAX (_size overflows).

In such cases return ENOMEM. This is a limitation of our
implementation, alternatively you may consider getline(3).

Differential Revision:  https://reviews.freebsd.org/D442 (Partial)
Obtained from:  Apple Inc. (Libc 997.90.3)

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

7 years agoMFC r304286:
kib [Wed, 24 Aug 2016 09:20:27 +0000 (09:20 +0000)]
MFC r304286:
Remove duplicated code.

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

7 years agoFix HA mode configuration on FreeBSD 10.x.
mav [Wed, 24 Aug 2016 07:50:28 +0000 (07:50 +0000)]
Fix HA mode configuration on FreeBSD 10.x.

This is direct commit, compensating CTLFLAG_RDTUN difference between
FreeBSD 10.x and 11.x branches.

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

7 years agoMFC r301724
arybchik [Tue, 23 Aug 2016 13:51:55 +0000 (13:51 +0000)]
MFC r301724

sfxge(4): handle negative ticks difference correctly

ticks are signed int and if statistics is not updated for a long time
(more than INT_MAX ticks, but less than UINT_MAX) difference becomes
negative and less than hz for a long time.

Other option to repeat is simply load driver (which initializes
timestamps to 0) when ticks are negative.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r304232:
kib [Tue, 23 Aug 2016 07:55:32 +0000 (07:55 +0000)]
MFC r304232:
In UFS_BALLOC(), invalidate pages of indirect buffers on failed block
allocation unwinding.

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

7 years agoMFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking protocol
avg [Tue, 23 Aug 2016 07:55:05 +0000 (07:55 +0000)]
MFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking protocol

PR: 209158

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

7 years agoMFC r304231:
kib [Tue, 23 Aug 2016 07:54:14 +0000 (07:54 +0000)]
MFC r304231:
On unwind after failed block allocation in ffs_balloc_ufs{1,2}, assert
that recorded allocated blocks numbers match the physical block numbers
of dandling buffers which are released.
When finally freeing the blocks during unwind, assert that dandling
buffers where not re-allocated.

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

7 years agoMFC r304229:
kib [Tue, 23 Aug 2016 07:53:09 +0000 (07:53 +0000)]
MFC r304229:
When looking up dandling buffers for unwing after failing block
allocation in UFS_BALLOC(), there is no need to map them.

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

7 years agoMFC r304228:
kib [Tue, 23 Aug 2016 07:52:07 +0000 (07:52 +0000)]
MFC r304228:
When block allocation fails in UFS_BALLOC(), and the volume does not
have SU enabled, there is no point in calling softdep_request_cleanup().

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

7 years agoMFC r304227:
kib [Tue, 23 Aug 2016 07:51:00 +0000 (07:51 +0000)]
MFC r304227:
In ffs_balloc_ufs{1,2} routines, assert that unwind records do not
overflow local arrays.

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

7 years agoMFC r304521: JMicron JMB361 has only a single SATA port
avg [Tue, 23 Aug 2016 07:03:17 +0000 (07:03 +0000)]
MFC r304521: JMicron JMB361 has only a single SATA port

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

7 years agoDirect commit, equal to MFC part of r295632 which is not planned for
ache [Tue, 23 Aug 2016 00:00:06 +0000 (00:00 +0000)]
Direct commit, equal to MFC part of r295632 which is not planned for
MFC at whole.
Set __SERR on  __slbexpand() errors.

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

7 years agoMFC 302379: Correct locking annotation for p_comm.
jhb [Mon, 22 Aug 2016 18:12:24 +0000 (18:12 +0000)]
MFC 302379: Correct locking annotation for p_comm.

p_comm is changed during exec, it is not read-only after fork.

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

7 years agoMFC 304476: Fix various nits in the aio operation manpages.
jhb [Mon, 22 Aug 2016 17:52:10 +0000 (17:52 +0000)]
MFC 304476: Fix various nits in the aio operation manpages.

- Avoid double use of "request" in a single sentence.  Instead, describe
  aio_sigevent as being used to request notification of the associated
  operation's completion.  This matches the language used to describe
  aio_sigevent in aio(4).
- Simplify the prohibition on modifying buffers while requests are in
  flight.
- Fix case mismatch.
- Drop note about not using stack variables. C programmers should be able
  to figure out if a stack variable is safe based on the later warning
  about the life cycle requirements of control blocks.
- Remove prohibition on modifying the I/O buffer for aio_fsync() since
  it does not use an I/O buffer.  For aio_mlock(), prohibit modifications
  to the mapping (e.g. due to mprotect, munmap, mmap, etc.) but do not
  prohibit modifications to the memory backing the buffer (stores into
  the pages backing the buffer).

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

7 years agoMFC r304440, r304487:
markj [Mon, 22 Aug 2016 17:21:45 +0000 (17:21 +0000)]
MFC r304440, r304487:
Fix some handling of P2_PTRACE_FSTP.

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

7 years agoMFC r304608:
bdrewery [Mon, 22 Aug 2016 16:35:50 +0000 (16:35 +0000)]
MFC r304608:

  Bump __FreeBSD_version for C++11 thread_local support in r303795.

PR:         192320

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

7 years agoMFC r304174:
kib [Mon, 22 Aug 2016 07:26:43 +0000 (07:26 +0000)]
MFC r304174:
VOP_FSYNC() does not take cred as an argument.  Correct comment.

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

7 years agoMFC 304251
sephe [Mon, 22 Aug 2016 02:11:30 +0000 (02:11 +0000)]
MFC 304251

    hyperv/storvsc: Deliver CAM_SEL_TIMEOUT upon SRB status error.

    SRB status is set to 0x20 by the hypervisor, if the specified LUN is
    unaccessible, and even worse the INQUIRY response will not be set by
    the hypervisor at all under this situation.  Additionally, SRB status
    is 0x20 too, for TUR on an unaccessible LUN.

    Deliver CAM_SEL_TIMEOUT to CAM upon SRB status errors as suggested by
    Scott Long, other values seems improper.

    This commit fixes the Hyper-V disk hotplug support.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D7521

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

7 years agoMFC r298355:
mav [Sun, 21 Aug 2016 17:57:32 +0000 (17:57 +0000)]
MFC r298355:
Don't use SYSDIR to avoid conflicts with existing usage.
Also, use SRCTOP to locate the top of the source tree
instead of a relative path.

PR: 208856

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

7 years agoUnbreak the build when MK_TESTS != no after r304527
ngie [Sun, 21 Aug 2016 05:08:37 +0000 (05:08 +0000)]
Unbreak the build when MK_TESTS != no after r304527

- src.opts.mk should be bsd.own.mk on ^/stable/10
- LIBADD should be DPADD/LDADD on ^/stable/10

Pointyhat to: kib
Reported by: Olivier Pinter <oliver.pinter@hardenedbsd.org>
Sponsored by: EMC / Isilon Storage Division

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

7 years agoMFC r303795:
kib [Sat, 20 Aug 2016 12:26:44 +0000 (12:26 +0000)]
MFC r303795:
Add __cxa_thread_atexit(3) API implementation.

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

7 years agoMFC r303794:
kib [Sat, 20 Aug 2016 12:23:27 +0000 (12:23 +0000)]
MFC r303794:
Create namespace for the symbols added during 12-CURRENT cycle.

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

7 years agoMFC r303147
pfg [Sat, 20 Aug 2016 02:18:44 +0000 (02:18 +0000)]
MFC r303147
binutils: fix "Bad value" error in bfd for MIPS when using -Bsymbolic.

From OpenBSD's log:

Inspired by https://sourceware.org/ml/binutils/2010-08/msg00333.html,
but expressed differently so there are no GPLv3 issues.

Obtained from: OpenBSD (CVS rev. 1.7)

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

7 years agoMFC 298950: Fix an off by one error when remapping MSI-X vectors.
jhb [Sat, 20 Aug 2016 00:22:39 +0000 (00:22 +0000)]
MFC 298950: Fix an off by one error when remapping MSI-X vectors.

pci_remap_msix() can be used to alter the mapping of allocated
MSI-X vectors to the MSI-X table.  The code had an off by one error
when adding the IRQ resources after performing a remap.  This was
fatal for any vectors in the table that used the "last" valid IRQ as
those vectors were assigned a garbage IRQ value.

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

7 years agoMFC 304018: Add defines needed to export SMBIOS serial numbers
jhb [Fri, 19 Aug 2016 23:31:56 +0000 (23:31 +0000)]
MFC 304018: Add defines needed to export SMBIOS serial numbers

Some defines needed for exporting serial numbers from the SMBIOS were
missed during integration of SMBIOS support in the EFI boot loader (r281138).
This is needed for getting the hostid set from the system hardware UUID.

PR: 206031

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

7 years agoMFC 303001: Add PTRACE_VFORK to trace vfork events.
jhb [Fri, 19 Aug 2016 20:17:57 +0000 (20:17 +0000)]
MFC 303001: Add PTRACE_VFORK to trace vfork events.

First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when
the new child was created via vfork() rather than fork().  Second, a
new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK
event mask.  This new stop is reported after the vfork parent resumes
due to the child calling exit or exec.  Debuggers can use this stop to
reinsert breakpoints in the vfork parent process before it resumes.

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

7 years agoMFC r304008:
bdrewery [Fri, 19 Aug 2016 17:02:05 +0000 (17:02 +0000)]
MFC r304008:

  Avoid taking PROC_LOCK in syscalls if not being traced.

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

7 years agoMFC r303929,r303930,r303931,r303932,r303933:
bdrewery [Fri, 19 Aug 2016 16:59:16 +0000 (16:59 +0000)]
MFC r303929,r303930,r303931,r303932,r303933:

  r303929:
    Fix -S with -b not atomically updating the destination file.
  r303930:
    Support -v for -l.
  r303931:
    Fix -S with -l not being atomic.
  r303932:
    Fix -b failure not restoring flags on the destination file.
  r303933:
    Squelch a false-positive Clang static analyzer warning.

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

7 years agoMFC r304152:
kp [Fri, 19 Aug 2016 11:36:00 +0000 (11:36 +0000)]
MFC r304152:

pf: Add missing byte-order swap to pf_match_addr_range

Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not
match addresses correctly on little-endian systems.

PR:       211796
Obtained from:    OpenBSD (sthen)

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

7 years agoMFC r304012:
kib [Fri, 19 Aug 2016 08:07:04 +0000 (08:07 +0000)]
MFC r304012:
Fill phdr and phsize for rtld object.

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

7 years agoMFC r304011:
kib [Fri, 19 Aug 2016 08:05:08 +0000 (08:05 +0000)]
MFC r304011:
Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.

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

7 years agoMFC r303009: Negotiate/disable TXCSUM_IPV6 same as TXCSUM.
mav [Thu, 18 Aug 2016 12:09:20 +0000 (12:09 +0000)]
MFC r303009: Negotiate/disable TXCSUM_IPV6 same as TXCSUM.

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

7 years agoMFC r302504, r302666, r302668, r302932, r302933:
mav [Thu, 18 Aug 2016 11:56:07 +0000 (11:56 +0000)]
MFC r302504, r302666, r302668, r302932, r302933:
Add emulation for Intel e1000 (e82545) network adapter.

The code was successfully tested with FreeBSD, Linux, Solaris and Windows
guests.  This interface is predictably slower (about 2x) then virtio-net,
but it is very helpful for guests not supporting virtio-net by default.

Thanks to Jeremiah Lott and Peter Grehan for doing original heavy lifting.

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

7 years agoMFC r302460: Add emulation for multiple (up to 16) MSI vectors for AHCI.
mav [Thu, 18 Aug 2016 11:45:46 +0000 (11:45 +0000)]
MFC r302460: Add emulation for multiple (up to 16) MSI vectors for AHCI.

It was useless before, but may improve performance now if multiple devices
are configured and guest supports this feature.

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r302459: Allow AHCI controller to support up to 32 arbitrary devices.
mav [Thu, 18 Aug 2016 11:45:02 +0000 (11:45 +0000)]
MFC r302459: Allow AHCI controller to support up to 32 arbitrary devices.

While old syntax is still supported, new syntax looks like this:

-s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r300296: Pass proper for 23xx arguments to isp_endcmd().
mav [Thu, 18 Aug 2016 11:39:30 +0000 (11:39 +0000)]
MFC r300296: Pass proper for 23xx arguments to isp_endcmd().

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

7 years agoMFC r300293:
mav [Thu, 18 Aug 2016 11:38:47 +0000 (11:38 +0000)]
MFC r300293:
Pass task management response information from CTL through CAM to isp(4),
utilizing previously unused arg field of struct ccb_notify_acknowledge.

This makes new QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT requests
really functional for CAM target mode drivers.

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

7 years agoMFC r300222: Fix delaying requests to unknown virtual ports 2s after init.
mav [Thu, 18 Aug 2016 11:37:38 +0000 (11:37 +0000)]
MFC r300222: Fix delaying requests to unknown virtual ports 2s after init.

This code was originally implemented 7 years ago, but never really worked
due to trivial error.  I think this functionality may be not required.
Initiators supporting optional periodic command status checks detected
those terminated commands and retried them 3 seconds later.  But thinking
about less featured initiators and the fact that it is our race makes
virtual ports "unknown" it may be good to have this feature.

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

7 years agoMFC r302947: In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.
mav [Thu, 18 Aug 2016 11:17:36 +0000 (11:17 +0000)]
MFC r302947: In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.

This is probably a NOP change since IS register is not activery used for
interrupts below the shared, but it looked odd to clear interrupts we did
not handle.

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

7 years agoMFC r302946:
mav [Thu, 18 Aug 2016 11:17:01 +0000 (11:17 +0000)]
MFC r302946:
Do not consider the last interrupt shared if there are enough interrupts
for all channels.

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

7 years agoMFC r303561: Wrap previous MSIX workaround into #ifndef EARLY_AP_STARTUP.
mav [Thu, 18 Aug 2016 11:09:43 +0000 (11:09 +0000)]
MFC r303561: Wrap previous MSIX workaround into #ifndef EARLY_AP_STARTUP.

With EARLY_AP_STARTUP we can successfully negotiate MSIX earlier.

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

7 years agoMFC r303554: Block MSIX negotiation until SMP started and IRQ reshuffled.
mav [Thu, 18 Aug 2016 11:03:21 +0000 (11:03 +0000)]
MFC r303554: Block MSIX negotiation until SMP started and IRQ reshuffled.

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

7 years agoMFC r303553: Make MAC address generation more random.
mav [Thu, 18 Aug 2016 11:02:42 +0000 (11:02 +0000)]
MFC r303553: Make MAC address generation more random.

'ticks' approach does not work at boot time.

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

7 years agoMFC r303514: Fix NTBT_QP_LINKS negotiation.
mav [Thu, 18 Aug 2016 11:02:01 +0000 (11:02 +0000)]
MFC r303514: Fix NTBT_QP_LINKS negotiation.

I believe it never worked correctly for more the one queue even in Linux.
This fixes case when one of consumer drivers is not loaded on one side,
but its queues still announced as ready if something else brought link up.

While there, remove some pointless NULL checks.

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

7 years agoMFC r303510: Clear scratchpad after MSIX negotiation to not leak garbage.
mav [Thu, 18 Aug 2016 11:01:26 +0000 (11:01 +0000)]
MFC r303510: Clear scratchpad after MSIX negotiation to not leak garbage.

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

7 years agoMFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).
mav [Thu, 18 Aug 2016 11:00:48 +0000 (11:00 +0000)]
MFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).

New design allows to attach multiple consumers to ntb_transport(4) instance.
Previous design obtained from Linux theoretically allowed that, but was not
practically usable (Linux also has only one consumer driver now).

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

7 years agoMFC r303429, r303437, r303551:
mav [Thu, 18 Aug 2016 10:59:12 +0000 (10:59 +0000)]
MFC r303429, r303437, r303551:
Once more refactor KPI between NTB hardware and consumers.

New design allows hardware resources to be split between several consumers.
For example, one BAR can be dedicated for remote memory access, while other
resources can be used for packet transport for virtual Ethernet interface.
And even without resource split, this code allows to specify which consumer
driver should attach the hardware.

From some points this makes the code even closer to Linux one, even though
Linux does not provide the described flexibility.

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

7 years agoMFC r302520: Replace NTB man page with more detailed and up to date.
mav [Thu, 18 Aug 2016 10:57:18 +0000 (10:57 +0000)]
MFC r302520: Replace NTB man page with more detailed and up to date.

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r303266: Postpone ntb_get_msix_info() till we need to negotiate MSIX.
mav [Thu, 18 Aug 2016 10:54:21 +0000 (10:54 +0000)]
MFC r303266: Postpone ntb_get_msix_info() till we need to negotiate MSIX.

Calling it earlier increases the window when MSIX info may change.
This change does not solve the problem completely, but seems logical.
Complete solution should probably include link reset in case of MSIX
remap to trigger new negotiation, but we have no way to get notified
about that now.

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

7 years agoMFC r302622 (by sephe): ntb: Fix LINT
mav [Thu, 18 Aug 2016 10:53:44 +0000 (10:53 +0000)]
MFC r302622 (by sephe): ntb: Fix LINT

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

7 years agoMFC r302531: Revert odd change, setting limit registers before base.
mav [Thu, 18 Aug 2016 10:53:03 +0000 (10:53 +0000)]
MFC r302531: Revert odd change, setting limit registers before base.

I don't know what errata is mentioned there, I was unable to find it, but
setting limit before the base simply does not work at all.  According to
specification attempt to set limit out of the present window range resets
it to zero, effectively disabling it.  And that is what I see in practice.

Fixing this properly disables access for remote side to our memory until
respective xlat is negotiated and set.  As I see, Linux does the same.

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

7 years agoMFC r302530: Fix wrong copy/paste in r302510.
mav [Thu, 18 Aug 2016 10:52:29 +0000 (10:52 +0000)]
MFC r302530: Fix wrong copy/paste in r302510.

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

7 years agoMFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().
mav [Thu, 18 Aug 2016 10:51:53 +0000 (10:51 +0000)]
MFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().

At that point link is quite likely not established yet, so messing with
scratch registers is premature there.  Original commit message mentioned
code diff reduction from Linux, but this line is not present in Linux now.

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

7 years agoMFC r302510:
mav [Thu, 18 Aug 2016 10:51:18 +0000 (10:51 +0000)]
MFC r302510:
Simplify MSIX MW BAR xlat setup, and don't forget to unlock its limit.

The last fixes SB01BASE_LOCKUP workaround after driver reload.

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

7 years agoMFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.
mav [Thu, 18 Aug 2016 10:50:27 +0000 (10:50 +0000)]
MFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.

For some reason hack with sending MSI-X interrupts by writing to remote
LAPIC memory works only for 32-bit BARs, that are available only if split
BARs mode is enabled in BIOS.  If it is not, complain loudly and fall back
to less efficient workaround.

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

7 years agoDirect commit to stable/10 to fix build without newer interface KPIs.
mav [Thu, 18 Aug 2016 10:47:22 +0000 (10:47 +0000)]
Direct commit to stable/10 to fix build without newer interface KPIs.

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

7 years agoMFC r302499: Improve checksum "offload" support.
mav [Thu, 18 Aug 2016 10:46:29 +0000 (10:46 +0000)]
MFC r302499: Improve checksum "offload" support.

For compatibility reasons make driver not report any checksum offload by
default, since there is indeed none.  But if administrator knows that
interface is used only for local traffic, he can enable fake checksum
offload manually on both sides to save some CPU cycles, since the data
are already protected by CRC32 of PCIe link.

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r302496: Rewrite if_ntb to use modern interface KPIs and features.
mav [Thu, 18 Aug 2016 10:45:53 +0000 (10:45 +0000)]
MFC r302496: Rewrite if_ntb to use modern interface KPIs and features.

It includes: link state, if_transmit, buf_ring, multiple queues, bpf, etc.

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r302495: Improve memory allocation errors handling on receive.
mav [Thu, 18 Aug 2016 10:45:15 +0000 (10:45 +0000)]
MFC r302495: Improve memory allocation errors handling on receive.

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

7 years agoMFC r302494: Synchronize MTU code with Linux.
mav [Thu, 18 Aug 2016 10:44:35 +0000 (10:44 +0000)]
MFC r302494: Synchronize MTU code with Linux.

It is mandatory for transport compatibility.

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

7 years agoMFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.
mav [Thu, 18 Aug 2016 10:43:59 +0000 (10:43 +0000)]
MFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.

This allows at least first three doorbells to work very close to normal
hardware, properly signaling events to upper layers without spurious or
lost events.  Doorbells above the first three may still report spurious
events due to lack of reliable information, but they are rarely used.

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

7 years agoMFC r302492: Bring some more order into link and qp state handling.
mav [Thu, 18 Aug 2016 10:43:23 +0000 (10:43 +0000)]
MFC r302492: Bring some more order into link and qp state handling.

Do not touch scratchpad registers until link is reported up.
Mask and do not handle doorbell events until respective qp is up.

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

7 years agoMFC r302491: Switch ctx_lock from mutex to rmlock.
mav [Thu, 18 Aug 2016 10:42:48 +0000 (10:42 +0000)]
MFC r302491: Switch ctx_lock from mutex to rmlock.

It is odd idea to serialize different MSI-X vectors.  Use of rmlocks
here allows them to execute in parallel, but still protects ctx.
If upper layers require any additional serialization -- they can
do it by themselves.

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

7 years agoMFC r302490: Create separate RX taskqueue for each qp.
mav [Thu, 18 Aug 2016 10:42:12 +0000 (10:42 +0000)]
MFC r302490: Create separate RX taskqueue for each qp.

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

7 years agoMFC r302489: Remove rx_completion_task taskqueue.
mav [Thu, 18 Aug 2016 10:41:34 +0000 (10:41 +0000)]
MFC r302489: Remove rx_completion_task taskqueue.

It is not needed after RX lock removed in previous commit.

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

7 years agoMFC r302488: Remove unneeded RX lock, and make TX lock per-qp.
mav [Thu, 18 Aug 2016 10:40:59 +0000 (10:40 +0000)]
MFC r302488: Remove unneeded RX lock, and make TX lock per-qp.

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

7 years agoMFC r302487: Reduce code divergence from Linux, preparing for DMA support.
mav [Thu, 18 Aug 2016 10:40:18 +0000 (10:40 +0000)]
MFC r302487: Reduce code divergence from Linux, preparing for DMA support.

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

7 years agoMFC r302486: Fix operation with multiple qps.
mav [Thu, 18 Aug 2016 10:39:42 +0000 (10:39 +0000)]
MFC r302486: Fix operation with multiple qps.

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

7 years agoMFC r302484: NewBus'ify NTB subsystem.
mav [Thu, 18 Aug 2016 10:39:00 +0000 (10:39 +0000)]
MFC r302484: NewBus'ify NTB subsystem.

This follows NTB subsystem modularization in Linux, tuning it to FreeBSD
native NewBus interfaces.  This change allows to support different types
of hardware with different drivers, support multiple NTB instances in a
system, ntb_transport module use for needs other then if_ntb, etc.

Sponsored by:   iXsystems, Inc.

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

7 years agoMFC r302483: Remove some dead code found by Clang static analyzer.
mav [Thu, 18 Aug 2016 10:25:07 +0000 (10:25 +0000)]
MFC r302483: Remove some dead code found by Clang static analyzer.

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

7 years agoMFC r302482: Fix NTB_SDOORBELL_LOCKUP workaround.
mav [Thu, 18 Aug 2016 10:24:31 +0000 (10:24 +0000)]
MFC r302482: Fix NTB_SDOORBELL_LOCKUP workaround.

Since SBARxSZ register can be write-once, it can be unusable for disabling
the SBAR.  For such case also set SBARxBASE to zero to not intersect with
config BAR.

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

7 years agoMFC r302014: Fix if_ntb interface setup to include IFF_MULTICAST.
mav [Thu, 18 Aug 2016 10:23:51 +0000 (10:23 +0000)]
MFC r302014: Fix if_ntb interface setup to include IFF_MULTICAST.

This allows IPv6 link local addresses (and other IPv6 functionality) to work.

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

7 years agoMFC r304149
sbruno [Thu, 18 Aug 2016 07:32:02 +0000 (07:32 +0000)]
MFC r304149

e1000:  Add support for Kaby Lake IDs

Fixup some errors when transitioning to/from low power states.

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

7 years agoMFC r289932, r289940:
kp [Wed, 17 Aug 2016 15:14:21 +0000 (15:14 +0000)]
MFC r289932, r289940:

PF_ANEQ() macro will in most situations returns TRUE comparing two identical
IPv4 packets (when it should return FALSE). It happens because PF_ANEQ() doesn't
stop if first 32 bits of IPv4 packets are equal and starts to check next 3*32
bits (like for IPv6 packet). Those bits containt some garbage and in result
PF_ANEQ() wrongly returns TRUE.

Fix: Check if packet is of AF_INET type and if it is then compare only first 32
bits of data.

PR:             204005
Submitted by:   Miłosz Kaniewski

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

7 years agoMFC r302497:
kp [Wed, 17 Aug 2016 09:24:46 +0000 (09:24 +0000)]
MFC r302497:

pf: Map hook returns onto the correct error values

pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers
expect to get E<foo> error codes.
Map the returns values. A pass is 0 (everything is OK), anything else means
pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP
error message.

PR:     207598

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

7 years agoMFC r303663:
kp [Wed, 17 Aug 2016 09:21:55 +0000 (09:21 +0000)]
MFC r303663:

pfctl: Allow TOS bits to be cleared

TOS value 0 is valid, so use 256 as an invalid value rather than zero.
This allows users to enforce TOS == 0 with pf.

Reported by:    Radek Krejča <radek.krejca@starnet.cz>

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

7 years agoMFC r303916:
kib [Wed, 17 Aug 2016 07:17:16 +0000 (07:17 +0000)]
MFC r303916:
Convert another tmpfs assert into runtime check.

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

7 years agoMFC r303914:
kib [Wed, 17 Aug 2016 07:13:25 +0000 (07:13 +0000)]
MFC r303914:
Re-schedule signals after kthread exits.

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

7 years agoMFC r303913:
kib [Wed, 17 Aug 2016 07:09:22 +0000 (07:09 +0000)]
MFC r303913:
Unconditionally perform checks that FPU region was entered, when #NM
exception is caught in kernel mode.

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

7 years agoMFstable/11 r304208:
ngie [Tue, 16 Aug 2016 08:30:28 +0000 (08:30 +0000)]
MFstable/11 r304208:

MFC r303830:

Remove vestigal references to __alpha__

Replace alpha reference in getconf(1) with amd64 [*]

PR:   211300 [*]

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

7 years agoMFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,
ache [Tue, 16 Aug 2016 07:14:09 +0000 (07:14 +0000)]
MFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,
    r303088,r303142,r303208,r303210,r303530,r303536,r303564,r303565,
    r303706

In short:

1) All situations with glob(3) error return codes are well defined by
POSIX, so rewrite old sporadic errors processing to match those
definitions.

Including subcases:

Both C99 and POSIX directly prohibits any standard function to set errno
to 0. Breaking this rule in 2001 NetBSD hack was imported which attempts
to workaround very limited glob(3) return codes amount.
Use POSIX-compatible workaround now with E2BIG which can't comes from
other functions used instead of prohibited 0.

Process errors happpens in (*readdirfunc)() too, as POSIX requires.

Per POSIX GLOB_NOCHECK should return original pattern,
unmodified, if no matches found. But our code strips all '\'
returning it. Rewrite the code to allow to return original pattern.

GLOB_ERR and gl_errfunc are supposed to work only for real directories
per POSIX, so don't act on missing or plain files for ENOENT or ENOTDIR
(as TODO in the code suggested).
Remove the hack in the manpage describing how to skip ENOENT and ENOTDIR
in gl_errfunc, it is unneeded now.

Per POSIX GLOB_ERR must be considered even if gl_errfunc is not set,
old code skips it in that case.

2) For near MAXPATHLEN long pathes old glob(3) code can operate on
truncated results, prevent it in several places.

3) Results was not sorted according to collate as POSIX requires.

4) globtilde() forget to convert expanded user home dir from multibyte to
wide chars. Moreover, those chars are addded as not protected, so
can be treated as special chars.

5) Backward hack for EILSEQ in g_Ctoc() was not implemented, so all
pathes with illegal byte sequences are skipped as result, implement it now.

6) GLOB_BRACE was somehow broken. First it repeatedly calls glob0() in
globexp1() recursive calls, but glob0() was not supposed to be called
repeatedly in the original code. It finalize results by possible adding
original pattern for no match case, may return GLOB_NOMATCH error and
by sorting all things. Original pattern adding or GLOB_NOMATCH error
can happens each time glob0() called repeatedly, and sorting happens
for one item only, all things are never sorted. Second, f.e. "a{a"
pattern does not match "a{a" file but match "a" file instead.
Third, some errors (f.e. for limits or overflow) can be ignored
by GLOB_BRACE code because it forces return (0).

Add non-finalizing flag to glob0() and make globexp0() wrapper around
recursively called globexp1() to finalize things like glob0() does.
Reorganize braces code to work correctly.

7) Don't allow MB_CUR_MAX * strlen overallocation hits GLOB_LIMIT_STRING
(ARG_MAX) limit, use final string length, not malloced space for it.

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

7 years agoMFC r303423:
kib [Mon, 15 Aug 2016 21:44:06 +0000 (21:44 +0000)]
MFC r303423:
Force SIGSTOP to be the first signal reported after the attach.

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

7 years agoMFC 302900,302902,302921,303461,304009:
jhb [Mon, 15 Aug 2016 21:10:41 +0000 (21:10 +0000)]
MFC 302900,302902,302921,303461,304009:
Add a mask of optional ptrace() events.

302900:
Add a test for user signal delivery.

This test verifies we get the correct ptrace event details when a signal
is posted to a traced process from userland.

302902:
Add a mask of optional ptrace() events.

ptrace() now stores a mask of optional events in p_ptevents.  Currently
this mask is a single integer, but it can be expanded into an array of
integers in the future.

Two new ptrace requests can be used to manipulate the event mask:
PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK
sets the current event mask.

The current set of events include:
- PTRACE_EXEC: trace calls to execve().
- PTRACE_SCE: trace system call entries.
- PTRACE_SCX: trace syscam call exits.
- PTRACE_FORK: trace forks and auto-attach to new child processes.
- PTRACE_LWP: trace LWP events.

The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have
been replaced by PTRACE_SCE and PTRACE_SCX.  PTRACE_FORK replaces
P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS.

The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for
compatibility but now simply toggle corresponding flags in the
event mask.

While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both
modify the event mask and continue the traced process.

302921:
Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL.

303461:
Note that not all optional ptrace events use SIGTRAP.

New child processes attached due to PTRACE_FORK use SIGSTOP instead of
SIGTRAP.  All other ptrace events use SIGTRAP.

304009:
Remove description of P_FOLLOWFORK as this flag was removed.

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

7 years agoMFC r303934,r303937,r303942:
bdrewery [Mon, 15 Aug 2016 11:54:29 +0000 (11:54 +0000)]
MFC r303934,r303937,r303942:

  r303934:
    Support rmdir(2).
  r303937:
    Use proper argument length for rmdir(2) for r303934.
  r303942:
    Fix sorting in r303934.

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

7 years agoMFC r303964:
bdrewery [Mon, 15 Aug 2016 09:39:26 +0000 (09:39 +0000)]
MFC r303964:

  PROGS: Support INTERNALPROG.prog=yes to not install it.

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

7 years agoMFC r302838: 6513 partially filled holes lose birth time
avg [Mon, 15 Aug 2016 09:19:26 +0000 (09:19 +0000)]
MFC r302838: 6513 partially filled holes lose birth time

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

7 years agoMFC r302837: 6844 dnode_next_offset can detect fictional holes
avg [Mon, 15 Aug 2016 09:16:08 +0000 (09:16 +0000)]
MFC r302837: 6844 dnode_next_offset can detect fictional holes

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

7 years agoMFC r302836: 6874 rollback and receive need to reset ZPL state to what's on disk
avg [Mon, 15 Aug 2016 09:12:54 +0000 (09:12 +0000)]
MFC r302836: 6874 rollback and receive need to reset ZPL state to what's on disk

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

7 years agoMFC r303870:
hselasky [Mon, 15 Aug 2016 09:09:01 +0000 (09:09 +0000)]
MFC r303870:
Fix for use after free.

Clear the device description to avoid use after free because the
bsddev is not destroyed when the mlx5en module is unloaded. Only when
the parent mlx5 module is unloaded the bsddev is destroyed. This fixes
a panic on listing sysctls which refer strings in the bsddev after the
mlx5en module has been unloaded.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r302835: fix-up for configuration of AMD Family 10h processors
avg [Mon, 15 Aug 2016 09:04:31 +0000 (09:04 +0000)]
MFC r302835: fix-up for configuration of AMD Family 10h processors
borrowed from Linux

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

7 years agoMFC r302840: 6878 Add scrub completion info to "zpool history"
avg [Mon, 15 Aug 2016 09:02:09 +0000 (09:02 +0000)]
MFC r302840: 6878 Add scrub completion info to "zpool history"

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

7 years agoMFC r303765:
hselasky [Mon, 15 Aug 2016 09:00:46 +0000 (09:00 +0000)]
MFC r303765:
Keep a reference count on USB keyboard polling to allow recursive
cngrab() during a panic for example, similar to what the AT-keyboard
driver is doing.

Found by: Bruce Evans <brde@optusnet.com.au>

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

7 years agoMFC r302839: 6940 Cannot unlink directories when over quota
avg [Mon, 15 Aug 2016 08:53:30 +0000 (08:53 +0000)]
MFC r302839: 6940 Cannot unlink directories when over quota

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

7 years agoMFC r303086: 7164 zdb should be able to open the root dataset
avg [Mon, 15 Aug 2016 08:49:07 +0000 (08:49 +0000)]
MFC r303086: 7164 zdb should be able to open the root dataset

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