]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC 308664,308742,308743
sephe [Thu, 29 Dec 2016 05:32:34 +0000 (05:32 +0000)]
MFC 308664,308742,308743

308664
    hyperv/vss: Add driver and tools for VSS

    VSS stands for "Volume Shadow Copy Service".  Unlike virtual machine
    snapshot, it only takes snapshot for the virtual disks, so both
    filesystem and applications have to aware of it, and cooperate the
    whole VSS process.

    This driver exposes two device files to the userland:

        /dev/hv_fsvss_dev

        Normally userland programs should _not_ mess with this device file.
        It is currently used by the hv_vss_daemon(8), which freezes and
        thaws the filesystem.  NOTE: currently only UFS is supported, if
        the system mounts _any_ other filesystems, the hv_vss_daemon(8)
        will veto the VSS process.

        If hv_vss_daemon(8) was disabled, then this device file must be
        opened, and proper ioctls must be issued to keep the VSS working.

        /dev/hv_appvss_dev

        Userland application can opened this device file to receive the
        VSS freeze notification, hold the VSS for a while (mainly to flush
        application data to filesystem), release the VSS process, and
        receive the VSS thaw notification i.e. applications can run again.

        The VSS will still work, even if this device file is not opened.
        However, only filesystem consistency is promised, if this device
        file is not opened or is not operated properly.

    hv_vss_daemon(8) is started by devd(8) by default.  It can be disabled
    by editting /etc/devd/hyperv.conf.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reviewed by:    kib, mckusick
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8224

308742
    hyperv/vss: Nuke unused variables.

    Submitted by:   markj
    Reported by:    markj
    Sponsored by:   Microsoft

308743
    hyperv/vss: Install the userland daemon to /usr/sbin instead of /

    Submitted by:   markj
    Reported by:    markj
    Sponsored by:   Microsoft

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

7 years agoMFstable/11 r310732:
ngie [Thu, 29 Dec 2016 00:26:27 +0000 (00:26 +0000)]
MFstable/11 r310732:

MFC r310574:

Fix style(9)

- Sort #includes
- Delete trailing whitespace

No functional change

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

7 years agoMFstable/11 r310730:
ngie [Thu, 29 Dec 2016 00:24:58 +0000 (00:24 +0000)]
MFstable/11 r310730:

MFC r310592:

style(9): fix trailing whitespace

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

7 years agoMFstable/11 r310672:
ngie [Wed, 28 Dec 2016 06:16:55 +0000 (06:16 +0000)]
MFstable/11 r310672:

MFC r310499:

Sort #includes

No functional change

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

7 years agoMFstable/11 r310670:
ngie [Wed, 28 Dec 2016 06:15:39 +0000 (06:15 +0000)]
MFstable/11 r310670:

MFC r310503:

style(9): delete stray trailing whitespace after break statement

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

7 years agoMFC 309581,309582,310424: Document T6 support.
jhb [Tue, 27 Dec 2016 20:06:26 +0000 (20:06 +0000)]
MFC 309581,309582,310424: Document T6 support.

309581:
Document support for Terminator 6 adapters in cxgbe(4) and cxgbev(4).

309582:
Bump Dd for addition of T6.

310424:
Replace passive voice with active voice and other tweaks.

- Drop uses of 'will'.
- Replace 'to use' with active voice.
- Tidy language around interrupt types and clarify that INTx doesn't
  work on VFs.
- Drop leading articles from sysctl/tunable descriptions.
- Tweak the wording of several sysctl/tunable descriptions.

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

7 years agoMFC r309957: Add tests for reaper receiving SIGCHLD (r309886).
jilles [Mon, 26 Dec 2016 17:26:25 +0000 (17:26 +0000)]
MFC r309957: Add tests for reaper receiving SIGCHLD (r309886).

PR: 213928

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

7 years agoMFC r310367:
pfg [Mon, 26 Dec 2016 16:43:39 +0000 (16:43 +0000)]
MFC r310367:
pax(1): Fix a bug with archives smaller than 512 bytes.

The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to
determine what format file we have, which is wrong.

Obtained from: NetBSD (CVS rev 1.26)

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

7 years agoMFC r309886:
kib [Mon, 26 Dec 2016 10:16:05 +0000 (10:16 +0000)]
MFC r309886:
When a zombie gets reparented due to the parent exit, send SIGCHLD to
the reaper.

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

7 years agoMFC r310302:
kib [Mon, 26 Dec 2016 10:13:53 +0000 (10:13 +0000)]
MFC r310302:
Do not clear KN_INFLUX when not owning influx state.

PR: 214923

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

7 years agoMFstable/11 r310571:
ngie [Mon, 26 Dec 2016 06:33:43 +0000 (06:33 +0000)]
MFstable/11 r310571:

MFC r310459:

Sort #includes per style(9)

No functional change

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

7 years agoMFstable/11 r310569:
ngie [Mon, 26 Dec 2016 06:25:39 +0000 (06:25 +0000)]
MFstable/11 r310569:

MFC r309869:

Merge changes from vendor to address several Coverity issues with
contrib/libarchive's tests

