]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFC 321762
sephe [Mon, 7 Aug 2017 02:15:13 +0000 (02:15 +0000)]
MFC 321762
    hyperv: Add VF bringup scripts and devd rules.

    How network VF works with hn(4) on Hyper-V in non-transparent mode:

    - Each network VF has a cooresponding hn(4).
    - The network VF and the it's cooresponding hn(4) have the same hardware
      address.
    - Once the network VF is up, e.g. ifconfig VF up:
      o  All of the transmission should go through the network VF.
      o  Most of the reception goes through the network VF.
      o  Small amount of reception may go through the cooresponding hn(4).
         This reception will happen, even if the the cooresponding hn(4) is
         down.  The cooresponding hn(4) will change the reception interface
         to the network VF, so that network layer and application layer will
         be tricked into thinking that these packets were received by the
         network VF.
      o  The cooresponding hn(4) pretends the physical link is down.
    - Once the network VF is down or detached:
      o  All of the transmission should go through the cooresponding hn(4).
      o  All of the reception goes through the cooresponding hn(4).
      o  The cooresponding hn(4) fallbacks to the original physical link
         detection logic.

    All these features are mainly used to help live migration, during which
    the network VF will be detached, while the network communication to the
    VM must not be cut off.  In order to reach this level of live migration
    transparency, we use failover mode lagg(4) with the network VF and the
    cooresponding hn(4) attached to it.

    To ease user configuration for both network VF and non-network VF, the
    lagg(4) will be created by the following rules, and the configuration
    of the cooresponding hn(4) will be applied to the lagg(4) automatically.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11635

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

6 years agoMFC: r321589
marius [Sun, 6 Aug 2017 16:12:56 +0000 (16:12 +0000)]
MFC: r321589

- Check the slot type capability, set SDHCI_SLOT_{EMBEDDED,NON_REMOVABLE}
  for embedded slots. Fail in the sdhci(4) initialization for slot type
  shared, which is completely unsupported by this driver at the moment. [1]
  For Intel eMMC controllers, taking the embedded slot type into account
  obsoltes setting SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE so remove these quirk
  entries.
- Hide the 1.8 V VDD capability when the slot is detected as non-embedded,
  as the SDHCI specification explicitly states that 1.8 V VDD is applicable
  to embedded slots only. [2]
- Define some easy bits of the SDHCI specification v4.20. [3]
- Don't leak bus_dma(9) resources in failure paths of sdhci_init_slot().

Obtained from: DragonFlyBSD 65704a46 [1], 7ba10b88 [2], 0df14648 [3]

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

6 years agoMFC: r319350, r320620, r321385, r321490, r321588, r321948
marius [Sun, 6 Aug 2017 16:07:34 +0000 (16:07 +0000)]
MFC: r319350, r320620, r321385, r321490, r321588, r321948

o Use SDHCI_CAN_DRIVE_TYPE_{A,C,D} to check for driver type support in
  SDHCI_CAPABILITIES2 instead of SDHCI_CTRL2_DRIVER_TYPE_{A,C,D} which
  are meant for setting the driver type in SDHCI_HOST_CONTROL2.

o Correct a typo in the comment part of r320577 (MFCed to stable/10 in
  r320899).

o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to
  sdhci(4), mmc(4) and mmcsd(4).

  On the system where the addition of DDR52 support increased the read
  throughput to ~80 MB/s (from ~45 MB/s at high speed), HS200 yields
  ~154 MB/s and HS400 ~187 MB/s, i. e. performance now has more than
  quadrupled compared to pre-r315598 (pre-r318495 in stable/10).

  However, in fact this isn't a feature-only change; there are boards
  based on Intel Bay Trail where DDR52 is problematic and the suggested
  workaround is to use HS200 mode instead. So far exact details are
  unknown, however, i. e. whether that's due to a defect in these SoCs
  or on the boards.

  Moreover, due to the above changes requiring to be aware of possible
  MMC siblings in the fast path of mmc(4), corresponding information
  now is cached in mmc_softc. As a side-effect, mmc_calculate_clock(),
  now longer will trigger a panic in low memory situations and all of
  mmc(4) operate on the same set of child devices.

o Fix a bug in the failure reporting of mmcsd_delete() that could lead
  to a panic.

o Fix 2 bugs on resume, one in mmcsd(4) that could lead to a panic and
  another one in mmc(4) that could lead to devices no longer working.

o Fix a memory leak in mmcsd_ioctl() in case copyin(9) fails. [1]

o Fix missing variable initialization in mmc_switch_status(). [2]

o Fix R1_SWITCH_ERROR detection in mmc_switch_status(). [3]

o Handle the case of device_add_child(9) failing, for example due to
  a memory shortage, gracefully in mmc(4) and sdhci(4), including not
  leaking memory for the instance variables in case of mmc(4), also
  fixing [4].

o Correctly use the size of a pointer rather than that of a pointer to
  a pointer (this bug was present in head r321385 only, i. e. not in a
  stable branch). [5]

o Handle the case of an unknown SD CSD version in mmc_decode_csd_sd()
  gracefully instead of calling panic(9).

o Again, check and handle the return values of some additional function
  calls in mmc(4) instead of assuming that everything went right or mark
  non-fatal errors by casting the return value to void.

o Correct a typo in the Linux IOCTL compatibility; it should have been
  MMC_IOC_MULTI_CMD rather than MMC_IOC_CMD_MULTI.

o Now that we are reaching ever faster speeds (more improvement in this
  regard is to be expected when adding ADMA support to sdhci(4)), apply
  a few micro-optimizations to mmc(4), mmcsd(4) and sdhci(4).

