]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd documentation for "ctld -u", the UCL configuration file format.
Edward Tomasz Napierala [Thu, 21 Jul 2016 08:22:25 +0000 (08:22 +0000)]
Add documentation for "ctld -u", the UCL configuration file format.

Submitted by: jceel@
Reviewed by: wblock@
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7222

8 years agohyperv: hv_vmbus_channel -> vmbus_channel
Sepherosa Ziehau [Thu, 21 Jul 2016 06:09:47 +0000 (06:09 +0000)]
hyperv: hv_vmbus_channel -> vmbus_channel

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7260

8 years agoAdd LOCAL_XTOOL_DIRS to add into cross-tools.
Bryan Drewery [Thu, 21 Jul 2016 06:06:11 +0000 (06:06 +0000)]
Add LOCAL_XTOOL_DIRS to add into cross-tools.

Sponsored by: EMC / Isilon Storage Division

8 years agohyperv/vmbus: Shuffle function declaration and macro definition.
Sepherosa Ziehau [Thu, 21 Jul 2016 05:46:26 +0000 (05:46 +0000)]
hyperv/vmbus: Shuffle function declaration and macro definition.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7259

8 years agohyperv/vmbus: Reorder channel fields.
Sepherosa Ziehau [Thu, 21 Jul 2016 05:38:05 +0000 (05:38 +0000)]
hyperv/vmbus: Reorder channel fields.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7258

8 years agohyperv/vmbus: Save event flag location and evet flag mask.
Sepherosa Ziehau [Thu, 21 Jul 2016 05:30:31 +0000 (05:30 +0000)]
hyperv/vmbus: Save event flag location and evet flag mask.

This avoids unnecessary access to the vmbus_softc struct on sending path.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7257

8 years agoActually import nvme_sim so the CAM attachment for NVME (nda) actually
Warner Losh [Thu, 21 Jul 2016 03:11:39 +0000 (03:11 +0000)]
Actually import nvme_sim so the CAM attachment for NVME (nda) actually
works.

MFC after: 1 week

8 years agoRemove some bogus comments and printfs. Also, we can't
Warner Losh [Thu, 21 Jul 2016 03:11:37 +0000 (03:11 +0000)]
Remove some bogus comments and printfs. Also, we can't
cam_periph_releaes_locked() at the end of nvme_probe_start because we
hit an assertion which may be bogus. Instead, leak a periph until we
sort it out. Since these devices don't arrive and depart often, so
this is the lessor of two evils.

MFC after: 1 week

8 years agoFix mismerge and add NVME xport support to devstat (or rather, exclude
Warner Losh [Thu, 21 Jul 2016 03:11:36 +0000 (03:11 +0000)]
Fix mismerge and add NVME xport support to devstat (or rather, exclude
it from SCSI).

MFC after: 1 week

8 years agoFix mismerge and include the nvme support.
Warner Losh [Thu, 21 Jul 2016 03:11:35 +0000 (03:11 +0000)]
Fix mismerge and include the nvme support.
Also, print out the name of any CCB's functions that's not supported.

MFC after: 1 week

8 years agoMirror r303120 to gcore
Conrad Meyer [Thu, 21 Jul 2016 00:53:14 +0000 (00:53 +0000)]
Mirror r303120 to gcore

Sponsored by: EMC / Isilon Storage Division

8 years agoimgact_elf: Rename the segment iterator to match reality
Conrad Meyer [Wed, 20 Jul 2016 22:51:33 +0000 (22:51 +0000)]
imgact_elf: Rename the segment iterator to match reality

The each_writable_segment routine evaluates segments on a slightly little more
nuanced metric than simply "writable" or not.  Rename the function to more
closely match its behavior (each_dumpable_segment).

Suggested by: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoCreate a /usr/home -> /home symlink for the arm images to
Glen Barber [Wed, 20 Jul 2016 22:49:33 +0000 (22:49 +0000)]
Create a /usr/home -> /home symlink for the arm images to
avoid /usr/home confusingly being created as a directory.

Reported by: Russell Haley
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years agoANSI-fy imgact_elf.c
Conrad Meyer [Wed, 20 Jul 2016 22:46:56 +0000 (22:46 +0000)]
ANSI-fy imgact_elf.c

Sponsored by: EMC / Isilon Storage Division

8 years agourtwn: fix A-MSDU tx aggregation when encryption is used.
Andriy Voskoboinyk [Wed, 20 Jul 2016 22:05:44 +0000 (22:05 +0000)]
urtwn: fix A-MSDU tx aggregation when encryption is used.

Clear unused (undocumented) CAM bytes while setting a key;
without that, hardware does weird things when A-MSDU bit in QoS header
is set.

Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit).

Reported by: many
Obtained from: https://github.com/s3erios/urtwm
MFC after: 5 days

8 years agoAdd extended segment support to gcore
Conrad Meyer [Wed, 20 Jul 2016 22:03:45 +0000 (22:03 +0000)]
Add extended segment support to gcore

A follow-up to r303099, D7255.  Basically, apply the exact same change, with
the exact same rationale, to gcore.  gcore's elfcore.c is largely a clone of
the kernel imgact_elf coredump facility.

Reviewed by: emaste (earlier version, not substantially different)
Requested by: jhb
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7265

8 years agoCross-link some SMBus controller drivers man pages.
Alexander Motin [Wed, 20 Jul 2016 20:18:52 +0000 (20:18 +0000)]
Cross-link some SMBus controller drivers man pages.

Some compatibility cases are not obvious.

8 years agoDocument list of supported chipsets.
Alexander Motin [Wed, 20 Jul 2016 20:10:37 +0000 (20:10 +0000)]
Document list of supported chipsets.

8 years agoRemove uneeded parens.
Sean Bruno [Wed, 20 Jul 2016 19:21:11 +0000 (19:21 +0000)]
Remove uneeded parens.

MFC after: 1 day

8 years agoUpdate crashinfo to work with newer gdb from ports.
John Baldwin [Wed, 20 Jul 2016 18:41:47 +0000 (18:41 +0000)]
Update crashinfo to work with newer gdb from ports.

If gdb from ports is installed, use it instead of the base system gdb
to extract variables from a kernel.  Note that base gdb and ports gdb
do not support the same options for invoking a single command in batch
mode, so a wrapper shell function is used.  In addition, prefer kgdb
from ports when generating a backtrace if present.