Obtained from: libarchive (ebe29c, fd0ea2, f9e3de)

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

7 years agoMFstable/11 r310567:
ngie [Mon, 26 Dec 2016 06:11:43 +0000 (06:11 +0000)]
MFstable/11 r310567:

MFC r310457:

Clean up trailing whitespace

No functional change

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

7 years agoMFstable/11 r310565:
ngie [Mon, 26 Dec 2016 06:09:09 +0000 (06:09 +0000)]
MFstable/11 r310565:

MFC r310202:

Clean up trailing and leading whitespace

Fix variable type alignment in snmp_dialog(..)

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

7 years agoMFstable/11 r310563:
ngie [Mon, 26 Dec 2016 06:06:55 +0000 (06:06 +0000)]
MFstable/11 r310563:

MFC r310196:

Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and
begemotBridgeTpMaxAddresses

Bump LAST-UPDATED for the MIB, per the change

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

7 years agoMFstable/11 r310561:
ngie [Mon, 26 Dec 2016 06:04:10 +0000 (06:04 +0000)]
MFstable/11 r310561:

MFC r310203:

Clean up parse_ip(..)

- Clean up trailing whitespace
- Fix variable alignment

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

7 years agoMFC r309836: Add some tests for reaper functionality (in procctl()).
jilles [Sun, 25 Dec 2016 22:32:16 +0000 (22:32 +0000)]
MFC r309836: Add some tests for reaper functionality (in procctl()).

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

7 years agoMFC r308530: iicsmb: SMB_MAXBLOCKSIZE can be used again
avg [Sat, 24 Dec 2016 14:48:28 +0000 (14:48 +0000)]
MFC r308530: iicsmb: SMB_MAXBLOCKSIZE can be used again

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

7 years agoMFC r309250: MFV r309249: 3821 Race in rollback, zil close, and zil flush
avg [Sat, 24 Dec 2016 14:25:25 +0000 (14:25 +0000)]
MFC r309250: MFV r309249: 3821 Race in rollback, zil close, and zil flush

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

7 years agoMFC r309099: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback
avg [Sat, 24 Dec 2016 14:23:14 +0000 (14:23 +0000)]
MFC r309099: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback

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

7 years agoMFC r309098: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try
avg [Sat, 24 Dec 2016 14:17:50 +0000 (14:17 +0000)]
MFC r309098: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try
to free already free blocks

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

7 years agoMFC r309097: MFV r308987: 7180 potential race between
avg [Sat, 24 Dec 2016 14:13:21 +0000 (14:13 +0000)]
MFC r309097: MFV r308987: 7180 potential race between
zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename

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

7 years agodefine Maxmem for ia64, the only platform that didn't have it
avg [Sat, 24 Dec 2016 13:28:39 +0000 (13:28 +0000)]
define Maxmem for ia64, the only platform that didn't have it

This is a direct commit to stable/10 as the platform was removed
in the newer branches.

Maxmem is required for compiling fwohci(4) on ia64 since commit
r310081, MFC of r277511.
It was easier to add Maxmem than to make a special case for ia64
in fwohci.

Reported by: jhb, gjb
Discussed with: kib, jhb

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

7 years agoMFstable/11 r310506:
ngie [Sat, 24 Dec 2016 13:00:19 +0000 (13:00 +0000)]
MFstable/11 r310506:

MFC r309837:

Change the process limits for RLIMIT_MEMLOCK to RLIM_INFINITY when
executing :mincore_resid

The default process limits in FreeBSD is 64kB for unprivileged users,
which empirically is too low to run the :mincore_resid testcase.

Process limits are inherited, so even though the default limit for
root users is RLIM_INFINITY, the inherited limit with "sudo" with the
default login.conf will be 64kB.

Use setrlimit to set rlim_max for RLIMIT_MEMLOCK to RLIM_INFINITY to
avoid ENOMEM issues when calling mlock to wire the mmap'ed address
space.

setrlimit requires root access to increase rlim_max, so require root
privileges when running the test

Discovered when executing the tests with sudo, e.g.
"sudo kyua test -k /usr/tests/lib/libc/sys/Kyuafile mincore_test"

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

7 years agoMFC r308493, r308619: Update amd from am-utils 6.1.5 to 6.2.
cy [Fri, 23 Dec 2016 22:42:14 +0000 (22:42 +0000)]
MFC r308493, r308619: Update amd from am-utils 6.1.5 to 6.2.

Used extensively on my network over the past ten weeks.

Reviewed by:    pfg, brooks
Suggested by:   pfg
Obtained from:  ftp://ftp.am-utils.org/pub/am-utils/
Relnotes:       yes
Differential Revision:  D8405

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

7 years agoMFC 309588: Don't attach to Host-PCI bridges with a bad bus number.
jhb [Fri, 23 Dec 2016 19:42:17 +0000 (19:42 +0000)]
MFC 309588: Don't attach to Host-PCI bridges with a bad bus number.

If the bus number assigned to a Host-PCI bridge doesn't match the first
bus number in the associated producer range from _CRS, print a warning and
fail to attach rather than panicking due to an assertion failure.