o Correct confusing and error prone mix-ups between "br" or "bridge" in
  mmc(4) and mmcsd(4) where - according to the terminology outlined in
  comments of bridge.h and mmcbr_if.m around since their addition in
  r163516 - the bus is meant and used instead.

o Remove comment lines from bridge.h incorrectly suggesting that there
  would be a MMC bridge base class driver.

o Update comments in bridge.h regarding the star topology of SD and SDIO;
  since version 3.00 of the SDHCI specification, for eSD and eSDIO bus
  topologies are actually possible in form of so called "shared buses"
  (in some subcontext later on renamed to "embedded" buses).

Reported by: Coverity
CID: 1372612 [1], 1372624 [2], 1372594 [3], 1007069 [4],
1378432 [5]

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

6 years agoMFC r321720, r321856: Attach ichwd(4) only to ISA bus of the LPC bridge.
mav [Sun, 6 Aug 2017 08:15:21 +0000 (08:15 +0000)]
MFC r321720, r321856: Attach ichwd(4) only to ISA bus of the LPC bridge.

Resource allocation for parent device does not look good by itself, but
attempt to allocate them for unrelated device just does not end up good.
On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI
this reported to cause kernel panic on shutdown due to messed resources:
https://bugs.freenas.org/issues/25237.

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

6 years agoMFC r321915:
ngie [Sat, 5 Aug 2017 17:02:53 +0000 (17:02 +0000)]
MFC r321915:

Remove bogus bsd.subdir.mk .include

bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

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

6 years agoRegenerate src.conf(5) per r322100
ngie [Sat, 5 Aug 2017 17:01:00 +0000 (17:01 +0000)]
Regenerate src.conf(5) per r322100

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

6 years agoMFC r320702,r320703:
ngie [Sat, 5 Aug 2017 16:55:07 +0000 (16:55 +0000)]
MFC r320702,r320703:

r320702:

Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

Relnotes:       yes

r320703:

Add tests to help verify Links functionality for .../contrib/tzdata/backwards

MFC with: r320702

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

6 years agoFix a stable/10-specific mismerge in r322096; the MK_NCURSESW handling
marius [Sat, 5 Aug 2017 14:49:40 +0000 (14:49 +0000)]
Fix a stable/10-specific mismerge in r322096; the MK_NCURSESW handling
should be within the MK_DIALOG block as libncurses{,w} isn't required
when building tzsetup(8) without dialog(3) support.

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

6 years agoMFC: r274394, r274399, r307802
marius [Sat, 5 Aug 2017 12:54:07 +0000 (12:54 +0000)]
MFC: r274394, r274399, r307802

- Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
- Hide dialog specific code behind HAVE_DIALOG. It allows to build a
  stripped down version (missing the dialog UI) but perfectly function
  tzsetup when world is built WITHOUT_DIALOG.

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

6 years agoRegenerate src.conf.5 after r322094.
marius [Sat, 5 Aug 2017 12:34:31 +0000 (12:34 +0000)]
Regenerate src.conf.5 after r322094.

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

6 years agoMFC: r306375
marius [Sat, 5 Aug 2017 12:33:00 +0000 (12:33 +0000)]
MFC: r306375

Add a WITHOUT_DIALOG src.conf(5) knob.

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).

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

6 years agoMFC r321685: Fix IORDY bits definition.
mav [Sat, 5 Aug 2017 08:37:38 +0000 (08:37 +0000)]
MFC r321685: Fix IORDY bits definition.

According to the ATA specs, IORDYDIS should be bit 10, IORDY -- bit 11.

PR:             221049
Submitted by:   aaron.styx@baesystems.com

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

6 years agoMFC r321921: Add compat shim part missed at r305197.
mav [Sat, 5 Aug 2017 08:36:04 +0000 (08:36 +0000)]
MFC r321921: Add compat shim part missed at r305197.

This fixes compatibility between old kernel and new ZFS tools.
It seems to be tradition to forget it.

PR: 221112

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

6 years agoMFH r321674:
mm [Fri, 4 Aug 2017 23:34:39 +0000 (23:34 +0000)]
MFH r321674:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #926: ensure ar strtab is null terminated

PR: 220462

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

6 years agoMFC: r290156, r318354
marius [Fri, 4 Aug 2017 21:38:34 +0000 (21:38 +0000)]
MFC: r290156, r318354

pmap_change_attr: Only fixup DMAP for DMAPed ranges

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

6 years agoMFC r321838:
pfg [Fri, 4 Aug 2017 20:24:23 +0000 (20:24 +0000)]
MFC r321838:
sys/net8021: Add missing braces in setcurchan().

Also fix some indentation.

Obtained from: DragonFlyBSD (git c69e37d6)

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

6 years agoMFC r321349:
kib [Fri, 4 Aug 2017 08:27:34 +0000 (08:27 +0000)]
MFC r321349:
Improve publication of the newly allocated snapdata.

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

6 years agoMFC r321348:
kib [Fri, 4 Aug 2017 08:26:19 +0000 (08:26 +0000)]
MFC r321348:
Unlock correct lock in ffs_snapblkfree().

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

6 years agoMFC r321347:
kib [Fri, 4 Aug 2017 08:25:03 +0000 (08:25 +0000)]
MFC r321347:
Account for lock recursion when transfering snaplock to the vnode lock
in ffs_snapremove().

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

6 years agoMFC r321605:
cy [Thu, 3 Aug 2017 14:22:48 +0000 (14:22 +0000)]
MFC r321605:

As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.
(This implementation of arc4rand(9) is used by the userland ipftest
utility as it approximates ipfilter kernelspace in userspace.)