PR: 193335
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7218

8 years agoChange wording to use function rather than system call in the description
Niclas Zeising [Wed, 20 Jul 2016 18:16:58 +0000 (18:16 +0000)]
Change wording to use function rather than system call in the description
as well.

Reviewed by: brooks
MFC after: 5 days

8 years agoFix DEBUG build on 64-bit arch after r303099
Conrad Meyer [Wed, 20 Jul 2016 18:11:22 +0000 (18:11 +0000)]
Fix DEBUG build on 64-bit arch after r303099

Reported by: Larry Rosenman <ler at lerctr.org>

8 years agoUpdate to reflect the fact that pipe() is a wrapper around the pipe2()
Brooks Davis [Wed, 20 Jul 2016 18:02:07 +0000 (18:02 +0000)]
Update to reflect the fact that pipe() is a wrapper around the pipe2()
system call.

Reviewed by: jhb, wblock
MFC after: 5 days
Sponsored by: DAPRA, AFRL
Differential Revision: https://reviews.freebsd.org/D6948

8 years agoMinor wording improvements to the note about pipe(2) removal.
Brooks Davis [Wed, 20 Jul 2016 18:00:22 +0000 (18:00 +0000)]
Minor wording improvements to the note about pipe(2) removal.

MFC after: 5 days
Sponsored by: DARPA, AFRL

8 years agoMark the Designware MMC and USB OTG drivers as FDT only. These are normally
Andrew Turner [Wed, 20 Jul 2016 17:46:33 +0000 (17:46 +0000)]
Mark the Designware MMC and USB OTG drivers as FDT only. These are normally
found on arm64 devices that use FDT.

Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd a comment describing the 'fast path' that was introduced in r270011.
Alan Cox [Wed, 20 Jul 2016 17:20:22 +0000 (17:20 +0000)]
Add a comment describing the 'fast path' that was introduced in r270011.

Reviewed by: kib
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoWe will be switching to a new arm64 uart cpu driver that handles both FDT
Andrew Turner [Wed, 20 Jul 2016 17:19:47 +0000 (17:19 +0000)]
We will be switching to a new arm64 uart cpu driver that handles both FDT
and ACPI. As such pull out what will be the common parts of the FDT cpu
detection to a new function that can be shared between them.

Reviewed by: manu
Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7262

8 years agoExtend ELF coredump to support more than 65535 segments
Conrad Meyer [Wed, 20 Jul 2016 16:59:36 +0000 (16:59 +0000)]
Extend ELF coredump to support more than 65535 segments

The ELF e_phnum field is only 16 bits wide. To support more than 65535 segments
(program headers), Sun's "Linker and Libraries Guide" table 7-7 (or 12-7,
depending on document version) prescribes a special first section header where
sh_info represents the real number of program headers.

Test code to follow, when it is ready.

Reference: http://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf

Reviewed by: emaste, markj
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7255

8 years agoRedo the r302894: the very new value for a non-scheduled callout is -1.
Gleb Smirnoff [Wed, 20 Jul 2016 16:48:25 +0000 (16:48 +0000)]
Redo the r302894: the very new value for a non-scheduled callout is -1.
This was recently added in r290664.

Noticed by: hselasky
Tested by: Larry Rosenman <ler lerctr.org>
PR: 210884

8 years agoAdd myself to MAINTAINERS.
Nathan Whitehorn [Wed, 20 Jul 2016 16:46:13 +0000 (16:46 +0000)]
Add myself to MAINTAINERS.

8 years agoRevert r303037. It re-introduces the panic with TCP timers.
Gleb Smirnoff [Wed, 20 Jul 2016 16:44:22 +0000 (16:44 +0000)]
Revert r303037. It re-introduces the panic with TCP timers.

Agreed by: rrs, re (gjb)

8 years agoContinuation lines with comments badly affects gprof, it is excluded from
Andrey A. Chernov [Wed, 20 Jul 2016 15:59:37 +0000 (15:59 +0000)]
Continuation lines with comments badly affects gprof, it is excluded from
build on amd64 f.e.

8 years agoFix camdd for host-aware and host-managed SMR disks.
Alan Somers [Wed, 20 Jul 2016 15:00:05 +0000 (15:00 +0000)]
Fix camdd for host-aware and host-managed SMR disks.

This should've gone in as part of r300207

Reviewed by: ken
MFC after: 3 days
Sponsored by: Spectra Logic Corp

8 years agoEnsure that the UFS directory vnode' vm_object is properly sized
Konstantin Belousov [Wed, 20 Jul 2016 14:40:56 +0000 (14:40 +0000)]
Ensure that the UFS directory vnode' vm_object is properly sized
before UFS_BALLOC() is called.  I do not believe that this caused any
real issue on FreeBSD because the exclusive vnode lock is held over
the balloc/resize, the change is to make formally correct KPI use.

Based on: the Matthew Dillon' patch from DragonFly BSD
PR: 93942
Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIn addition to r303074 case 1, search for protected L'/' too in globtilde()
Andrey A. Chernov [Wed, 20 Jul 2016 12:46:21 +0000 (12:46 +0000)]
In addition to r303074 case 1, search for protected L'/' too in globtilde()

8 years agoAdd support for the SID (Security ID Module) on Allwinner A10 and A20.
Emmanuel Vadot [Wed, 20 Jul 2016 11:23:06 +0000 (11:23 +0000)]
Add support for the SID (Security ID Module) on Allwinner A10 and A20.
The rootkey is burnt at production and can't be changed, thus is can be used
as a device unique ID or to generate a MAC address (This is was u-boot does).
The rootkey is exposed as a sysctl (dev.aw_sid.<unit>.rootkey).

Reviewed by: jmcneill
Differential Revision: https://reviews.freebsd.org/D6383

8 years agoMFV r303083: 7164 zdb should be able to open the root dataset
Andriy Gapon [Wed, 20 Jul 2016 11:15:32 +0000 (11:15 +0000)]
MFV r303083: 7164 zdb should be able to open the root dataset

Note: conversion of the manual page change from roff to mdoc is mine.

illumos/illumos-gate@b702644a6eb66615d67b492fd73ecd9efa11fc7d
https://github.com/illumos/illumos-gate/commit/b702644a6eb66615d67b492fd73ecd9efa11fc7d