At least one single-socket Dell machine leaves a "ghost" Host-PCI bridge
device in the ACPI namespace that seems to correspond to the I/O hub in
the second socket of a two-socket machine.  However, the BIOS doesn't
configure the settings for this "ghost" bridge correctly, nor does it have
any PCI devices behind it.

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

7 years agoMFC 308820,308821: Fixes for fatal page faults on x86.
jhb [Fri, 23 Dec 2016 19:28:15 +0000 (19:28 +0000)]
MFC 308820,308821: Fixes for fatal page faults on x86.

308820:
Report page faults due to reserved bits in PTEs as a separate fault type.

Rather than reporting a page fault due to a bad PTE as a protection
violation with the "rsv" flag, treat these faults as a separate type of
fault altogether.

308821:
MFamd64: Various fatal page fault fixes.

- If a page fault is triggered due to reserved bits in a PTE, treat it
  as a fatal fault and panic.
- If PG_NX is in use, report whether a fatal page fault is due to an
  instruction fetch or a data access.
- If a fatal page fault is due to reserved bits in a PTE, report that as
  the page fault type rather than a protection violation.

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

7 years agoMFC, r310338:
ken [Fri, 23 Dec 2016 18:29:10 +0000 (18:29 +0000)]
MFC, r310338:
  ------------------------------------------------------------------------
  r310338 | ken | 2016-12-20 14:17:07 -0700 (Tue, 20 Dec 2016) | 37 lines

  Turn on FC-Tape by default in the isp(4) driver.

  FC-Tape provides additional link level error recovery, and is
  highly recommended for tape devices.  It will only be turned on for
  a given target if the target supports it.

  Without this setting, we default to whatever FC-Tape setting is in
  NVRAM on the card.

  This can be overridden by setting the following loader tunable, for
  example for isp0:

  hint.isp.0.nofctape=1

  sys/conf/options:
   Add a new kernel config option, ISP_FCTAPE_OFF, that
   defaults the FC-Tape configuration to off.

  sys/dev/isp/isp_pci.c:
   If ISP_FCTAPE_OFF is defined, turn off FC-Tape.  Otherwise,
   turn it on if the card supports it.

  share/man/man4/isp.4:
   Add a description of FC-Tape to the isp(4) man page.

   Add descriptions of the fctape and nofctape options, as well as the
   ISP_FCTAPE_OFF kernel configuration option.

   Add the ispfw module and kernel drivers to the suggested
   configurations at the top of the man page so that users are less
   likely to leave it out.  The driver works well with the included
   firmware, but may not work at all with whatever firmware the user
   has flashed on their card.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

7 years agoMFH (r309269): use malloc()ed buffers instead of stack buffers
des [Fri, 23 Dec 2016 15:05:41 +0000 (15:05 +0000)]
MFH (r309269): use malloc()ed buffers instead of stack buffers

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

7 years agoMFC r310182:
kib [Fri, 23 Dec 2016 09:39:50 +0000 (09:39 +0000)]
MFC r310182:
In swp_pager_meta_free_all(), fix type of the index variable.  Style.

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

7 years agoMFC r310159:
kib [Fri, 23 Dec 2016 09:35:39 +0000 (09:35 +0000)]
MFC r310159:
Switch from stdatomic.h to atomic.h for kernel.

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

7 years agoMFC r310088, r310090, r310095
brooks [Wed, 21 Dec 2016 23:59:58 +0000 (23:59 +0000)]
MFC r310088, r310090, r310095

r310088:
Put the undocumented df feature of mounting filesystems from device
nodes
under an ifdef.  Leave enabled.

Reviewed by: cem
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

r310090:
Mount filesystems without executable permissions since they should never
be used.

Reviewed by: cem
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

r310095:
Use nmount(2) rather than the obsolete mount(2).

Reviewed by: cem
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

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

7 years agoMFC r310092:
brooks [Wed, 21 Dec 2016 23:16:58 +0000 (23:16 +0000)]
MFC r310092:

Add a free_iovec() function to reset iovec's.

The primary purpose is to call nmount() in a loop with new iovec's so
free_iovec takes arguments by reference and resets their values.

Reviewed by: cem
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8513

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

7 years agoMFC r310132:
pfg [Wed, 21 Dec 2016 15:39:16 +0000 (15:39 +0000)]
MFC r310132:
libbfd: make sure variables are initialized before using them.

Initialize l_sec_contents to make sure that free(l_sec_contents) is called
on valid pointers.

Obtained from: OpenBSD (partial CVS rev 1.18)

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

7 years agoMFC r310205:
kib [Wed, 21 Dec 2016 11:34:16 +0000 (11:34 +0000)]
MFC r310205:
Fix typo.

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

7 years agoMFC r310098:
kib [Wed, 21 Dec 2016 11:32:08 +0000 (11:32 +0000)]
MFC r310098:
Provide introductory description of the default pager.

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

7 years agoMFC r308708: Reduce verbosity of warnings about truncating NFS fileids to
cperciva [Tue, 20 Dec 2016 08:42:47 +0000 (08:42 +0000)]
MFC r308708: Reduce verbosity of warnings about truncating NFS fileids to
32-bit inode numbers.

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