PR: 217920
Submitted by: codarren@hackers.mu
Reviewed by: emaste, cem
Approved by: so (implicit, in r315225)
Differential Revision: D11747
Patterned after: r315225

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

6 years agoMFC r312983:
hselasky [Thu, 3 Aug 2017 14:20:19 +0000 (14:20 +0000)]
MFC r312983:
Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
structure. This fixes compilation with amd64-xtoolchain-gcc.

PR: 216588
Sponsored by: Mellanox Technologies

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

6 years agoMFC r312876:
hselasky [Thu, 3 Aug 2017 14:17:25 +0000 (14:17 +0000)]
MFC r312876:
Use ffs() to scan for first bit instead of using a for() loop.
Minor code refactor while at it.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312872:
hselasky [Thu, 3 Aug 2017 14:14:13 +0000 (14:14 +0000)]
MFC r312872:
Add support for reading advanced diagnostic counters.

By default reading the diagnostic counters is disabled. The firmware
decides which counters are supported and only those supported show up
in the dev.mce.X.diagnostics sysctl tree.

To enable reading of diagnostic counters set one or more of the
following sysctls to one:

dev.mce.X.conf.diag_general_enable=1
dev.mce.X.conf.diag_pci_enable=1

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312865:
hselasky [Thu, 3 Aug 2017 14:09:36 +0000 (14:09 +0000)]
MFC r312865:
Enforce reading the consumer and producer counters once to ensure
consistent return values from the mlx5e_sq_has_room_for()
function. The two counters are incremented by different threads under
different locks.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312537:
hselasky [Thu, 3 Aug 2017 14:07:14 +0000 (14:07 +0000)]
MFC r312537:
Remove superfluous return statement.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312536:
hselasky [Thu, 3 Aug 2017 14:05:03 +0000 (14:05 +0000)]
MFC r312536:
Allow transmit packet bufring in software to be disabled.

- Add new sysctl node to control the transmit packet bufring.

- Add optimised version of the transmit routine which output packets
directly to the DMA ring instead of using bufring in case the transmit
lock is congested. This can reduce the number of taskswitches which in
turn influence the overall system CPU usage, depending on the
workload.

- Add " TX" suffix to debug name for transmit mutexes to silence some
witness warnings about aquiring duplicate locks having same name.

Sponsored by: Mellanox Technologies
Suggested by: gallatin @

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

6 years agoMFC r312528:
hselasky [Thu, 3 Aug 2017 14:01:25 +0000 (14:01 +0000)]
MFC r312528:
Make draining a sendqueue more robust.

Add own state variable to track if a sendqueue is stopped or not.
This will prevent traffic from entering the sendqueue while it is
being destroyed.

Update drain function to wait for traffic to be transmitted before
returning when the link state is active.

Add extra checks in transmit path for stopped SQ's.

While at it:
- Use likely() for a mbuf pointer check.
- Remove redundant IFF_DRV_RUNNING check.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312527:
hselasky [Thu, 3 Aug 2017 13:57:17 +0000 (13:57 +0000)]
MFC r312527:
Add runtime support for modifying the SQ and RQ completion event
moderation mode. The presence of this feature is indicated through the
firmware capabilities.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312526:
hselasky [Thu, 3 Aug 2017 13:52:39 +0000 (13:52 +0000)]
MFC r312526:
Update firmware interface structures and definitions adding support
for new features and commands.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321722:
hselasky [Thu, 3 Aug 2017 07:56:39 +0000 (07:56 +0000)]
MFC r321722:
Properly range check length of parsed information elements in RSU driver.

Found by: Ilja van Sprundel <ivansprundel@ioactive.com>
Sponsored by: Mellanox Technologies

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

6 years agoMFC bmake-20170720
sjg [Thu, 3 Aug 2017 01:40:05 +0000 (01:40 +0000)]
MFC bmake-20170720

PR: 221023

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

6 years agoApply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that
marius [Wed, 2 Aug 2017 20:27:30 +0000 (20:27 +0000)]
Apply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that
somehow stayed local when committing r318198, probably due to the
associated tree conflicts.

While at it, register the dependency of sdhci_fsl(4) on sdhci(4) and
allow the former to be built.

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

6 years agoMFC r321622, r321623:
ken [Wed, 2 Aug 2017 20:24:28 +0000 (20:24 +0000)]
MFC r321622, r321623:

  ------------------------------------------------------------------------
  r321622 | ken | 2017-07-27 09:33:57 -0600 (Thu, 27 Jul 2017) | 44 lines

  Fix probing FC targets with hard addressing turned on.

  This largely reverts FreeBSD SVN change 289937 from October 25th, 2015.

  The intent of that change was to keep loop IDs persistent across
  chip reinits.

  The problem is that the change turned on the PREVLOOP /
  PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the
  Qlogic chip to not participate in the loop if it can't get the
  requested loop address.  It also turned off soft addressing on 2400
  (4Gb) and newer controllers.

  The isp(4) driver defaults to loop address 0, and the tape drives
  I have tested default to loop address 0 if hard addressing is turned
  on.  So when hard loop addressing is turned on on the drive, the isp(4)
  driver just refuses to participate in the loop.

  The solution is to largely revert that change.  I left some elements
  in place that are related to virtual ports, since they were new.

  This does work with IBM tape drives with hard and soft addressing
  turned on.  I have tested it with 4Gb, 8Gb, and 16Gb controllers.

  sys/dev/isp.c:
   Largely revert FreeBSD SVN change 289937.  I left the
   ispmbox.h changes in place.

   Don't use the PREV_ADDRESS bit on initialization.  It tells
   the chip to not participate if it can't get the requested
   loop ID.

   Do use soft addressing on 2400 and newer chips.

   Use hard addressing when the user has requested a specific
   initiator ID.  (hint.isp.X.iid=N in /boot/loader.conf)

   Leave some of the virtual port options from that change in
   place, but don't turn on the PREV_ADDRESS bit.

  Reviewed by: mav
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r321623 | ken | 2017-07-27 09:51:56 -0600 (Thu, 27 Jul 2017) | 6 lines

  Remove duplicate assignments from r321622.

  Submitted by: mav
  Sponsored by: Spectra Logic

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

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