https://www.illumos.org/issues/7164
  If the pool/dataset command-line argument is specified with a trailing
  slash, for example, "tank/", we should interpret it as the topmost
  dataset (rather than the whole pool)

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Tim Chase <tim@chase2k.com>
PR: 204661
MFC after: 1 week
Relnotes: yes

8 years agoRemove outdated list of supported chipsets, generalizing it.
Alexander Motin [Wed, 20 Jul 2016 11:04:49 +0000 (11:04 +0000)]
Remove outdated list of supported chipsets, generalizing it.

8 years agoMFV r303082: 6391 Override default SPA config location via environment
Andriy Gapon [Wed, 20 Jul 2016 10:06:56 +0000 (10:06 +0000)]
MFV r303082: 6391 Override default SPA config location via environment

illumos/illumos-gate@ae24175b2b25e9fb4bfd9ac0648b57e0735b6651
https://github.com/illumos/illumos-gate/commit/ae24175b2b25e9fb4bfd9ac0648b57e0735b6651

https://www.illumos.org/issues/6391
  When using zdb with non-default SPA config file it is not convenient
  to add -U <non-default-config-file-path> all the time. This commit
  introduces support for setting/overriding SPA config location via
  environment variable 'SPA_CONFIG_PATH'.
  If -U flag is specified in the command line it will override any other
  value as usual.

https://github.com/zfsonlinux/zfs/commit/64d7b6cf75e52a4698d9bdec61745573c39d2e5a

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Cyril Plisko <cyril.plisko@mountall.com>
MFC after: 1 week

8 years ago7164 zdb should be able to open the root dataset
Andriy Gapon [Wed, 20 Jul 2016 09:58:10 +0000 (09:58 +0000)]
7164 zdb should be able to open the root dataset

illumos/illumos-gate@b702644a6eb66615d67b492fd73ecd9efa11fc7d
https://github.com/illumos/illumos-gate/commit/b702644a6eb66615d67b492fd73ecd9efa11fc7d

https://www.illumos.org/issues/7164
  If the pool/dataset command-line argument is specified with a trailing
  slash, for example, "tank/", we should interpret it as the topmost
  dataset (rather than the whole pool)

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Tim Chase <tim@chase2k.com>

8 years ago6391 Override default SPA config location via environment
Andriy Gapon [Wed, 20 Jul 2016 09:57:16 +0000 (09:57 +0000)]
6391 Override default SPA config location via environment

illumos/illumos-gate@ae24175b2b25e9fb4bfd9ac0648b57e0735b6651
https://github.com/illumos/illumos-gate/commit/ae24175b2b25e9fb4bfd9ac0648b57e0735b6651

https://www.illumos.org/issues/6391
  When using zdb with non-default SPA config file it is not convenient
  to add -U <non-default-config-file-path> all the time. This commit
  introduces support for setting/overriding SPA config location via
  environment variable 'SPA_CONFIG_PATH'.
  If -U flag is specified in the command line it will override any other
  value as usual.

https://github.com/zfsonlinux/zfs/commit/64d7b6cf75e52a4698d9bdec61745573c39d2e5a

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Cyril Plisko <cyril.plisko@mountall.com>

8 years ago7163 ztest failures due to excess error injection
Andriy Gapon [Wed, 20 Jul 2016 09:54:18 +0000 (09:54 +0000)]
7163 ztest failures due to excess error injection

illumos/illumos-gate@f34284d835bc555f987c1310df46c034c3101155
https://github.com/illumos/illumos-gate/commit/f34284d835bc555f987c1310df46c034c3101155