7 years agoMFC r309650:
ed [Tue, 20 Dec 2016 07:50:49 +0000 (07:50 +0000)]
MFC r309650:

  Properly sign extend the result of jrand48() and mrand48().

  These functions are supposed to return a value between [-2^31, 2^31).
  This doesn't seem to work on 64-bit systems, where we return a value
  between [0, 3^32). Patch up the function to use proper casts to int32_t.
  While there, fix some other style bugs.

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

7 years agoMFC: r309566
rmacklem [Mon, 19 Dec 2016 22:28:28 +0000 (22:28 +0000)]
MFC: r309566
Fix the NFSv4.1 server for Open reclaim after a reboot.

The NFSv4.1 server failed to update the nfs-stablerestart file for
a client when the client was issued its first Open. As such, recovery
of Opens after a server reboot failed with NFSERR_NOGRACE.
This patch fixes this.
It also changes the code so that it malloc()'s the 1024 byte array
instead of allocating it on the kernel stack for both NFSv4.0 and NFSv4.1.
Note that this bug only affected NFSv4.1 and only when clients attempted
to reclaim Opens after a server reboot.

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

7 years agoMFC r310160
lifanov [Mon, 19 Dec 2016 19:39:02 +0000 (19:39 +0000)]
MFC r310160

retain cc.4.gz man page for Chelsio T6 NICs

This man page was removed in r225583 when cc.4 was renamed to mod_cc.4
With reintroduction of cc.4 "make installworld; make delete-old" was
no longer convergent.

Reviewed by: matthew
Approved by: jhb (implicit), matthew (mentor)
Differential Revision: https://reviews.freebsd.org/D8829

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

7 years agoMFC r307902:
trasz [Mon, 19 Dec 2016 18:27:22 +0000 (18:27 +0000)]
MFC r307902:

Make the USB attach strings in dmesg include product name.

MFC after: 1 month

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

7 years agoMFC r307774:
trasz [Mon, 19 Dec 2016 18:26:26 +0000 (18:26 +0000)]
MFC r307774:

Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not
"product vendor". This is consistent with how it's generally done.
The ordering is visible eg in usbconfig(8) output.

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

7 years agoMFC r309284-r309294
kadesai [Mon, 19 Dec 2016 13:14:39 +0000 (13:14 +0000)]
MFC r309284-r309294

r309294
This patch upgrades driver version to 06.712.04.00-fbsd

r309293
This patch will add code to refire IOCTL commands after OCR.

r309292
This patch will unblock SYNCHRONIZE_CACHE command to firmware,
i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers.

r309291
Wait for AEN task to be completed(if in queue) before resetting the controller
and return without processing event in AEN thread, if controller reset is in progress.

r309290
This patch will add task management support in driver. Below is high level description:
If a SCSI IO times out, then before initiating OCR, now the driver will try to send a
target reset to the particular target for which the IO is timed out. If that also fails,
then the driver will initiate OCR.

r309289
Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR.

r309288
Clean up reference to AEN command if abort AEN is succesful as the command is aborted.
Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful.

r309287
Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved.

r309286
Add sanity check in IO and IOCTL path not to process command further if controller is in
HW_CRITICAL_ERROR.

r309285
Use a variable to indicate Gen3 controllers and remove all PCI ids based
checks used for gen3 controllers.

r309284
High level description of new solution -
Free MFI and MPT command from same context.
Free both the command either from process (from where mfi-mpt pass-through was called) or from
ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which
will do MFI/MPT list.

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

7 years agoMFC r309400:
hselasky [Mon, 19 Dec 2016 09:52:32 +0000 (09:52 +0000)]
MFC r309400:
Fix for endless recursion in the ACPI GPE handler during boot.

When handling a GPE ACPI interrupt object the EcSpaceHandler()
function can be called which checks the EC_EVENT_SCI bit and then
recurse on the EcGpeQueryHandler() function. If there are multiple GPE
events pending the EC_EVENT_SCI bit will be set at the next call to
EcSpaceHandler() causing it to recurse again via the
EcGpeQueryHandler() function. This leads to a slow never ending
recursion during boot which prevents proper system startup, because
the EC_EVENT_SCI bit never gets cleared in this scenario.

The behaviour is reproducible with the ALASKA AMI in combination with
a newer Skylake based mainboard in the following way:

Enter BIOS and adjust the clock one hour forward. Save and exit the
BIOS. System fails to boot due to the above mentioned bug in
EcGpeQueryHandler() which was observed recursing multiple times.

This patch adds a simple recursion guard to the EcGpeQueryHandler()
function and also also adds logic to detect if new GPE events occurred
during the execution of EcGpeQueryHandler() and then loop on this
function instead of recursing.

Reviewed by: jhb

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

7 years agoMFC r309404:
hselasky [Mon, 19 Dec 2016 09:45:23 +0000 (09:45 +0000)]
MFC r309404:
Fix return value from ng_uncallout().

callout_stop() recently started returning -1 when the callout is already
stopped, which is not handled by the netgraph code. Properly filter
the return value. Netgraph callers only want to know if the callout
was cancelled and not draining or already stopped.