6 years agoMerge r316113,316184,316413 from head:
gavin [Wed, 2 Aug 2017 15:13:13 +0000 (15:13 +0000)]
Merge r316113,316184,316413 from head:
 - Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091
 - Switch device_probe() from large case statement to a lookup table
 - Add several missing SMBus controllers

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

6 years agoMFC r320761:
delphij [Wed, 2 Aug 2017 05:47:26 +0000 (05:47 +0000)]
MFC r320761:

 - Use strlcat() instead of strncat().
 - Use asprintf() and handle allocation errors.

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

6 years agoMFC r321713:
delphij [Wed, 2 Aug 2017 05:17:47 +0000 (05:17 +0000)]
MFC r321713:

Bump copyright year.

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

6 years agoMFC: r281733, r298033, r301131
marius [Tue, 1 Aug 2017 21:41:14 +0000 (21:41 +0000)]
MFC: r281733, r298033, r301131

- Remove set but unused variable.
- Use NULL instead of 0 for pointers.
- Fix tzsetup not installing /etc/localtime for UTC.

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

6 years agoMFC r320807:
asomers [Tue, 1 Aug 2017 16:48:33 +0000 (16:48 +0000)]
MFC r320807:

stdbuf(1): Add buffer definition "B" to the usage message

This option has been missing from the usage message ever since the program
was first imported.

Submitted by: shivansh
Reviewed by: asomers
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11529

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

6 years agoMFC r320737, r320914
asomers [Tue, 1 Aug 2017 16:00:21 +0000 (16:00 +0000)]
MFC r320737, r320914

r320737:
Fix cleanup in lib/libc/gen/setdomainname_test

ATF cleanup routines run in separate processes from the tests themselves, so
they can't share global variables.

Also, setdomainname_test needs to be is_exclusive because the test cases
access a global resource.

PR: 219967
Reviewed by: ngie
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11188

r320914:
Remove an extraneous strlen from t_setdomainname.c

Reported by: Coverity
CID: 1377568
X-MFC-With: 320737
Sponsored by: Spectra Logic Corp

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

6 years agoMFC r320359:
trasz [Tue, 1 Aug 2017 15:51:16 +0000 (15:51 +0000)]
MFC r320359:

Add vfs.nfsd.nfsd_enable_uidtostring, which works just like
vfs.nfsd.nfsd_enable_stringtouid, but in reverse - when set to 1,
it forces the NFSv4 server to return numeric UIDs and GIDs instead
of "user@domain" strings. This helps with clients that can't
translate returned identifiers, eg when rerooting.

The same can be achieved by just never running nfsuserd(8),
but the sysctl is useful to toggle the behaviour back and forth
without rebooting.

MFC r320409:

Revert part of r320359, as suggested by rmacklem@.  That case is only used
for nfsuserd -manage-gids and shouldn't depend on sysctl.

MFC r321196:

Rename vfs.nfsd.enable_uidtostring to vfs.nfs.enable_uidtostring.
It applies to both NFS client and NFS server, and is useful for both.
This is different from vfs.nfsd.enable_stringtouid, which is specific
to server side.

Sponsored by: DARPA, AFRL

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

6 years agoMFC r320941: Fix GRE over IPv6 tunnels with IPFW
philip [Tue, 1 Aug 2017 13:15:30 +0000 (13:15 +0000)]
MFC r320941: Fix GRE over IPv6 tunnels with IPFW

Previously, GRE packets in IPv6 tunnels would be dropped by IPFW (unless
net.inet6.ip6.fw.deny_unknown_exthdrs was unset).

PR:           220640
Submitted by: Kun Xie <kxie@xiplink.com>

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

6 years agoMFC r320990, r321011:
pfg [Tue, 1 Aug 2017 01:25:18 +0000 (01:25 +0000)]
MFC r320990, r321011:

libthr: Avoid checking for negative values in usigned count.

Check for overflow instead.

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

6 years agoMFC r320269:
asomers [Mon, 31 Jul 2017 23:03:10 +0000 (23:03 +0000)]
MFC r320269:

style fixes in bin/echo/tests

Submitted by: shivansh
Reviewed by: asomers
X-MFC-With: 319626
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11318

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

6 years agoClarify usage of aio(4) with kqueue(2)
asomers [Mon, 31 Jul 2017 22:36:03 +0000 (22:36 +0000)]
Clarify usage of aio(4) with kqueue(2)

Reviewed by: jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D11299

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

6 years agoMFC r320165-r320166
asomers [Mon, 31 Jul 2017 22:28:33 +0000 (22:28 +0000)]
MFC r320165-r320166

r320165:
devd(8): Remove pidfile on shutdown

Sponsored by: Spectra Logic Corp

r320166:
Require devd to be running for its ATF tests to run

The ATF tests communicate with the system's running devd

PR: 220169
Reported by: gjb
Sponsored by: Spectra Logic Corp

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

6 years agoUpdate stable/10 from 10.3-STABLE to 10.4-PRERELEASE as part of
marius [Mon, 31 Jul 2017 22:19:39 +0000 (22:19 +0000)]
Update stable/10 from 10.3-STABLE to 10.4-PRERELEASE as part of
the 10.4 release cycle, also belatedly marking the official start
of the code slush.