https://www.illumos.org/issues/7163
  Running zloop from zfs-precommit hit this assertion:
       *panicstr/s
  0xfffffd7fd7419370: assertion failed for thread 0xfffffd7fe29ed240,
  thread-id 577: parent != NULL, file ../../../uts/common/fs/zfs/dbuf.c, line
  1827
       $c
  libc.so.1`_lwp_kill+0xa()
  libc.so.1`_assfail+0x182(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libc.so.1`assfail+0x19(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libzpool.so.1`dbuf_dirty+0xc69(10e3bc103601700)
  libzpool.so.1`dbuf_dirty+0x61e(10c736403601700)
  libzpool.so.1`dbuf_dirty+0x61e(10e282803601700)
  libzpool.so.1`dmu_buf_will_fill+0x64(10e282803601700)
  libzpool.so.1`dmu_write+0x1b6(2c7e640, d, 400000002e000000, 200, 3717b40,
  3601700)
  ztest_replay_write+0x568(4950d0, 3717a80, 0)
  ztest_write+0x125(4950d0, d, 400000002e000000, 200, 413f000)
  ztest_io+0x1bb(4950d0, d, 400000002e000000)
  ztest_dmu_write_parallel+0xaa(4950d0, 6)
  ztest_execute+0x83(1, 420c98, 6)
  ztest_thread+0xf4(6)
  libc.so.1`_thrp_setup+0x8a(fffffd7fe29ed240)
  libc.so.1`_lwp_start()
  This is another manifestation of ECKSUM in ztest:
  The lowest level ancestor that’s in memory is the L8 (topmost). The L7
  ancestor is blkid 0x10:
       ::dbufs -O 0x2c7e640 -o d -l 7 |::dbuf
  addr object lvl blkid holds os
  600be50 d 7 4 1 ztest/ds_6
  719d880 d 7 0 4 ztest/ds_6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

8 years ago6451 ztest fails due to checksum errors
Andriy Gapon [Wed, 20 Jul 2016 09:53:46 +0000 (09:53 +0000)]
6451 ztest fails due to checksum errors

illumos/illumos-gate@f9eb9fdf196b6ed476e4ffc69cecd8b0da3cb7e7
https://github.com/illumos/illumos-gate/commit/f9eb9fdf196b6ed476e4ffc69cecd8b0da3cb7e7

https://www.illumos.org/issues/6451
  Sometimes ztest fails because zdb detects checksum errors. e.g.:
  Traversing all blocks to verify checksums and verify nothing leaked ...
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 8000160> DVA0=<0:1cc2000:
  180000> [L0 other uint64[]] sha256 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=271L/271P fill=1
  cksum=c5a3e27d1ed0f894:843bca3a5473c4bf:f76a19b6830a2e4:91292591613a12bf --
  skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 800000180> DVA0=<0:ce16800:
  180000> [L0 other uint64[]] sha256 uncompressed LE contigu
  ous unique single size=100000L/100000P birth=840L/840P fill=1
  cksum=5d018f3d061e17f3:6d1584784587bf63:2805a74a0ce37369:ba68a214806c7e75
  -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 1000000360> DVA0=<0:10d37400:
  180000> [L0 other uint64[]] sha256 uncompressed LE conti
  guous unique single size=100000L/100000P birth=904L/904P fill=1
  cksum=fa1e11d4138bd14b:86c9488c444473e3:f31e43c72e72e46b:e3446472d1174d
  ba -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 400000002c0> DVA0=<0:127ef400:
  180000> [L0 other uint64[]] sha256 uncompressed LE cont
  iguous dedup single size=100000L/100000P birth=549L/549P fill=1
  cksum=30e14955ebf13522:66dc2ff8067e6810:4607e750abb9d3b3:6582b8af909fcb
  58 -- skipping
  zdb_blkptr_cb: Got error 50 reading <657, 5, 0, 1c0> DVA0=<0:1a180400:180000>
  [L0 other uint64[]] fletcher4 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=1091L/1091P fill=1 cksum=a6cf1e50:
  29b3bd01c57e5:36779b914035db9a:db61cdcf6bec56f0 -- skippin
  g
  The problem is that ztest_fault_inject() can inject multiple faults into the
  same block. It is designed such that it can inject errors on all leafs of a
  RAID-Z or mirror, but for a given range of offsets, it will only inject errors

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

8 years ago7147 ztest: ztest_ddt_repair fails with ztest_pattern_match assertion
Andriy Gapon [Wed, 20 Jul 2016 09:51:33 +0000 (09:51 +0000)]
7147 ztest: ztest_ddt_repair fails with ztest_pattern_match assertion

illumos/illumos-gate@aab80726335c76a7cae32c7300890248d73a51e3
https://github.com/illumos/illumos-gate/commit/aab80726335c76a7cae32c7300890248d73a51e3

https://www.illumos.org/issues/7147
  Here's the dbuf we're currently reading:
       966f200::dbuf
  addr object lvl blkid holds os
  966f200 4 0 0 1 ztest/ds_3
       966f200::print dmu_buf_t db_data
  db_data = 0x9ae0400
       0x9ae0400/10J
  0x9ae0400: c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d
  The pattern we're expecting is actually this: a34ae10b5f2db2. If we attempt to
  read the block on disk we find that it has matches what ztest_ddt_repair()
  would have written:
       ~c1c7ced932020d=J
  ff3e383126cdfdf2
       966f200::print dmu_buf_impl_t db_blkptr | ::blkptr
  DVA0=<0:71d3c00:800>
  [L0 UINT64_OTHER] SHA256 OFF LE contiguous dedup single
  size=400L/400P birth=55L/55P fill=1
  cksum=18486450d3ce8c6d:75a72f4bbf117b0f:2d3a226314eb5650:2eb0fd68648b1af0
     1. zdb -U /rpool/tmp/zpool.cache -R ztest 0:71d3c00:800 | head
        Found vdev type: mirror
  0:71d3c00:800
  0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  000000: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000010: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000020: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000030: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000040: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000050: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

8 years ago7086 ztest attempts dva_get_dsize_sync on an embedded blockpointer
Andriy Gapon [Wed, 20 Jul 2016 09:49:09 +0000 (09:49 +0000)]
7086 ztest attempts dva_get_dsize_sync on an embedded blockpointer

illumos/illumos-gate@926549256b71acd595f69b236779ff6b78fa08ef
https://github.com/illumos/illumos-gate/commit/926549256b71acd595f69b236779ff6b78fa08ef

https://www.illumos.org/issues/7086
  In dbuf_dirty(), we need to grab the dn_struct_rwlock before looking at the
  db_blkptr, to prevent it from being changed by syncing context.
  Otherwise we may see that ztest got a segfault from this stack:
  libzpool.so.1`dva_get_dsize_sync+0x98(872f000b32b240fed7811b, 0, b4cda20, 0)
  libzpool.so.1`bp_get_dsize+0x60(872f000b32b240, 0, 97cb7809d4c1a8, 0)
  libzpool.so.1`dbuf_dirty+0x9b3(ce0a10097cb780, 9, fecd2530)
  libzpool.so.1`dmu_buf_will_dirty+0xc3(ce0a10097cb780ea293d6c, 1)
  libzpool.so.1`zap_lockdir+0x1a0(8aaa3c0, 1, 0, 97cb780, 1, 1)
  libzpool.so.1`zap_remove_norm+0x30(8aaa3c0, 1, 0, 8728b10, 0, 97cb780)
  libzpool.so.1`zap_remove+0x29(8aaa3c0, 1, 0, 8728b1097cb780, a)
  ztest_replay_remove+0x225(ea2945888728ae8, 0, 38010000, 0, 0)
  ztest_remove+0x9f(ea294588ea293f50, 4, 3)
  ztest_object_init+0x78(ea294588ea293f50, 4e0, 1)
  ztest_dmu_object_alloc_free+0x71(ea294588, 13)
  ztest_dmu_objset_create_destroy+0x224(80cef08, 13, 0, 805d36c9017ad44, 0)
  ztest_execute+0x89(a, 807c720, 13, 0)
  ztest_thread+0xea(13, 0, 0, 0)
  libc.so.1`_thrp_setup+0x88(f0983240)
  libc.so.1`_lwp_start(f0983240, 0, 0, 0, 0, 0)
  Looking into it a bit, we see that this is an embedded blockpointer, so
  BP_GET_NDVAS should have returned 0:
       b32b240::blkptr
  EMBEDDED [L0 ZAP_OTHER] et=0 LZ4 size=200L/4aP birth=80L
  Instead, it looks like another thread is modifying this blockpointer:
       b32b240::ugrep | ::whatis
  f47a0e0c is in [ stack tid=0x19f ]
  ebd6ec40 is in [ stack tid=0x226 ]
  ea293bd0 is in [ stack tid=0x244 ]
  ea293be4 is in [ stack tid=0x244 ]

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

8 years ago7072 zfs fails to expand if lun added when os is in shutdown state
Andriy Gapon [Wed, 20 Jul 2016 09:47:35 +0000 (09:47 +0000)]
7072 zfs fails to expand if lun added when os is in shutdown state

illumos/illumos-gate@c39a2aae1e2c439d156021edfc20910dad7f9891
https://github.com/illumos/illumos-gate/commit/c39a2aae1e2c439d156021edfc20910dad7f9891

https://www.illumos.org/issues/7072
  upstream:
  38733 zfs fails to expand if lun added when os is in shutdown state
  DLPX-36910 spares and caches should not display expandable space
  DLPX-39262 vdev_disk_open spam zfs_dbgmsg buffer

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>

8 years agovesa: fix panic on suspend
Roger Pau Monné [Wed, 20 Jul 2016 09:29:39 +0000 (09:29 +0000)]
vesa: fix panic on suspend

Fix the following panic seen when migrating a FreeBSD guest on Xen:

panic: mtx_lock() of destroyed mutex @ /usr/src/sys/dev/fb/vesa.c:541
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001d2fa4f0
vpanic() at vpanic+0x182/frame 0xfffffe001d2fa570
kassert_panic() at kassert_panic+0x126/frame 0xfffffe001d2fa5e0
__mtx_lock_flags() at __mtx_lock_flags+0x15b/frame 0xfffffe001d2fa630
vesa_bios_save_restore() at vesa_bios_save_restore+0x78/frame 0xfffffe001d2fa680
vga_suspend() at vga_suspend+0xa3/frame 0xfffffe001d2fa6b0
isavga_suspend() at isavga_suspend+0x1d/frame 0xfffffe001d2fa6d0
bus_generic_suspend_child() at bus_generic_suspend_child+0x44/frame
[...]

This is caused because vga_sub_configure (which is called if the VGA adapter
is attached after VESA tried to initialize), points to vesa_configure, which
doesn't initialize the VESA mutex. In order to fix it, make sure
vga_sub_configure points to vesa_load, so that all the needed vesa
components are properly initialized.

Sponsored by: Citrix Systems R&D
MFC after: 3 days
PR: 209203
Reviewed by: dumbbell
Differential revision: https://reviews.freebsd.org/D7196

8 years ago1) Per POSIX (and glibc) GLOB_NOCHECK should return original pattern,
Andrey A. Chernov [Wed, 20 Jul 2016 07:30:44 +0000 (07:30 +0000)]
1) Per POSIX (and glibc) GLOB_NOCHECK should return original pattern,
unmodified, if no matches found. But our original code strips all '\'
returning it. Rewrite the code to allow to reconstruct exact the
original pattern with backslashes for this case.

2) Prevent to use truncated pattern if MAXPATHLEN exceeded, return
GLOB_NOMATCH instead.

3) Fix few end loop conditions filling Char arrays with mbrtowc(),
MB_CUR_MAX is unneeded in two places and condition is less by one
in other place.

4) Prevent to use truncated filenames match if MAXPATHLEN exceeded,
skip such directory entries.

5) Don't end *pathend with L'/' in glob3() if limit is reached, this
change will be not visible since error is returned.

6) If error happens in (*readdirfunc)(), do the same GLOB_ABORTED
processing as for g_opendir() as POSIX requires.

8 years agoFix a bug in deferred stream reset processing which results
Michael Tuexen [Wed, 20 Jul 2016 06:29:26 +0000 (06:29 +0000)]
Fix a bug in deferred stream reset processing which results
in using a length field before it is set.

Thanks to Taylor Brandstetter for reporting the issue and
providing a fix.

MFC after: 3 days

8 years agohyperv/vmbus: Save MNF trigger location instead of MNF trigger index.
Sepherosa Ziehau [Wed, 20 Jul 2016 06:12:32 +0000 (06:12 +0000)]
hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7246

8 years agohyperv/vmbus: Hide channel struct definition.
Sepherosa Ziehau [Wed, 20 Jul 2016 06:00:27 +0000 (06:00 +0000)]
hyperv/vmbus: Hide channel struct definition.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7245

8 years agohyperv/vmbus: Deprecate the device private data in channel struct
Sepherosa Ziehau [Wed, 20 Jul 2016 05:48:52 +0000 (05:48 +0000)]
hyperv/vmbus: Deprecate the device private data in channel struct

They are neither flexible nor extensible.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7244

8 years agohyperv/vmbus: Pass channel as the first argument for channel callback
Sepherosa Ziehau [Wed, 20 Jul 2016 05:34:28 +0000 (05:34 +0000)]
hyperv/vmbus: Pass channel as the first argument for channel callback

The prepares to kill device private fields in channel struct, which
are not flexible and extensible.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7243

8 years agohyperv/vmbus: Channel struct field rename
Sepherosa Ziehau [Wed, 20 Jul 2016 05:26:04 +0000 (05:26 +0000)]
hyperv/vmbus: Channel struct field rename

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7242

8 years agohyperv/vmbus: Move IC register definition to Hyper-V utilities
Sepherosa Ziehau [Wed, 20 Jul 2016 05:16:23 +0000 (05:16 +0000)]
hyperv/vmbus: Move IC register definition to Hyper-V utilities

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7241

8 years agohyperv/vmbus: Get rid of unnecessary definition.
Sepherosa Ziehau [Wed, 20 Jul 2016 05:03:04 +0000 (05:03 +0000)]
hyperv/vmbus: Get rid of unnecessary definition.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7240

8 years agoAdd myself (stevek) as a src committer and mentor (sjg) to committers-src.dot
Stephen J. Kiernan [Wed, 20 Jul 2016 04:25:09 +0000 (04:25 +0000)]
Add myself (stevek) as a src committer and mentor (sjg) to committers-src.dot

Approved by: sjg (mentor)

8 years agoMFV r298167, r300962, r303048:
Pedro F. Giffuni [Wed, 20 Jul 2016 03:52:04 +0000 (03:52 +0000)]
MFV r298167, r300962, r303048:
openresolv: update to version 3.8.1.

Among the new features it attempts to support alternative init systems.

MFC after: 1 month

8 years agolibunwind: Properly align _Unwind_Exception.
Ed Maste [Wed, 20 Jul 2016 03:13:02 +0000 (03:13 +0000)]
libunwind: Properly align _Unwind_Exception.

_Unwind_Exception is required to be double word aligned.  GCC has
interpreted this to mean "use the maximum useful alignment for the
target" so follow that lead.

Obtained from: LLVM review D22543

8 years agoRelease the second critical section in uma_zfree_arg() slightly earlier.
Mark Johnston [Wed, 20 Jul 2016 01:01:50 +0000 (01:01 +0000)]
Release the second critical section in uma_zfree_arg() slightly earlier.

It is only needed when removing a full bucket from the per-CPU cache. The
bucket cache (uz_buckets) is protected by the zone mutex and thus the
critical section can be released before inserting into that list.

MFC after: 1 week

8 years agoMake vm_pageout_wakeup_thresh a u_int rather than an int.
Mark Johnston [Wed, 20 Jul 2016 00:09:22 +0000 (00:09 +0000)]
Make vm_pageout_wakeup_thresh a u_int rather than an int.

It's a threshold for v_free_count, which is of type u_int. This also lets
us get rid of a cast in vm_paging_needed().

Reviewed by: alc
MFC after: 1 week

8 years agoOnly build makewhatis(1)/apropos(1) with MAN_UTILS.
Bryan Drewery [Wed, 20 Jul 2016 00:06:03 +0000 (00:06 +0000)]
Only build makewhatis(1)/apropos(1) with MAN_UTILS.

This is what src.conf(5) documents and is what the older non-mandoc
versions respected.

Sponsored by: EMC / Isilon Storage Division

8 years agoMerge {amd64,i386}/instr_size.c into x86_instr_size.c.
Mark Johnston [Wed, 20 Jul 2016 00:02:10 +0000 (00:02 +0000)]
Merge {amd64,i386}/instr_size.c into x86_instr_size.c.

Also reduce the diff between us and upstream: the input data model will
always be DATAMODEL_NATIVE because of a bug (p_model is never set but is
always initialized to 0), so we don't need to override the caller anyway.
This change is also necessary to support the pid provider for 32-bit
processes on amd64.

MFC after: 2 weeks

8 years agoImport openresolv 3.8.1
Pedro F. Giffuni [Tue, 19 Jul 2016 23:22:06 +0000 (23:22 +0000)]
Import openresolv 3.8.1

Obtained from: http://roy.marples.name/projects/openresolv

8 years agosed(1): Assorted cleanups and simplifications.
Pedro F. Giffuni [Tue, 19 Jul 2016 22:56:40 +0000 (22:56 +0000)]
sed(1): Assorted cleanups and simplifications.

Const-ify several variables, make it build cleanly with WARNS level 5.

Submitted by: mi
PR: 195929
MFC after: 1 month

8 years agolibc: tag the Rune initialization function prototypes visibility as hidden.
Pedro F. Giffuni [Tue, 19 Jul 2016 20:22:13 +0000 (20:22 +0000)]
libc: tag the Rune initialization function prototypes visibility as hidden.

It is good practice to export as few symbols as possible from your shared
libraries, so use the GCC visibility attribute in this case, matching what
Apple's libc does.

Reference:
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html

Hinted by: Apple's libc 1082.20.4
MFC after: 1 week

8 years agoarch.7: correct MIPS endianness transcription error
Ed Maste [Tue, 19 Jul 2016 20:11:50 +0000 (20:11 +0000)]
arch.7: correct MIPS endianness transcription error

Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>

8 years agoarch.7: we also use 1M page mappings on armv6
Ed Maste [Tue, 19 Jul 2016 19:50:30 +0000 (19:50 +0000)]
arch.7: we also use 1M page mappings on armv6

Submitted by: alc

8 years agoIncrease vt(4) framebuffer maximum size
Conrad Meyer [Tue, 19 Jul 2016 19:20:47 +0000 (19:20 +0000)]
Increase vt(4) framebuffer maximum size

And rename "DEFAULT" constants to the more accurate "MAX."

PR: 210382
Submitted by: Felix <felixphew0 at gmail.com>
Reviewed by: wblock, cem
Tested by: Dave Cottlehuber <dch at skunkwerks.at>

8 years agoRemove unused variable from last commit.
Scott Long [Tue, 19 Jul 2016 19:19:03 +0000 (19:19 +0000)]
Remove unused variable from last commit.

8 years agoerwin stepped down from portmgr, update the graph.
Rene Ladan [Tue, 19 Jul 2016 19:13:01 +0000 (19:13 +0000)]
erwin stepped down from portmgr, update the graph.

8 years agoSupporting flushing the dump before returning, and simplify/combine the
Scott Long [Tue, 19 Jul 2016 19:09:23 +0000 (19:09 +0000)]
Supporting flushing the dump before returning, and simplify/combine the
logic.  Switch to a 5us delay since most NVME devices can easily do 200,000
iops.

Submitted by: imp
MFC after: 3 days
Sponsored by: Netflix, Inc.

8 years agoDo not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console.
Emmanuel Vadot [Tue, 19 Jul 2016 19:00:22 +0000 (19:00 +0000)]
Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console.

Reviewed by: andrew, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6783

8 years agomakefs: sync NetBSD IDs with upstream for changes that we already have
Ed Maste [Tue, 19 Jul 2016 18:40:54 +0000 (18:40 +0000)]
makefs: sync NetBSD IDs with upstream for changes that we already have

May 22 21:51:39 2011 +0000 (christos):

    From Nathan Whitehorn (nwhitehorn at freebsd dot org):
    Add code to generate bootable ISOs on Powermac and CHRP systems.
    Synthesize some partition maps (APM and MBR, respectively) pointing
    to (a) the whole disk, and (b) relevant El Torito boot images that
    have been added by other code. These partition maps are a little
    bit funny looking, but they seem to work. FreeBSD has been using
    this successfully in their release generation on powerpc, as well
    as generating all non-SPARC install media. SPARC support could
    probably be added as an extension of this patch.

makefs.8 1.33

Tue Aug 23 17:09:11 2011 +0000 (christos):

    PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2
    filenames (buffer overflow)

    makefs does not properly verify the maximum filename length in the
    special "." case for both ISO level 1 and ISO level 2 filename
    conversion.  This creates broken images or causes a buffer overflow
    (ISO level 2).

    ISO level 1:
    If a filename contains only dots or up to 8 characters followed by
    dots the 8+3 limit check doesn't work.

    ISO level 2:
    If a filename contains a dot in the first 30 characters and a dot
    on the 30th character, the length limit check doesn't work and the
    buffer is overflowed.

    $ mkdir level1
    $ touch level1/12345............
    $ makefs -t cd9660 -o isolevel=1 test.iso level1

    $ mkdir level2
    $ touch level2/1234567890.2345678901234567.....34567890123456789012345
    $ makefs -t cd9660 -o isolevel=2 test.iso level2

cd9660.c 1.32

Sun Oct 9 21:33:43 2011 +0000 (christos):

    add support for setting the ufs label. (Nathan Whitehorn)

ffs.c 1.45
ffs.h 1.2
mkfs.c 1.22
makefs.8 1.37

Obtained from: NetBSD

8 years agoThis reverts out Gleb's changes and adds three small
Randall Stewart [Tue, 19 Jul 2016 18:31:19 +0000 (18:31 +0000)]
This reverts out Gleb's changes and adds three small
fixes that I think closes up the races Gleb was
looking for. This is running quite nicely in Netflix and
now no longer causes TCP-tcb leaks.

Differential Revision: 7135

8 years agomakefs: reorder 'usage' alphabetically
Ed Maste [Tue, 19 Jul 2016 18:15:22 +0000 (18:15 +0000)]
makefs: reorder 'usage' alphabetically

From NetBSD, Mon Aug 15 14:45:01 2011 +0000 (wiz)

    Re-order `usage' alphabetically;
    rename option arguments in the manpage's `SYNOPSIS' section to
    match those from `usage' (not the other way around; the `usage'-line
    (and other parts of makefs.c) contain the correct names);
    minor punctuation improvements.

    From Snader_LB.