Discussed with: julian, glebius

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

7 years agoMFC r309406:
hselasky [Mon, 19 Dec 2016 09:38:34 +0000 (09:38 +0000)]
MFC r309406:
Remove useless NULL checks.

NULL is not returned when allocating memory passing the M_WAITOK flag.

Submitted by: trasz @
Differential Revision:  https://reviews.freebsd.org/D5772
Sponsored by:           Mellanox Technologies

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

7 years agoMFC r310155:
kib [Mon, 19 Dec 2016 00:28:04 +0000 (00:28 +0000)]
MFC r310155:
Fix typo.

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

7 years agoMFC r310013 (by cperciva):
dim [Sun, 18 Dec 2016 14:31:11 +0000 (14:31 +0000)]
MFC r310013 (by cperciva):

Check that blkfront devices have a non-zero number of sectors and a
non-zero sector size.  Such a device would be a virtual disk of zero
bytes; clearly not useful, and not something we should try to attach.

As a fortuitous side effect, checking that these values are non-zero
here results in them not *becoming* zero later on the function.  This
odd behaviour began with r309124 (clang 3.9.0) but is challenging to
debug; making any changes to this function whatsoever seems to affect
the llvm optimizer behaviour enough to make the unexpected zeroing of
the sector_size variable cease.

PR: 215209
Security: The potential for variables to unexpectedly become zero
has worrying consequences for security in general, but
not so much in this particular context.

MFC r310086:

In xbd_connect(), use correct scanf conversion specifiers for the
feature_barrier and feature_flush variables.  Otherwise, adjacent
variables on the stack, such as sector_size, may be overwritten, with
disastrous results.

Note that I did not see a good reason to revert the addition of zero
checks introduced in r310013.  Better safe than sorry.

PR: 215209
Tested by: royger

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

7 years agoMFC r296775 (by gibbs):
kib [Fri, 16 Dec 2016 23:42:49 +0000 (23:42 +0000)]
MFC r296775 (by gibbs):
Provide high precision conversion from ns,us,ms -> sbintime in kevent.

Tested by: ian

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

7 years agoMFC r308806
asomers [Fri, 16 Dec 2016 20:10:55 +0000 (20:10 +0000)]
MFC r308806

Speed up pw operations that edit /etc/group or /etc/passwd

r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group
corruption on power loss. However, it fixed it by opening those files with
O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC
with appropriately placed fsync()s instead, which is much faster. Using a
ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.

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

7 years agoMFC 309274:
jhb [Fri, 16 Dec 2016 01:14:00 +0000 (01:14 +0000)]
MFC 309274:
Use the correct name for the GCC macro indicating max_align_t is defined.

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

7 years agoMFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.
jhb [Fri, 16 Dec 2016 01:06:35 +0000 (01:06 +0000)]
MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.

Add an implementation for pmaps_sync_icache() on MIPS that sync's the
instruction cache on all CPUs via smp_rendezvous() after a debugger
inserts a breakpoint via ptrace(PT_IO).

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

7 years agoMFstable/11 r310126:
ngie [Thu, 15 Dec 2016 20:13:40 +0000 (20:13 +0000)]
MFstable/11 r310126:

MFC r309602:

Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no

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

7 years agoMFC r309676
vangyzen [Thu, 15 Dec 2016 16:52:17 +0000 (16:52 +0000)]
MFC r309676

Export the whole thread name in kinfo_proc

kinfo_proc::ki_tdname is three characters shorter than
thread::td_name.  Add a ki_moretdname field for these three
extra characters.  Add the new field to kinfo_proc32, as well.
Update all in-tree consumers to read the new field and assemble
the full name, except for lldb's HostThreadFreeBSD.cpp, which
I will handle separately.  Bump __FreeBSD_version.

Sponsored by: Dell EMC

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

7 years agoMFC r309709:
kib [Thu, 15 Dec 2016 10:51:35 +0000 (10:51 +0000)]
MFC r309709:
Move map_generation snapshot value into struct faultstate.

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

7 years agoMFC r309708:
kib [Thu, 15 Dec 2016 10:47:35 +0000 (10:47 +0000)]
MFC r309708:
Style.

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

7 years agoMFC 309714: Fix spa_alloc_tree sorting by offset in r305331.
mav [Thu, 15 Dec 2016 08:11:32 +0000 (08:11 +0000)]
MFC 309714: Fix spa_alloc_tree sorting by offset in r305331.

Original commit "7090 zfs should improve allocation order" declares alloc
queue sorted by time and offset.  But in practice io_offset is always zero,
so sorting happened only by time, while order of writes with equal time was
completely random.  On Illumos this did not affected much thanks to using
high resolution timestamps.  On FreeBSD due to using much faster but low
resolution timestamps it caused bad data placement on disks, affecting
further read performance.

This change switches zio_timestamp_compare() from comparing uninitialized
io_offset to really populated io_bookmark values.  I haven't decided yet
what to do with timestampts, but on simple tests this change gives the
same peformance results by just making code to work as declared.

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

7 years agoMFC r309460
vangyzen [Thu, 15 Dec 2016 01:45:31 +0000 (01:45 +0000)]
MFC r309460