Set the default mdoc(7) version to 10.4, and update the clang(1)
TARGET_TRIPLE to reflect 10.4. While at it, add missing FreeBSD
major versions to mdoc(7).

Approved by: re (implicit)

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

6 years agoMFC r320163:
asomers [Mon, 31 Jul 2017 21:52:08 +0000 (21:52 +0000)]
MFC r320163:

Fix usr.sbin/makefs/makefs_ffs_tests when /etc/fstab does not exist

dumpfs prints a harmless warning message (via ufs_disk_fillout(3) and
getfsfile(3)), when /etc/fstab does not exist.  We can ignore it.

PR: 220165
Reported by: gjb
Sponsored by: Spectra Logic Corp

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

6 years agoMFC r319854:
asomers [Mon, 31 Jul 2017 21:42:18 +0000 (21:42 +0000)]
MFC r319854:

bin/ln: Set umask appropriately before creating files for testing

These changes were missed in D11084

Submitted by: shivansh
Reviewed by: asomers
X-MFC-With: 319714
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11158

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

6 years agoMFC r321436: ar: handle partial writes from archive_write_data
emaste [Mon, 31 Jul 2017 09:28:43 +0000 (09:28 +0000)]
MFC r321436: ar: handle partial writes from archive_write_data

libarchive may limit a single archive_write_data call to handling
0x7fffffff bytes. Add a loop to handle partial writes.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC 321409
sephe [Mon, 31 Jul 2017 06:53:43 +0000 (06:53 +0000)]
MFC 321409

    hyperv/hn: Ignore LINK_SPEED_CHANGE status.

    This status will be reported if the backend NIC is wireless; it's not
    useful.  Due to the high frequency of the reporting, this could be
    pretty annoying; ignore it.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11651

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

6 years agoMFC 321408
sephe [Mon, 31 Jul 2017 06:40:09 +0000 (06:40 +0000)]
MFC 321408

    rndis: Add LINK_SPEED_CHANGE status

    Reviewed by:    hselasky
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11650

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

6 years agoMFC 321407
sephe [Mon, 31 Jul 2017 06:27:43 +0000 (06:27 +0000)]
MFC 321407

    hyperv/hn: Export VF list and VF-HN mapping

    The VF-HN map will be used later on to implement "transparent VF".

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11618

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

6 years agoMFC r320491:
ngie [Mon, 31 Jul 2017 03:59:07 +0000 (03:59 +0000)]
MFC r320491:

atf-sh(3): document atf_init_test_cases(3) fully

The function was missing from the NAME/SYNOPSIS sections. Add a manpage link
to complete the documentation reference.

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

6 years agoMFC Note: ${FILES} documentation change omitted since r299094 will
ngie [Mon, 31 Jul 2017 03:57:45 +0000 (03:57 +0000)]
MFC Note: ${FILES} documentation change omitted since r299094 will
not be MFCed to ^/stable/10 .

MFC r320442:

share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets

- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- Update documentation to note that ${FILES} is installed via bsd.progs.mk,
  not bsd.prog.mk.

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

6 years agoMFC 321406
sephe [Mon, 31 Jul 2017 03:49:08 +0000 (03:49 +0000)]
MFC 321406

    ethernet: Add ethernet interface attached event and devctl notification.

    ifnet_arrival_event may not be adequate under certain situation; e.g.
    when the LLADDR is needed.  So the ethernet ifattach event is announced
    after all necessary bits are setup.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11617

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

6 years agoMFC r321640:
markj [Mon, 31 Jul 2017 00:41:05 +0000 (00:41 +0000)]
MFC r321640:
Fix style bugs in ksyms.c.

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

6 years agoMFC r321639:
markj [Mon, 31 Jul 2017 00:39:22 +0000 (00:39 +0000)]
MFC r321639:
Restrict permissions on /dev/ksyms to 0400.

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

6 years agoMFC r321401:
avos [Sun, 30 Jul 2017 18:38:05 +0000 (18:38 +0000)]
MFC r321401:
net80211: do not allow to unload rate control module if it is still in use.

Keep 'nrefs' counter up-to-date, so 'kldunload wlan_amrr' with 1+ active
wlan(4) interface will not lead to kernel panic.

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

6 years agoRestore layout of struct vm_map_entry after r321717, same as was done
kib [Sun, 30 Jul 2017 10:49:13 +0000 (10:49 +0000)]
Restore layout of struct vm_map_entry after r321717, same as was done
in r320889 for stable/11.

Sponsored by: The FreeBSD Foundation

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

6 years agoMerge MAP_GUARD.
kib [Sun, 30 Jul 2017 10:36:20 +0000 (10:36 +0000)]
Merge MAP_GUARD.

MFC r316687 (by markj), r320314, r320317, r320338, r320339, r320344, r320430,
r320560 (by alc), r320801, r320843, r321173, r321230.

Tested by: pho
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r321371:
kib [Sat, 29 Jul 2017 08:24:51 +0000 (08:24 +0000)]
MFC r321371:
Do not allocate struct kinfo_vmobject on stack.

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

6 years agoMFC r321305:
dim [Fri, 28 Jul 2017 18:35:29 +0000 (18:35 +0000)]
MFC r321305:

Fix printf format warning in zfs_module.c

Clang 5.0.0 got better warnings about print format strings using %zd,
and this leads to the following -Werror warning on e.g. arm:

    sys/boot/efi/boot1/zfs_module.c:186:18: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
                        "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
                                   ^~~~~~~~~~

Fix this by casting off_t arguments to intmax_t, and using %jd instead.

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D11678

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

6 years agoMFC r320441:
ngie [Fri, 28 Jul 2017 03:33:09 +0000 (03:33 +0000)]
MFC r320441:

share/examples/tests/Makefile: clean up example snippets/documentation

- TESTSDIR doesn't need to be specified after r289158.
- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- TESTS_SUBDIRS should be written out in an append format, one entry
  per line, to provide a better, more conflict resistant example.

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

6 years agoMFC r320443,r320444:
ngie [Fri, 28 Jul 2017 03:30:46 +0000 (03:30 +0000)]
MFC r320443,r320444:

r320443:

Add kyua TAP test integration examples

The examples are patterned loosely after the ATF examples, similar
to the plain test examples.

r320444:

Commit the corresponding mtree file change for the TAP test examples

MFC with: r320443

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

6 years agoMFC r320446:
ngie [Fri, 28 Jul 2017 03:26:05 +0000 (03:26 +0000)]
MFC r320446:

trailing_slash is a TAP-compliant testcase; mark it as such, instead
of calling is a plain testcase.

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

6 years agoMFC r320445:
ngie [Fri, 28 Jul 2017 03:24:57 +0000 (03:24 +0000)]
MFC r320445:

Don't hardcode path to file in /tmp; this violates the kyua sandbox

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

6 years agoMFC: r321314
rmacklem [Thu, 27 Jul 2017 23:15:24 +0000 (23:15 +0000)]
MFC: r321314
r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD servers.

r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for
the NFSv4.1 session. If rsize,wsize are not specified as options, the
value of nm_rsize, nm_wsize is 0 at session creation, resulting in
values for request/response that are too small.
This patch fixes the problem. A workaround is to specify rsize=N,wsize=N
mount options explicitly, so they are set before session creation.
This bug only affects NFSv4.1 mounts against some non-FreeBSD servers.

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

6 years agoMFC: r321248
rmacklem [Thu, 27 Jul 2017 00:04:09 +0000 (00:04 +0000)]
MFC: r321248
Update the nfsv4 man page to reflect recent changes to support
the newer RFCs (5661 and 7530). The main man changes are for the
case of "numbers in strings" for user/groups that RFC7530 allows
and avoids use of nfsuserd(8).

This is a content change.

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

6 years agoMFC r321218: zfs: Fix a typo in the delay_min_dirty_percent sysctl description
emaste [Wed, 26 Jul 2017 23:05:25 +0000 (23:05 +0000)]
MFC r321218: zfs: Fix a typo in the delay_min_dirty_percent sysctl description

The description is FreeBSD-specific and was added in r266497
to fix PR189865.

PR: 220825
Submitted by: Fabian Keil
Obtained from: ElectroBSD

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

6 years agoMFC r321203:
ae [Wed, 26 Jul 2017 11:03:13 +0000 (11:03 +0000)]
MFC r321203:
  Add HPE FlexFabric 10Gb 4-port 536FLR-T device id to the bxe(4) driver.

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