makefs.8 1.36
makefs.c 1.30

Obtained from: NetBSD

8 years agoRandom bit generator (RBG) driver for RPi and RPi2.
Mark Murray [Tue, 19 Jul 2016 18:07:47 +0000 (18:07 +0000)]
Random bit generator (RBG) driver for RPi and RPi2.

Summary:
This driver supports the following methods to trigger gathering random bits from the hardware:
1. interrupt when the FIFO is full (default) fed into the harvest queue
2. callout (when BCM2835_RNG_USE_CALLOUT is defined) every second if hz is less than 100, otherwise hz / 100, feeding the random bits into the harvest queue

If the kernel is booted with verbose enabled, the contents of the registers will be dumped after the RBG is started during the attach routine.

Author: hackagadget_gmail.com (Stephen J. Kiernan)

Test Plan: Built RPI2 kernel and booted on board. Tested the different methods to feed the harvest queue (callout, interrupt) and the interrupt driven approach seems best. However, keeping the other method for people to be able to experiment with.

Reviewed By: adrian, delphij, markm

Differential Revision: https://reviews.freebsd.org/D6888

8 years agoInclude makewhatis in ITOOLS when MK_MAN_UTILS is true
Ed Maste [Tue, 19 Jul 2016 18:05:25 +0000 (18:05 +0000)]
Include makewhatis in ITOOLS when MK_MAN_UTILS is true