thr_set_name(): silently truncate the given name as needed

Instead of failing with ENAMETOOLONG, which is swallowed by
pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1
bytes.  This is more likely what the user wants, and saves the
caller from truncating it before the call (which was the only
recourse).

The man page changes were not merged because thr_set_name.2
does not exist on stable/10.

Sponsored by: Dell EMC

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

7 years agoMFC r309563: pflog: Correctly initialise subrulenr
kp [Wed, 14 Dec 2016 21:30:35 +0000 (21:30 +0000)]
MFC r309563: pflog: Correctly initialise subrulenr

subrulenr is considered unset if it's set to -1, not if it's set to 1.
See contrib/tcpdump/print-pflog.c pflog_print() for a user.

This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0):
  rule 0..16777216(match)
instead of the correct output of
  rule 0/0(match)

PR: 214832
Submitted by: andywhite@gmail.com

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

7 years agoMerge r309860 from stable/9, as this also applies to stable/10:
dim [Wed, 14 Dec 2016 17:27:44 +0000 (17:27 +0000)]
Merge r309860 from stable/9, as this also applies to stable/10:

Fix libllvmanalysis build failure after r309857: on stable/9, llvm is
compiled by gcc, and without -std=c++11, so the nullptr keyword is
unknown.  Use the old-school plain zero syntax instead.

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

7 years agoMFC r277511: Fix remote DMA based firewire debugging when targeting
avg [Wed, 14 Dec 2016 17:17:07 +0000 (17:17 +0000)]
MFC r277511: Fix remote DMA based firewire debugging when targeting
systems with more than 4GB of physical memory.

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

7 years agoMFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues
avg [Wed, 14 Dec 2016 16:44:38 +0000 (16:44 +0000)]
MFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues

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

7 years agoMFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()
avg [Wed, 14 Dec 2016 16:43:09 +0000 (16:43 +0000)]
MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()

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

7 years agoMFC r308529: intpm: clean up intsmb_bread and intsmb_pcall
avg [Wed, 14 Dec 2016 16:35:17 +0000 (16:35 +0000)]
MFC r308529: intpm: clean up intsmb_bread and intsmb_pcall

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

7 years agoMFC r309092: fwohci: report whether PhysicalUpperBound register is implemented
avg [Wed, 14 Dec 2016 16:30:53 +0000 (16:30 +0000)]
MFC r309092: fwohci: report whether PhysicalUpperBound register is implemented

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

7 years agoMFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar
avg [Wed, 14 Dec 2016 16:21:10 +0000 (16:21 +0000)]
MFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar
in both read and write.

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

7 years agoMFC r308985: revert r304520, set canmount=on is not supposed to mount
avg [Wed, 14 Dec 2016 16:11:19 +0000 (16:11 +0000)]
MFC r308985: revert r304520, set canmount=on is not supposed to mount
the filesystem

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

7 years agoMFC r308887,309090: fix unsafe modification of zfs_vnodeops when
avg [Wed, 14 Dec 2016 16:08:35 +0000 (16:08 +0000)]
MFC r308887,309090: fix unsafe modification of zfs_vnodeops when
DIAGNOSTIC is enabled

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

7 years agoMFC r308480: pmc_process_csw_out: ignore deleted counters
avg [Wed, 14 Dec 2016 16:03:23 +0000 (16:03 +0000)]
MFC r308480: pmc_process_csw_out: ignore deleted counters

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

7 years agomake smbus_get_addr() an ivar accessor
avg [Wed, 14 Dec 2016 15:38:28 +0000 (15:38 +0000)]
make smbus_get_addr() an ivar accessor

This is a direct commit to this branch.

smbus_get_addr() was declared as a funciton prototype, but the function
was never defined.  read_ivar and write_ivar methods were unused.

This was exposed after jedec_ts driver was imported to this branch
as that driver turned out to be the first user of smbus_get_addr().

This change is a small subset of a larger change in r281985.

Reported by: jhb
Pointyhat to: avg

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

7 years agoMFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests
des [Wed, 14 Dec 2016 14:23:25 +0000 (14:23 +0000)]
MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests

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

7 years agoMFC r309625
vangyzen [Tue, 13 Dec 2016 23:13:03 +0000 (23:13 +0000)]
MFC r309625

This is imported from NetBSD.  The author--Joerg Sonnenberger--agreed
to apply a two-clause BSD license, just so the license was clear.

This source tree location matches NetBSD, and is the first place someone
might look for such a tool.

Obtained from: Joerg Sonnenberger via NetBSD
Sponsored by: Dell EMC

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

7 years agoMFC r309364 r309367 r309624
vangyzen [Tue, 13 Dec 2016 23:10:35 +0000 (23:10 +0000)]
MFC r309364 r309367 r309624

locale: fix buffer management

Also, handle signed and unsigned chars, and more gracefully handle
invalid input.

locale: enable more warnings; fix them

Do not set WARNS, so it gets the current default of 6.
Fix the warnings by sprinkling static, const, or strdup.
Make some constant data tables const.  Fix whitespace.

Sponsored by: Dell EMC

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