6 years agoMFC 321233
davidcs [Wed, 26 Jul 2017 01:28:27 +0000 (01:28 +0000)]
MFC 321233
Raise the watchdog timer interval to 2 ticks, there by guaranteeing
that it fires between 1ms and 2ms. `
Treat two consecutive occurrences of Heartbeat failures as a legitimate
Heartbeat failure

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

6 years agoMFC 320705
davidcs [Wed, 26 Jul 2017 01:25:51 +0000 (01:25 +0000)]
MFC 320705
Release mtx hw_lock before calling pause() in qla_stop() and
qla_error_recovery()

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

6 years agoMFC 320694
davidcs [Wed, 26 Jul 2017 01:23:35 +0000 (01:23 +0000)]
MFC 320694
Allow MTU changes without ifconfig down/up

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

6 years agoMFC r320077
alc [Tue, 25 Jul 2017 04:13:43 +0000 (04:13 +0000)]
MFC r320077
  Change blist_alloc()'s allocation policy from first-fit to next-fit so
  that disk writes are more likely to be sequential.  This change is
  beneficial on both the solid state and mechanical disks that I've
  tested.  (A similar change in allocation policy was made by DragonFly
  BSD in 2013 to speed up Poudriere with "stressful memory parameters".)

  Increase the width of blst_meta_alloc()'s parameter "skip" and the local
  variables whose values are derived from it to 64 bits.  (This matches the
  width of the field "skip" that is stored in the structure "blist" and
  passed to blst_meta_alloc().)

  Eliminate a pointless check for a NULL blist_t.

  Simplify blst_meta_alloc()'s handling of the ALL-FREE case.

  Address nearby style errors.

MFC r320417
  Address the remaining integer overflow issues with the "skip" parameters
  and "next_skip" variables.  The "skip" value in struct blist has long been
  a 64-bit quantity but various functions have implicitly truncated this
  value to 32 bits.  Now, all arithmetic involving the "skip" value is 64
  bits wide.  (This should allow us to relax the size limit on a swap device
  in the swap pager.)

  Maintain the ability to test this allocator as a user-space application by
  including <stdbool.h>.

  Remove an unused variable from blst_radix_print().

MFC r320527
  Change blst_leaf_alloc() to handle a cursor argument, and to improve
  performance.

  To find in the leaf bitmap all ranges of sufficient length, use a doubling
  strategy with shift-and-and until each bit still set represents a bit
  sequence of length 'count', or until the bitmask is zero.  In the latter
  case, update the hint based on the first bit sequence length not found to
  be available.  For example, seeking an interval of length 12, the set bits
  of the bitmap would represent intervals of length 1, then 2, then 3, then
  6, then 12.  If no bits are set at the point when each bit represents an
  interval of length 6, then the hint can be updated to 5 and the search
  terminated.

  If long-enough intervals are found, discard those before the cursor.  If
  any remain, use binary search to find the position of the first of them,
  and allocate that interval.

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

6 years agoMFC r290605,r290606:
ngie [Mon, 24 Jul 2017 16:45:38 +0000 (16:45 +0000)]
MFC r290605,r290606:

r290605:

Document powl(3)

PR: 191751

r290606:

Bump .Dd

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

6 years agoMFC r321207:
ken [Mon, 24 Jul 2017 14:42:45 +0000 (14:42 +0000)]
MFC r321207:
  ------------------------------------------------------------------------
  r321207 | ken | 2017-07-19 09:39:01 -0600 (Wed, 19 Jul 2017) | 14 lines

  Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers.

  mps_wait_command() and mpr_wait_command() were using getmicrotime() to
  determine elapsed time when checking for a timeout in polled mode.
  getmicrotime() isn't guaranteed to monotonically increase, and that
  caused spurious timeouts occasionally.

  Switch to using getmicrouptime(), which does increase monotonically.
  This fixes the spurious timeouts in my test case.

  ------------------------------------------------------------------------
Reviewed by: slm, scottl
Sponsored by: Spectra Logic

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

6 years agoMFC 321286
sephe [Mon, 24 Jul 2017 02:13:46 +0000 (02:13 +0000)]
MFC 321286

    hyperv/storvsc: Force SPC3 for CDROM attached.

    This unbreaks the CDROM attaching on GEN2 VMs.  On GEN1 VMs, CDROM is
    attached to emulated ATA controller.

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

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

6 years agoMFC r321240:
ngie [Sun, 23 Jul 2017 18:00:11 +0000 (18:00 +0000)]
MFC r321240:

cron(8) manpage updates

- Document /etc/cron.d and /usr/local/etc/cron.d under FILES.
- Reword documentation for -n: add appropriate soft-stop and remove
  contraction to appease igor.

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

6 years agoMFC r319905
alc [Sat, 22 Jul 2017 17:49:18 +0000 (17:49 +0000)]
MFC r319905

Reduce the frequency of hint updates on allocation without incurring
additional allocation overhead.  Previously, blst_meta_alloc() updated the
hint after every successful allocation.  However, these "eager" hint
updates are of no actual benefit if, instead, the "lazy" hint update at
the start of blst_meta_alloc() is generalized to handle all cases where
the number of available blocks is less than the requested allocation.
Previously, the lazy hint update at the start of blst_meta_alloc() only
handled the ALL-FULL case.  (I would also note that this change provides
consistency between blist_alloc() and blist_fill() in that their hint
maintenance is now entirely lazy.)

Eliminate unnecessary checks for terminators in blst_meta_alloc() and
blst_meta_fill() when handling ALL-FREE meta nodes.

Eliminate the field "bl_free" from struct blist.  It is redundant.  Unless
the entire radix tree is a single leaf, the count of free blocks is stored
in the root node.  Instead, provide a function blist_avail() for obtaining
the number of free blocks.

In blst_meta_alloc(), perform a sanity check on the allocation once rather
than repeating it in a loop over the meta node's children.

In blst_leaf_fill(), use the optimized bitcount*() function instead of a
loop to count the blocks being allocated.

Add or improve several comments.

Address some nearby style errors.

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

6 years agoMFC r319756
alc [Sat, 22 Jul 2017 07:28:44 +0000 (07:28 +0000)]
MFC r319756
  Style and comment fixes

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

6 years agoMFC r320546
alc [Sat, 22 Jul 2017 06:40:57 +0000 (06:40 +0000)]
MFC r320546
  When "force" is specified to pmap_invalidate_cache_range(), the given
  start address is not required to be page aligned.  However, the loop
  within pmap_invalidate_cache_range() that performs the actual cache
  line invalidations requires that the starting address be truncated to
  a multiple of the cache line size.  This change corrects an error in
  that truncation.

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

6 years agoMFC r315621
alc [Sat, 22 Jul 2017 05:58:10 +0000 (05:58 +0000)]
MFC r315621
  Use IDX_TO_OFF(), not ptoa(), when converting the difference between two
  vm_pindex_t's into a vm_ooffset_t.

  The length given to shm_dotruncate() must never be negative.  Assert this.

  Tidy up a comment.

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

6 years agoMFC r320498
alc [Sat, 22 Jul 2017 04:57:51 +0000 (04:57 +0000)]
MFC r320498
  Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it
  recycles the current vm space.  Otherwise, an mlockall(MCL_FUTURE) could
  still be in effect on the process after an execve(2), which violates the
  specification for mlockall(2).

  It's pointless for vm_map_stack() to check the MEMLOCK limit.  It will
  never be asked to wire the stack.  Moreover, it doesn't even implement
  wiring of the stack.

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

6 years agoMFC r320273:
bdrewery [Fri, 21 Jul 2017 17:58:06 +0000 (17:58 +0000)]
MFC r320273:

  Allow ALWAYS_BOOTSTRAP_MAKE to force bmake bootstrapping.

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

6 years agoMFC r320927,320931,320932:
mm [Thu, 20 Jul 2017 20:16:18 +0000 (20:16 +0000)]
MFC r320927,320931,320932:
Bump libarchive to 3.3.2

Vendor changes:
  PR #901: don't depend on stdin in a testcase

Relnotes: yes

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

6 years agoMFC r320729: Add GEOM::descr attribute for symmetry with GEOM::ident.
mav [Thu, 20 Jul 2017 11:37:02 +0000 (11:37 +0000)]
MFC r320729: Add GEOM::descr attribute for symmetry with GEOM::ident.

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

6 years agoMFC r290570:
ngie [Thu, 20 Jul 2017 01:19:05 +0000 (01:19 +0000)]
MFC r290570:

Reduce the Makefile snippet complexity a bit

- Set BINDIR to TESTSDIR globally (and subsequently, remove all
  `${FILESGROUP}DIR` setting because BINDIR is set to `TESTSDIR`)
- Set MAN to "" globally, instead of per-PROG

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

6 years agoMFC r278329:
ngie [Thu, 20 Jul 2017 01:12:31 +0000 (01:12 +0000)]
MFC r278329:

Document WITNESS_COUNT and WITNESS_NO_VNODE

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

6 years agoMFC r314475:
ngie [Thu, 20 Jul 2017 01:07:02 +0000 (01:07 +0000)]
MFC r314475:

Simplify idioms in usr.sbin/lpr Makefiles

Use :H instead of .CURDIR-relative pathing to simplify make output, etc.

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

6 years agoMFC r314454,r314455:
ngie [Thu, 20 Jul 2017 01:03:50 +0000 (01:03 +0000)]
MFC r314454,r314455:

r314454:

Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

r314455:

Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

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

6 years agoMFC r314479:
ngie [Thu, 20 Jul 2017 01:02:37 +0000 (01:02 +0000)]
MFC r314479:

Use :H to manipulate .CURDIR-relative paths instead of ../

This simplifies make output

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

6 years agoMFC r314654:
ngie [Thu, 20 Jul 2017 01:01:16 +0000 (01:01 +0000)]
MFC r314654:

cddl: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

While here, remove bogus CFLAGS which look for headers in cddl/lib/libumem.
There aren't any source files there (just Makefiles)

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

6 years agoMFC r314653:
ngie [Thu, 20 Jul 2017 00:52:11 +0000 (00:52 +0000)]
MFC r314653:

libexec: normalize paths using SRCTOP-relative paths or :H when possible

This simplifies make logic/output

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

6 years agoMFC r316102:
ngie [Thu, 20 Jul 2017 00:48:04 +0000 (00:48 +0000)]
MFC r316102:

Wrap bootcamp DEBUG statement with curly braces

This fixes a -Wempty-body warning with gcc 6.3.0 when PART_DEBUG is undefined.

Tested with: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)

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

6 years agoMFC r318960,r319545,r319546,r319548,r321261:
ngie [Thu, 20 Jul 2017 00:44:01 +0000 (00:44 +0000)]
MFC r318960,r319545,r319546,r319548,r321261:

r318960 (by dab):

Add newsyslog capability to write RFC5424 compliant rotation message.

This modification adds the capability to newsyslog to write the
rotation message in a format that is compliant with RFC5424. This
capability is enabled on a per-log file basis through a new value
("T") in the flags field in newsyslog.conf. This is useful on systems
that use the RFC5424 format for log files so that the rotation message
format matches that of the other log messages. There has been recent
mention of adding an RFC5424 compliant mode to syslogd and at least
one alternative system log daemon (rsyslogd) that already has the
capability to use that format.

Relnotes: yes

r319545:

Don't execute the TODO cases in a subshell

This messes up the testcase counter, as seen in bug 219756.

PR: 212160, 219756

r319546:

Fix the testplan after ^/head@r318960

The number of executed testcases is 128, not 126.

MFC with: r318960

r319548:

Remove TODO for sub testcases added for bug 212160

On closer inspection, the past failures no longer occur on ^/head.

PR: 212160

r321261:

Clean up leading whitespace (convert single column spaces to hard tabs)

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

6 years agoMFC r320135:
ngie [Thu, 20 Jul 2017 00:33:12 +0000 (00:33 +0000)]
MFC r320135:

periodic(8): delete trailing whitespace

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

6 years agoRecord-only merge for ^/head@r312419
ngie [Wed, 19 Jul 2017 21:19:28 +0000 (21:19 +0000)]
Record-only merge for ^/head@r312419

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

6 years agoMFC note: only the newsyslog.conf.d change has been backported to unbreak
ngie [Wed, 19 Jul 2017 21:06:05 +0000 (21:06 +0000)]
MFC note: only the newsyslog.conf.d change has been backported to unbreak
"make distribution" with etc/newsyslog.conf.d/opensm.conf
installation. The cron.d and syslog.d changes were omitted by
request to avoid churn on ^/stable/{10,11}.
Requested by: jhb, peter

MFC r318545:

Install {cron.d,newsyslog.conf.d,syslog.d} via `make distribution`, not `make install`

I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file,
and continued using it in r318441 and r318443.

This will fix the files being handled improperly via installworld, preventing tools like
etcupdate, mergemaster, etc from functioning properly when comparing the installed
contents on a system vs the contents in a source tree when doing merges.

PR: 219404
MFC with: r277541, r318441, r318443

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

6 years agoMFC note: content changes of r317315 were reversed. .Dd is being updated
ngie [Wed, 19 Jul 2017 20:58:16 +0000 (20:58 +0000)]
MFC note: content changes of r317315 were reversed. .Dd is being updated
for diff reduction purposes.

MFC r317315,r317437:

r317315:

Note that getpagesize(3) can return -1 on failure

r317437 (by kib):

getpagesize(3) cannot fail.

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

6 years agoMFC r269550:
ngie [Wed, 19 Jul 2017 20:44:50 +0000 (20:44 +0000)]
MFC r269550:
r269550 (by peter):

Check gethostname(2) return code - but even if it succeeds it may not
null terminate.

Temporarily use "From: $user@$hostname" rather than "From: $user".
The latter exposes incompatible behavior if using dma(8).  sendmail(8)
(and other alternatives) canonify either form on submission (even
if masquerading), but dma will leak a non-compliant address to
the internet.

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