Previously it was conditional on MK_MAN. It's possible to build
FreeBSD with man pages but without man page tools. MK_MAN_UTILS
is the conditional used in share/man/Makefile for determining whether
makewhatis is executed at install time, so it is the proper one for
ITOOLS as well.

PR: 210142
MFC after: 1 week

8 years agoadd an arch.7 man page with architecture-specific details
Ed Maste [Tue, 19 Jul 2016 17:46:09 +0000 (17:46 +0000)]
add an arch.7 man page with architecture-specific details

Based on details collected on the wiki, at
https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics
Further details to be added over time.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7096

8 years agoFixup DA cable detection routines to not set the cable type to
Sean Bruno [Tue, 19 Jul 2016 17:31:48 +0000 (17:31 +0000)]
Fixup DA cable detection routines to not set the cable type to
unknown if they do not match one of two cable types.

PR: 150249
Submitted by: borjam@sarenet.es
Reviewed by: erj
MFC after: 3 days

8 years agoclang++: Always use --eh-frame-hdr on FreeBSD, even for -static
Ed Maste [Tue, 19 Jul 2016 17:15:07 +0000 (17:15 +0000)]
clang++: Always use --eh-frame-hdr on FreeBSD, even for -static

FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and we expect to
use it more widely in the future) and it requires the EH frame segment
in static binaries.