7 years agoMFC r307684, r307747
ken [Mon, 12 Dec 2016 21:54:49 +0000 (21:54 +0000)]
MFC r307684, r307747
  ------------------------------------------------------------------------
  r307684 | ken | 2016-10-20 13:42:26 -0600 (Thu, 20 Oct 2016) | 13 lines

  For CCBs allocated on the stack, we need to clear the entire CCB, not just
  the header.  Otherwise stack garbage can lead to random flags getting set.

  This showed up as 'camcontrol rescan all' failing with EINVAL because the
  address type wasn't CAM_DATA_VADDR.

  sbin/camcontrol/camcontrol.c:
   In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
   use instead of clearing the body.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r307747 | ken | 2016-10-21 12:54:56 -0600 (Fri, 21 Oct 2016) | 27 lines

  Fix a problem in camcontrol(8) that cropped up with r307684.

  In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs
  before sending them to the kernel because there was stack garbage in there
  that wound up meaning that bogus CCB flags were set.

  While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were
  failing previously), it broke the 'camcontrol rescan 0' (or any other
  number) case when INVARIANTS are turned on.  Rescanning a single bus
  reliably produced an assert in cam_periph_runccb():

  panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0

  The flags values don't make sense from the code.  Changing the CCBs in
  rescan_or_reset_bus() from stack to heap allocated avoids the problem.

  It would be better to understand why userland stack allocated CCBs don't
  work properly, since there may be other code that breaks if stack allocated
  CCBs don't work.

  sbin/camcontrol/camcontrol.c:
   In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead
   of on the stack to avoid an assertion in cam_periph_runccb().

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

7 years agoMFC r307402: Guard against bad service name argument(s) to load_rc_config()
dteske [Mon, 12 Dec 2016 17:58:43 +0000 (17:58 +0000)]
MFC r307402: Guard against bad service name argument(s) to load_rc_config()

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

7 years agoMFC: r309060
brueffer [Mon, 12 Dec 2016 11:04:22 +0000 (11:04 +0000)]
MFC: r309060

Fix comment typo.

PR: 208484
Submitted by: madpilot

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

7 years agoMFC r309803:
bapt [Mon, 12 Dec 2016 07:03:10 +0000 (07:03 +0000)]
MFC r309803:

Fix pw groupshow <gid>

PR: 204676
Submitted by: longwitz@incore.de

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

7 years agoMFC r309796:
bapt [Mon, 12 Dec 2016 07:01:05 +0000 (07:01 +0000)]
MFC r309796:

Perl is not available in base fix scripts depending on it to use
the version from ports

PR: 215159
Reported by: Anatoly Kamchatnov <akamch@gmail.com>

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

7 years agoMFC r309795:
bapt [Mon, 12 Dec 2016 06:58:44 +0000 (06:58 +0000)]
MFC r309795:

Update pci ids database to 2016.11.21

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

7 years agoMFC r308350:
markj [Mon, 12 Dec 2016 02:24:46 +0000 (02:24 +0000)]
MFC r308350:
Fix WITNESS hints for pagequeue locks.

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

7 years agoMFC r309241,309243:
delphij [Mon, 12 Dec 2016 02:22:49 +0000 (02:22 +0000)]
MFC r309241,309243:

Plug memory leaks.

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

7 years agoMFC r309238,309239:
delphij [Mon, 12 Dec 2016 02:14:42 +0000 (02:14 +0000)]
MFC r309238,309239:

r309238: Plug a potential memory leak.
r309239: style(9).

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

7 years agoMFC r309232-309234:
delphij [Mon, 12 Dec 2016 00:47:12 +0000 (00:47 +0000)]
MFC r309232-309234:

r309232: Fix an obvious typo.
r309233: Eliminate variables that are computed, assigned but
         never used.
r309234: pages and psize are always assigned, so there is no
         need to initialize them as zero.

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

7 years agoMFC r309722:
dim [Sun, 11 Dec 2016 19:58:13 +0000 (19:58 +0000)]
MFC r309722:

Pull in r281586 from upstream llvm trunk (by Wei Mi):

  Add some shortcuts in LazyValueInfo to reduce compile time of
  Correlated Value Propagation.

  The patch is to partially fix PR10584. Correlated Value Propagation
  queries LVI to check non-null for pointer params of each callsite. If
  we know the def of param is an alloca instruction, we know it is
  non-null and can return early from LVI. Similarly, CVP queries LVI to
  check whether pointer for each mem access is constant. If the def of
  the pointer is an alloca instruction, we know it is not a constant
  pointer. These shortcuts can reduce the cost of CVP significantly.

  Differential Revision: https://reviews.llvm.org/D18066

This significantly reduces memory usage and compilation time when
compiling a particular C++ source file of the graphics/colmap port.

PR: 215136

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

7 years agoMFC r308420: MFV r308392: file 5.29.
delphij [Sun, 11 Dec 2016 07:37:20 +0000 (07:37 +0000)]
MFC r308420: MFV r308392: file 5.29.

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

7 years agoMFC r309491: Build smbios.ko as a module for amd64 and i386
rpokala [Sun, 11 Dec 2016 02:01:59 +0000 (02:01 +0000)]
MFC r309491: Build smbios.ko as a module for amd64 and i386

For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
smapi is only for i386, so the entire "bios" directory is only built for
i386. Break smapi out, and make only it i386-specific. Then, build the
"bios" directory for both amd64 and i386.

Because 'sys/modules/Makefile' was refactored after stable/10 was branched,
the diff for that file is different from that of the original commit. They
are functionally equivalent.

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

7 years agoMFH (r308297): use what(1) instead of strings(1).
des [Sat, 10 Dec 2016 20:24:22 +0000 (20:24 +0000)]
MFH (r308297): use what(1) instead of strings(1).

PR: 213665
Submitted by: Pawel Worach <pawel.worach@gmail.com>

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

7 years agoMFH (r296659): the IPv6 address of the L root changed earlier this year
des [Sat, 10 Dec 2016 20:23:16 +0000 (20:23 +0000)]
MFH (r296659): the IPv6 address of the L root changed earlier this year

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

7 years agoMFC r309544:
bapt [Sat, 10 Dec 2016 11:37:05 +0000 (11:37 +0000)]
MFC r309544:

Import tzdata 2016j

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

7 years agoMFC r309184:
delphij [Sat, 10 Dec 2016 06:27:45 +0000 (06:27 +0000)]
MFC r309184:

style(9) indent changes, no actual code change.

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

7 years agoMFC r309298: libm: remove duplicate version script entries
emaste [Fri, 9 Dec 2016 17:17:37 +0000 (17:17 +0000)]
MFC r309298: libm: remove duplicate version script entries

These symbols already appear in the common lib/msun/Symbol.map.
Duplicate entries produce an error with LLVM's LLD linker.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC 309613: cxgbe(4): Update firmwares from version 1.16.12.0 to 1.16.22.0.
jhb [Fri, 9 Dec 2016 01:44:26 +0000 (01:44 +0000)]
MFC 309613: cxgbe(4): Update firmwares from version 1.16.12.0 to 1.16.22.0.

Sponsored by: Chelsio Communications

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

7 years agoPartial MFC r309300:
mm [Thu, 8 Dec 2016 01:07:00 +0000 (01:07 +0000)]
Partial MFC r309300:

Apply fix for libarchive issue #821:
  "tar -P" cannot extract hardlinks through symlinks

PR: 213255
Reported by: Tijl Coosemans <tilj@FreeBSD.org>

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

7 years agoMerge rr309688: address regressions in SA-16:37.libc.
glebius [Wed, 7 Dec 2016 23:20:26 +0000 (23:20 +0000)]
Merge rr309688: address regressions in SA-16:37.libc.

PR: 215105
Submitted by: <jtd2004a sbcglobal.net>

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

7 years agoDocument EN-16:19, EN-16:20, EN-16:21, SA-16:36, SA-16:37, SA-16:38.
gjb [Wed, 7 Dec 2016 18:55:55 +0000 (18:55 +0000)]
Document EN-16:19, EN-16:20, EN-16:21, SA-16:36, SA-16:37, SA-16:38.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFstable/11 r309661:
ngie [Wed, 7 Dec 2016 00:57:15 +0000 (00:57 +0000)]
MFstable/11 r309661:

MFC r306962:
r306962 (by br):

Ensure data in pipe is available to read.
Useful for latest (5th, direct mode) test only.

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

7 years agoMerge r309640 from head:
glebius [Tue, 6 Dec 2016 18:55:01 +0000 (18:55 +0000)]
Merge r309640 from head:

  Fix possible integer overflow in guest memory bounds checking, which could
  lead to access from the virtual machine to the heap of the bhyve(8) process.

Submitted by: Felix Wilhelm <fwilhelm ernw.de>
Patch by: grehan
Security: FreeBSD-SA-16:38.bhyve

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

7 years agoMerge r309639 from head:
glebius [Tue, 6 Dec 2016 18:53:46 +0000 (18:53 +0000)]
Merge r309639 from head:

  Fix possible buffer overflow(s) in link_ntoa(3).

  A specially crafted sockaddr_dl argument can trigger a static buffer overflow
  in the libc library, with possibility to rewrite with arbitrary data following
  static buffers that belong to other library functions.

Reviewed by: kib
Security: FreeBSD-SA-16:37.libc

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

7 years agoMerge r309638 from head:
glebius [Tue, 6 Dec 2016 18:52:18 +0000 (18:52 +0000)]
Merge r309638 from head:

  When telnetd(8) composes argument list for login(1), an unexpected sequence
  of memory allocation failures combined with insufficient error checking
  could result in the construction and execution of an argument sequence that
  was not intended.

  Fix that treating malloc(3) failures as fatal condition.

Submitted by: brooks
Security: FreeBSD-SA-16:36.telnetd

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

7 years agoMFC r309282: Explicitly initialize cdai.flags.
mav [Tue, 6 Dec 2016 17:10:17 +0000 (17:10 +0000)]
MFC r309282: Explicitly initialize cdai.flags.

In SES driver uninitialized value caused unreliable physpath reporting.

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