Reviewed by: dim
Obtained from: Clang commit r266123
MFC after: 3 days
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7250

8 years agoFix the previous commit to the family tree file. It is too early
Glen Barber [Tue, 19 Jul 2016 16:55:16 +0000 (16:55 +0000)]
Fix the previous commit to the family tree file.  It is too early
to list 11.0, and we do not list -CURRENT here.

Submitted by: maxim
Sponsored by: The FreeBSD Foundation

8 years agoBelatedly add FreeBSD 11.0 and 12.0 to the family tree file.
Glen Barber [Tue, 19 Jul 2016 16:34:49 +0000 (16:34 +0000)]
Belatedly add FreeBSD 11.0 and 12.0 to the family tree file.

Submitted by: des (a while back)
Sponsored by: The FreeBSD Foundation

8 years agoAdd missing flags from acpidump. These are defined in the header, but not
Andrew Turner [Tue, 19 Jul 2016 16:02:07 +0000 (16:02 +0000)]
Add missing flags from acpidump. These are defined in the header, but not
printed. The HW_REDUCED flag is useful as it should be set on arm64 to
comply with the ARM Server Base Boot Requirements.

Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoUse correct order of conditions to avoid NULL deref.
Michael Tuexen [Tue, 19 Jul 2016 11:16:44 +0000 (11:16 +0000)]
Use correct order of conditions to avoid NULL deref.

MFC after: 3 days
X-MFC with: r302935

8 years agonetstat and sockstat expect the IPv6 link local addresses to
Michael Tuexen [Tue, 19 Jul 2016 09:48:08 +0000 (09:48 +0000)]
netstat and sockstat expect the IPv6 link local addresses to
have an embedded scope. So don't recover.

MFC after: 3 days

8 years agohyperv/vmbus: Rename laundered vmbus channel code
Sepherosa Ziehau [Tue, 19 Jul 2016 07:51:22 +0000 (07:51 +0000)]
hyperv/vmbus: Rename laundered vmbus channel code

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7232

8 years agohyperv/vmbus: Temp/internal variable/function rename
Sepherosa Ziehau [Tue, 19 Jul 2016 06:04:44 +0000 (06:04 +0000)]
hyperv/vmbus: Temp/internal variable/function rename

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7231

8 years agohyperv/vmbus: Function rename
Sepherosa Ziehau [Tue, 19 Jul 2016 05:57:19 +0000 (05:57 +0000)]
hyperv/vmbus: Function rename

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7230

8 years agohyperv/vmbus: Cleanup cpu based channel selection.
Sepherosa Ziehau [Tue, 19 Jul 2016 05:46:15 +0000 (05:46 +0000)]
hyperv/vmbus: Cleanup cpu based channel selection.

And create cpu to channel map at device attach time for storvsc(4).

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7229

8 years agoUse g_resize_provider() to change the size of GEOM_DISK provider,
Andrey V. Elsukov [Tue, 19 Jul 2016 05:36:21 +0000 (05:36 +0000)]
Use g_resize_provider() to change the size of GEOM_DISK provider,
when it is being opened. This should fix the possible loss of a resize
event when disk capacity changed.

PR: 211028
Reported by: Dexuan Cui <decui at microsoft dot com>
MFC after: 3 weeks

8 years agoAdd named dynamic states support to ipfw(4).
Andrey V. Elsukov [Tue, 19 Jul 2016 04:56:59 +0000 (04:56 +0000)]
Add named dynamic states support to ipfw(4).

The keep-state, limit and check-state now will have additional argument
flowname. This flowname will be assigned to dynamic rule by keep-state
or limit opcode. And then can be matched by check-state opcode or
O_PROBE_STATE internal opcode. To reduce possible breakage and to maximize
compatibility with old rulesets default flowname introduced.
It will be assigned to the rules when user has omitted state name in
keep-state and check-state opcodes. Also if name is ambiguous (can be
evaluated as rule opcode) it will be replaced to default.

Reviewed by: julian
Obtained from: Yandex LLC
MFC after: 1 month
Relnotes: yes
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D6674

8 years agoImplement crashdump support on NVME
Scott Long [Tue, 19 Jul 2016 03:13:51 +0000 (03:13 +0000)]
Implement crashdump support on NVME

MFC after: 3 days
Sponsored by: Netflix, Inc.

8 years agollvm-libunwind: use conventional (non-Darwin) X86 register numbers
Ed Maste [Tue, 19 Jul 2016 00:47:00 +0000 (00:47 +0000)]
llvm-libunwind: use conventional (non-Darwin) X86 register numbers

For historical reasons Darwin/i386 has ebp and esp swapped in the
eh_frame register numbering.  That is:

             Darwin      Other
    Reg #    eh_frame    eh_frame    DWARF
    =====    ========    ========    =====
      4        ebp         esp        esp
      5        esp         ebp        ebp

Although the UNW_X86_* constants are not supposed to be coupled to
DWARF / eh_frame numbering they are currently conflated in LLVM
libunwind, and thus we require the non-Darwin numbering.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years ago[ath] don't do LDPC, STBC or short-gi for locationing frames.
Adrian Chadd [Tue, 19 Jul 2016 00:27:17 +0000 (00:27 +0000)]
[ath] don't do LDPC, STBC or short-gi for locationing frames.

The 11n duration calculation function in net80211 and the HAL round /up/
the duration calculation for short-gi, so we can't use that.

The 11n duration calculation doesn't know about the extra symbol time
needed for STBC, nor the LDPC encoding duration, so we can't use
that.

This (along with other, local hacks) allow the locationing services to
get down to around 200nS (yes, nanoseconds) of variance when speaking
to a "good" AP.

Tested:

* AR9380, STA mode, local locationing frame hacks

8 years ago1) Don't protect \/ and \. even if user say so. They are not special chars
Andrey A. Chernov [Tue, 19 Jul 2016 00:25:27 +0000 (00:25 +0000)]
1) Don't protect \/ and \. even if user say so. They are not special chars
in any case and needed for further processing. For ~ expansion too.

2) Don't terminate *pathend with / when GLOB_LIMIT_STAT is reached, it will
be not visible outside in any case since error is returned.

3) Cosmetic: change if expression to better reflect its semantic.

8 years agog_Ctoc() conversion buffers are smaller than needed up to MB_CUR_MAX - 1
Andrey A. Chernov [Mon, 18 Jul 2016 20:24:13 +0000 (20:24 +0000)]
g_Ctoc() conversion buffers are smaller than needed up to MB_CUR_MAX - 1
since whole conversion needs a room for (len >= MB_CUR_MAX). It is no
difference when MB_CUR_MAX == 1, but for multi-byte locales last few chars
('\0' and before) may need just one byte, and the rest of MB_CUR_MAX - 1
space becomes unavailable in the MAXPATHLEN-sized buffer, which cause
conversion error on near MAXPATHLEN long pathes.

Increase g_Ctoc() conversion buffers to MB_LEN_MAX - 1.

8 years agoAdd ipfw_nptv6 module that implements Network Prefix Translation for IPv6
Andrey V. Elsukov [Mon, 18 Jul 2016 19:46:31 +0000 (19:46 +0000)]
Add ipfw_nptv6 module that implements Network Prefix Translation for IPv6
as defined in RFC 6296. The module works together with ipfw(4) and
implemented as its external action module. When it is loaded, it registers
as eaction and can be used in rules. The usage pattern is similar to
ipfw_nat(4). All matched by rule traffic goes to the NPT module.

Reviewed by: hrs
Obtained from: Yandex LLC
MFC after: 1 month
Relnotes: yes
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D6420

8 years agoChange patch from r303004 case 3. According to POSIX gl_errfunc should be
Andrey A. Chernov [Mon, 18 Jul 2016 19:20:49 +0000 (19:20 +0000)]
Change patch from r303004 case 3. According to POSIX gl_errfunc should be
called first, then GLOB_ERR should be considered.

8 years ago1) Add all characters from ~ expansion as protected to be not interpreted
Andrey A. Chernov [Mon, 18 Jul 2016 18:24:31 +0000 (18:24 +0000)]
1) Add all characters from ~ expansion as protected to be not interpreted
as pattern meta chars.

2) 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).

3) Remove the hack in the manpage describing how to skip ENOENT and ENOTDIR
in gl_errfunc, it is unneeded now.

4) Set errno to ENAMETOOLONG if g_Ctoc() expansion fails in g_opendir(),
as in other places in the code which are wrappers around system functions.