]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoFollowup to r347996
ngie [Tue, 21 May 2019 00:30:29 +0000 (00:30 +0000)]
Followup to r347996

Replace uses of `foo.encode("hex")` with `binascii.hexlify(foo)` for forwards
compatibility between python 2.x and python 3.

PR: 237403
MFC after: 1 week

4 years agoAdd two missing eventhandler.h headers
cem [Tue, 21 May 2019 00:04:19 +0000 (00:04 +0000)]
Add two missing eventhandler.h headers

These are obviously missing from the .c files, but don't show up in any
tinderbox configuration (due to latent header pollution of some kind).  It
seems some configurations don't have this pollution, and the includes are
obviously missing, so go ahead and add them.

Reported by: Peter Jeremy <peter AT rulingia.com>
X-MFC-With: r347984

4 years agoReverse the bit logic of sc_led_modes_mask. Instead of initializing it to
ian [Mon, 20 May 2019 22:32:31 +0000 (22:32 +0000)]
Reverse the bit logic of sc_led_modes_mask.  Instead of initializing it to
all-ones then carving out blocks of zeroes where specified values go, init
it to all-zeroes, put in ones where values need to be masked, then use it
as value &= ~sc_led_modes_mask.  In addition to being more idiomatic, this
means everything related to FDT data is initialized to zero along with the
rest of the softc, and that allows removing some #ifdef FDT sections and
wrapping the whole muge_set_leds() function in a single ifdef block.

This also deletes the early-out from muge_set_leds() when an eeprom exists.
Even if there is an eeprom with led config in it, the fdt data (if present)
should override that, because the user is in control of the fdt data.

4 years agoAllow the end-user to pass along arguments to cryptotest.py via `$CRYPTOTEST_ARGS`
ngie [Mon, 20 May 2019 22:32:26 +0000 (22:32 +0000)]
Allow the end-user to pass along arguments to cryptotest.py via `$CRYPTOTEST_ARGS`

This allows someone to use `-v` to dump out standard output.

4 years agoA MAC adddress from FDT data should override anything stored in eeprom or
ian [Mon, 20 May 2019 22:21:47 +0000 (22:21 +0000)]
A MAC adddress from FDT data should override anything stored in eeprom or
OTP registers (because the user is in control of the fdt data).  Remove the
early returns from the code that tries to find a good mac address, so that
the execution always flows through the routine to get an address from FDT
data last, when on FDT-enabled systems.

4 years agoDon't detour through sc->sc_ue when we have a direct pointer to ue in hand
ian [Mon, 20 May 2019 22:04:01 +0000 (22:04 +0000)]
Don't detour through sc->sc_ue when we have a direct pointer to ue in hand
already.  Also, shorten a variable name for nicer line-wrapping.

No functional changes.

4 years agoUse the new usb fdt support functions to locate the proper fdt node for
ian [Mon, 20 May 2019 21:45:00 +0000 (21:45 +0000)]
Use the new usb fdt support functions to locate the proper fdt node for
the device instance, and to get the MAC address for the device instance.
The ad-hoc code this replaces could find the wrong instance if multiple
devices were present.

4 years agoHook DEFINE_IFUNC.9 up to the build.
markj [Mon, 20 May 2019 21:23:33 +0000 (21:23 +0000)]
Hook DEFINE_IFUNC.9 up to the build.

Reported by: pluknet
MFC with: r348003

4 years agomips: remove 16-byte alignment from .init and .fini epilogues
emaste [Mon, 20 May 2019 20:48:04 +0000 (20:48 +0000)]
mips: remove 16-byte alignment from .init and .fini epilogues

The .init and .fini epilogues from crtn should be placed immediately
after any instructions in .init and .fini sections from the linked
objects.  Using 16-byte alignment for the epilogues on MIPS was a bug,
but it did not cause any issue with GNU ld as GNU ld (2.17.50) fills the
padding with NOPs.

Current versions of LLD fill any padding between different object files
with trap instructions.  Inserting trap padding prior to the .init/.fini
epilogue is undesriable as the resulting binary will crash at runtime.

The .init and .fini sections in object files linked between crti and
crtn must already be a multiple of the instruction size and so no
alignment directive is required in crtn.  Indeed, other architectures
(except sparc64) do not specify alignment in their crtn implementations.

Reported by: arichardson
Reviewed by: andrew
Event: Waterloo Hackathon 2019
Differential Revision: https://reviews.freebsd.org/D18291

4 years agomuge: update FDT LED configuration
emaste [Mon, 20 May 2019 19:31:49 +0000 (19:31 +0000)]
muge: update FDT LED configuration

Also use LED mode settings from the FDT to set the PHY.
From v3 of the patch submitted in the PR.

I moved the sc_led_modes and sc_led_modes_mask default setting outside
of the #ifdef FDT case.

PR: 237325
Submitted by: Ralf <iz-rpi03@hs-karlsruhe.de>
Reviewed by: ian
MFC after: 2 weeks
MFC with: r348001
Event: Waterloo Hackathon 2019
Differential Revision: https://reviews.freebsd.org/D20325

4 years ago[PowerPC64] stand: fix build using clang 8 as compiler
luporl [Mon, 20 May 2019 19:21:35 +0000 (19:21 +0000)]
[PowerPC64] stand: fix build using clang 8 as compiler

This change fixes "stand" build issues when using clang 8
as compiler.

Submitted by:   alfredo.junior_eldorado.org.br
Reviewed by:    jhibbits
Differential Revision: https://reviews.freebsd.org/D20026

4 years agokcov depends on eventhandler.h.
markj [Mon, 20 May 2019 19:14:07 +0000 (19:14 +0000)]
kcov depends on eventhandler.h.

MFC after: 3 days

4 years agoAdd a man page for DEFINE_IFUNC.
markj [Mon, 20 May 2019 19:12:29 +0000 (19:12 +0000)]
Add a man page for DEFINE_IFUNC.

Reviewed by: kib
Discussed with: emaste
MFC after: 2 weeks
Event: Waterloo Hackathon 2019
Differential Revision: https://reviews.freebsd.org/D20310

4 years agoTypo.
markj [Mon, 20 May 2019 19:08:55 +0000 (19:08 +0000)]
Typo.

MFC after: 3 days

4 years agomuge: configure LEDs per dtb (for Raspberry Pi 3B+)
emaste [Mon, 20 May 2019 18:41:07 +0000 (18:41 +0000)]
muge: configure LEDs per dtb (for Raspberry Pi 3B+)

Also apply some style(9) and remove the message about EEPROM configuration
(if there's an EEPROM the hardware handles LED configuration itself).

PR: 237325
Reviewed by: ian
MFC after: 2 weeks
Submitted by: Ralf <iz-rpi03@hs-karlsruhe.de>

4 years agoImprove tree(3) tests by using ATF_REQUIRE where applicable.
trasz [Mon, 20 May 2019 18:35:23 +0000 (18:35 +0000)]
Improve tree(3) tests by using ATF_REQUIRE where applicable.

MFC after: 2 weeks
Sponsored by: Klara Inc.

4 years agoInstall missing data file for
lwhsu [Mon, 20 May 2019 18:07:45 +0000 (18:07 +0000)]
Install missing data file for
lib.libarchive.functional_test.test_read_format_zip_utf8_paths

MFC after: 2 weeks (with r347989)
Sponsored by: The FreeBSD Foundation

4 years ago[mediatek] Add support for non-flash devices on the SPI bus of the Mediatek SoCs.
adrian [Mon, 20 May 2019 17:43:58 +0000 (17:43 +0000)]
[mediatek] Add support for non-flash devices on the SPI bus of the Mediatek SoCs.

The existing SPI support only worked for directly attached flash chips.
it didn't implement clock programming or chipselect.  It also supports
transfers with unbalanced tx/rx command sizes.

Submitted by: <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D20101

4 years agoReplace uses of `foo.(de|en)code('hex')` with `binascii.(un)?hexlify(foo)`
ngie [Mon, 20 May 2019 16:38:12 +0000 (16:38 +0000)]
Replace uses of `foo.(de|en)code('hex')` with `binascii.(un)?hexlify(foo)`

Python 3 no longer doesn't support encoding/decoding hexadecimal numbers using
the `str.format` method. The backwards compatible new method (using the
binascii module/methods) is a comparable means of converting to/from
hexadecimal format.

In short, the functional change is the following:
* `foo.decode('hex')` -> `binascii.unhexlify(foo)`
* `foo.encode('hex')` -> `binascii.hexlify(foo)`

While here, move the dpkt import in `cryptodev.py` down per PEP8, so it comes
after the standard library provided imports.

PR: 237403
MFC after: 1 week

4 years ago[PPC] Enable build/install of ld.bfd on base
luporl [Mon, 20 May 2019 16:00:32 +0000 (16:00 +0000)]
[PPC] Enable build/install of ld.bfd on base

When using LLVM+clang+lld on PowerPC64, ld.bfd is also needed,
to link 32-bit binaries correctly, as lld support for 32-bit is
still minimal.

This change enables it to be built and installed when lld is used.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20259

4 years agoMFV r347989:
mm [Mon, 20 May 2019 12:57:39 +0000 (12:57 +0000)]
MFV r347989:
Sync libarchive with vendor.

Relevant vendor changes:
  Issue #795: XAR - do not try to add xattrs without an allocated name
  PR #812: non-recursive option for extract and list
  PR #958: support reading metadata from compressed files
  PR #999: add --exclude-vcs option to bsdtar
  Issue #1062: treat empty archives with a GNU volume header as valid
  PR #1074: Handle ZIP files with trailing 0s in the extra fields
            (Android APK archives)
  PR #1109: Ignore padding in Zip extra field data (Android APK archives)
  PR #1167: fix problems related to unreadable directories
  Issue #1168: fix handling of strtol() and strtoul()
  PR #1172: RAR5 - fix invalid window buffer read in E8E9 filter
  PR #1174: ZIP reader - fix of MSZIP signature parsing
  PR #1175: gzip filter - fix reading files larger than 4GB from memory
  PR #1177: gzip filter - fix memory leak with repeated header reads
  PR #1180: ZIP reader - add support for Info-ZIP Unicode Path Extra Field
  PR #1181: RAR5 - fix merge_block() recursion
            (OSS-Fuzz 12999, 13029, 13144, 13478, 13490)
  PR #1183: fix memory leak when decompressing ZIP files with LZMA
  PR #1184: fix RAR5 OSS-Fuzz issues 12466, 14490, 14491, 12817
    OSS-Fuzz 12466: RAR5 - fix buffer overflow when parsing huffman tables
    OSS-Fuzz 14490, 14491: RAR5 - fix bad shift-left operations
    OSS-Fuzz 12817: RAR5 - handle a case with truncated huffman tables
  PR #1186: RAR5 - fix invalid type used for dictionary size mask
            (OSS-Fuzz 14537)
  PR #1187: RAR5 - fix integer overflow (OSS-Fuzz 14555)
  PR #1190: RAR5 - RAR5 don't try to unpack entries marked as directories
            (OSS-Fuzz 14574)
  PR #1196: RAR5 - fix a potential SIGSEGV on 32-bit builds
  OSS-Fuzz 2582: RAR - fix use after free if there is an invalid entry
  OSS-Fuzz 14331: RAR5 - fix maximum owner name length
  OSS-Fuzz 13965: RAR5 - use unsigned int for volume number + range check

  Additional RAR5 reader changes:
    - support symlinks, hardlinks, file owner, file group, versioned files
    - change ARCHIVE_FORMAT_RAR_V5 to 0x100000
    - set correct mode for readonly directories
    - support readonly, hidden and system Windows file attributes

MFC after: 2 weeks

4 years agoUpdate vendor/libarchive/dist to git b5818e39e128eca4951e2ab10467d4d850a2ba57
mm [Mon, 20 May 2019 12:32:00 +0000 (12:32 +0000)]
Update vendor/libarchive/dist to git b5818e39e128eca4951e2ab10467d4d850a2ba57

Relevant vendor changes:
Issue #795: XAR - do not try to add xattrs without an allocated name
PR #812: non-recursive option for extract and list
PR #958: support reading metadata from compressed files
PR #999: add --exclude-vcs option to bsdtar
Issue #1062: treat empty archives with a GNU volume header as valid
PR #1074: Handle ZIP files with trailing 0s in the extra fields
          (Android APK archives)
PR #1109: Ignore padding in Zip extra field data (Android APK archives)
PR #1167: fix problems related to unreadable directories
Issue #1168: fix handling of strtol() and strtoul()
PR #1172: RAR5 - fix invalid window buffer read in E8E9 filter
PR #1174: ZIP reader - fix of MSZIP signature parsing
PR #1175: gzip filter - fix reading files larger than 4GB from memory
PR #1177: gzip filter - fix memory leak with repeated header reads
PR #1180: ZIP reader - add support for Info-ZIP Unicode Path Extra Field
PR #1181: RAR5 - fix merge_block() recursion
          (OSS-Fuzz 12999, 13029, 13144, 13478, 13490)
PR #1183: fix memory leak when decompressing ZIP files with LZMA
PR #1184: fix RAR5 OSS-Fuzz issues 12466, 14490, 14491, 12817
  OSS-Fuzz 12466: RAR5 - fix buffer overflow when parsing huffman tables
  OSS-Fuzz 14490, 14491: RAR5 - fix bad shift-left operations
  OSS-Fuzz 12817: RAR5 - handle a case with truncated huffman tables
PR #1186: RAR5 - fix invalid type used for dictionary size mask
          (OSS-Fuzz 14537)
PR #1187: RAR5 - fix integer overflow (OSS-Fuzz 14555)
PR #1190: RAR5 - RAR5 don't try to unpack entries marked as directories
          (OSS-Fuzz 14574)
PR #1196: RAR5 - fix a potential SIGSEGV on 32-bit builds
OSS-Fuzz 2582: RAR - fix use after free if there is an invalid entry
OSS-Fuzz 14331: RAR5 - fix maximum owner name length
OSS-Fuzz 13965: RAR5 - use unsigned int for volume number + range check

Additional RAR5 reader changes:
  - support symlinks, hardlinks, file owner, file group, versioned files
  - change ARCHIVE_FORMAT_RAR_V5 to 0x100000
  - set correct mode for readonly directories
  - support readonly, hidden and system Windows file attributes

NOTE: a version bump of libarchive will happen in the following days

4 years agoUpdate loader size on powerpc isos
jhibbits [Mon, 20 May 2019 03:35:14 +0000 (03:35 +0000)]
Update loader size on powerpc isos

Summary:
loader has grown to the point it's overflowing the existing 307200 bytes
allocated to it in the HFS boot partition on the isos.

Bump the space reservation up to 500k.

Submitted by: Brandon Bergren
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20301

4 years agoksyms: Fixup symbols for powerpc in the kernel, not just modules
jhibbits [Mon, 20 May 2019 02:41:09 +0000 (02:41 +0000)]
ksyms: Fixup symbols for powerpc in the kernel, not just modules

Summary:
PowerPC kernels are fully position independent, just like kernel modules.
The same fixups that are done for modules therefore need to be done to the
kernel, else symbol resolution in, e.g., DTrace, cannot resolve the kernel
symbols, so only addresses in the kernel are printed, while kernel module
symbols are printed.

Test Plan:
Run lockstat on powerpc64.  Note symbols are resolved for kernel and
modules.

Reviewed By: markj
Differential Revision: https://reviews.freebsd.org/D20316

4 years agoExtract eventfilter declarations to sys/_eventfilter.h
cem [Mon, 20 May 2019 00:38:23 +0000 (00:38 +0000)]
Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions.  The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended).  Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed.  __FreeBSD_version has been bumped.

4 years agoFix rt_ifa selection during loopback route insertion process.
melifaro [Sun, 19 May 2019 21:49:56 +0000 (21:49 +0000)]
Fix rt_ifa selection during loopback route insertion process.
  Currently such routes are added with a link-level IFA, which is
  plain wrong. Only after the insertion they get fixed by the special
  link_rtrequest() ifa handler. This behaviour complicates routing code
  and makes ifa selection more complex.
Streamline this process by explicitly moving link_rtrequest() logic
  to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all
  this logic in the loopback route case by explicitly specifying
  proper rt_ifa inside the ifa_maintain_loopback_route().ยง

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20076

4 years agolibsecureboot: allow control of when pseudo pcr is updated
sjg [Sun, 19 May 2019 20:28:49 +0000 (20:28 +0000)]
libsecureboot: allow control of when pseudo pcr is updated

During boot we only want to measure things which *must*
be verified - this should provide more deterministic ordering.

Reviewed by: stevek
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D20297

4 years agoload_key_buf do not free data from dearmor
sjg [Sun, 19 May 2019 20:24:17 +0000 (20:24 +0000)]
load_key_buf do not free data from dearmor

The data returned by dearmor is referenced by the key
leave it alone!

Reviewed by: stevek
MFC after: 2 days

4 years agoTo avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC
dim [Sun, 19 May 2019 20:13:55 +0000 (20:13 +0000)]
To avoid unnecessarily modifying ports, add a -lgomp symlink, since GCC
does not ship a -lomp symlink.  Also update OptionalObsoleteFiles for
this, and add 32-bit variants while here.

Submitted by: jbeich
PR: 237975
MFC after: 3 days

4 years agoFix OptionalObsoleteFiles copy/paste mistake from r345236, which
dim [Sun, 19 May 2019 19:42:35 +0000 (19:42 +0000)]
Fix OptionalObsoleteFiles copy/paste mistake from r345236, which
connected libomp to the build.  The comparison should not have been
against ${MK_OPENSSH}, but against ${MK_OPENMP}, obviously.

MFC after: 3 days

4 years agoAllow sending on demand SCTP HEARTBEATS only in the ESTABLISHED state.
tuexen [Sun, 19 May 2019 17:53:36 +0000 (17:53 +0000)]
Allow sending on demand SCTP HEARTBEATS only in the ESTABLISHED state.
This issue was found by running syzkaller.

MFC after: 3 days

4 years agoImprove input validation for the IPPROTO_SCTP level socket options
tuexen [Sun, 19 May 2019 17:28:00 +0000 (17:28 +0000)]
Improve input validation for the IPPROTO_SCTP level socket options
SCTP_CONNECT_X and SCTP_CONNECT_X_DELAYED.

Some issues where found by running syzkaller.

MFC after: 3 days

4 years agoAdd common support functions for USB devices configured via FDT data.
ian [Sun, 19 May 2019 16:56:59 +0000 (16:56 +0000)]
Add common support functions for USB devices configured via FDT data.

FDT data is sometimes used to configure usb devices which are hardwired into
an embedded system. Because the devices are instantiated by the usb
enumeration process rather than by ofwbus iterating through the fdt data, it
is somewhat difficult for a usb driver to locate fdt data that belongs to
it. In the past, various ad-hoc methods have been used, which can lead to
errors such applying configuration that should apply only to a hardwired
device onto a similar device attached by the user at runtime. For example,
if the user adds an ethernet device that uses the same driver as the builtin
ethernet, both devices might end up with the same MAC address.

These changes add a new usb_fdt_get_node() helper function that a driver can
use to locate FDT data that belongs to a single unique instance of the
device. This function locates the proper FDT data using the mechanism
detailed in the standard "usb-device.txt" binding document [1].

There is also a new usb_fdt_get_mac_addr() function, used to retrieve the
mac address for a given device instance from the fdt data. It uses
usb_fdt_get_node() to locate the right node in the FDT data, and attempts to
obtain the mac-address or local-mac-address property (in that order, the
same as linux does it).

The existing if_smsc driver is modified to use the new functions, both as an
example and for testing the new functions. Rpi and rpi2 boards use this
driver and provide the mac address via the fdt data.

[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/usb/usb-device.txt

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

4 years agoLinuxKPI: Finalize move of lindebugfs from ports to base.
johalun [Sun, 19 May 2019 15:44:21 +0000 (15:44 +0000)]
LinuxKPI: Finalize move of lindebugfs from ports to base.

The source file was moved to base earlier and also improved upon,
but never compiled in. This patch will:
- Make a module in sys/modules
- Make lindebugfs depend on linuxkpi (for seq_file)
- Check if read/write functions are set before calling, DRM drivers
  don't always set both of them.

Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week

4 years agoAdd missing setting of hv_base to the leaf that we used.
stevek [Sun, 19 May 2019 15:07:14 +0000 (15:07 +0000)]
Add missing setting of hv_base to the leaf that we used.
Correct setting hv_high to use regs[0], not leaf.

4 years agoImplement PTRACE_O_TRACESYSGOOD. This makes Linux strace(1) work.
trasz [Sun, 19 May 2019 12:58:44 +0000 (12:58 +0000)]
Implement PTRACE_O_TRACESYSGOOD.  This makes Linux strace(1) work.

Reviewed by: dchagin
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20200

4 years agoLinux send() call returns EAGAIN instead of ENOTCONN in case when the
dchagin [Sun, 19 May 2019 09:23:20 +0000 (09:23 +0000)]
Linux send() call returns EAGAIN instead of ENOTCONN in case when the
socket is non-blocking and connect() is not finished yet.

Initial patch developed by Steven Hartland in 2008 and adopted by me.

PR: 129169
Reported by: smh@
MFC after: 2 weeks

4 years agoFix rw->ro remount when there is a text vnode mapping.
kib [Sun, 19 May 2019 09:18:09 +0000 (09:18 +0000)]
Fix rw->ro remount when there is a text vnode mapping.

Reported and tested by: hrs
Sponsored by: The FreeBSD Foundation
MFC after: 16 days

4 years agonvd.4: Reference nda(4)
cem [Sun, 19 May 2019 06:01:11 +0000 (06:01 +0000)]
nvd.4: Reference nda(4)

Fix a totally minor typo in nvme.4 while here.

4 years agoAdd note about nvd / nda selection.
imp [Sun, 19 May 2019 05:46:24 +0000 (05:46 +0000)]
Add note about nvd / nda selection.

Noticed by: cem@

4 years agoExpose the MD_CLEAR capability used by Intel MDS mitigations to guests.
jhb [Sat, 18 May 2019 21:20:38 +0000 (21:20 +0000)]
Expose the MD_CLEAR capability used by Intel MDS mitigations to guests.

Submitted by: Patrick Mooney <pmooney@pfmooney.com>
Reviewed by: kib
Tested by: Patrick on SmartOS with Linux and Windows guests
Obtained from: Joyent
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D20296

4 years agoChange ed(4), ep(4), and fxp(4) examples to em(4).
brooks [Sat, 18 May 2019 21:01:36 +0000 (21:01 +0000)]
Change ed(4), ep(4), and fxp(4) examples to em(4).

ed(4) and ep(4) have been removed. fxp(4) remains popular in older
systems, but isn't as future proof as em(4).

Reviewed by: bz, jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D20311

4 years agoAdd note to UPDATING for users of mergemaster after the move of master.passwd
brd [Sat, 18 May 2019 19:36:23 +0000 (19:36 +0000)]
Add note to UPDATING for users of mergemaster after the move of master.passwd
and group in r347638.

Approved by: allanjude (mentor)

4 years agobhyve virtio needs barriers
rgrimes [Sat, 18 May 2019 19:32:38 +0000 (19:32 +0000)]
bhyve virtio needs barriers

Under certain tight race conditions, we found that the lack of a memory
barrier in bhyve's virtio handling causes it to miss a NO_NOTIFY state
transition on block devices, resulting in guest stall. The investigation
is recorded in OS-7613. As part of the examination into bhyve's use of
barriers, one other section was found to be problematic, but only on
non-x86 ISAs with less strict memory ordering. That was addressed in
this patch as well, although it was not at all a problem on x86.

PR: 231117
Submitted by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: jhb, kib, rgrimes
Approved by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D19501

4 years agoUpdate beinstall to use the mergemaster/etcupdate from the source tree instead
brd [Sat, 18 May 2019 17:13:08 +0000 (17:13 +0000)]
Update beinstall to use the mergemaster/etcupdate from the source tree instead
of the installed one.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D20291

4 years agoMake lock-less delayed invalidation operational very early.
kib [Sat, 18 May 2019 16:19:31 +0000 (16:19 +0000)]
Make lock-less delayed invalidation operational very early.

Apparently, there is more code trying to call pmap_remove() early,
mostly to free preloaded memory.  Instead of moving all deallocations
to the point where a scheduler is initialized, add missed setup of
thread0 di init at hammer_time().

The code in pmap_delayed_invl_start_u() is modified to not ever take
the thread lock if the thread priority is less or equal to PVM.  Since
thread0 starts at priority 0, and then is reset to PVM at
proc0_init(), this eliminates taking the thread lock during early
boot.

While there, fix off by one in comparision of the base priority.

Reported and tested by: bcran (previous version)
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 29 days

4 years agopowerpc: Fix moea64 pmap from 347952
jhibbits [Sat, 18 May 2019 14:55:59 +0000 (14:55 +0000)]
powerpc: Fix moea64 pmap from 347952

vm_paddr_t is only 32 bits on AIM32 (currently), causing a build failure with
the shifting.

MFC after: 2 weeks
MFC with: r347952

4 years agoUpdate the DIAGNOSTIC-only vmem_check_sanity() after r347949.
markj [Sat, 18 May 2019 14:19:23 +0000 (14:19 +0000)]
Update the DIAGNOSTIC-only vmem_check_sanity() after r347949.

Cursor tags are special and shouldn't be subject to the existing checks.

Reported by: kib, David Wolfskill
MFC with: r347949

4 years agoMFV/ZoL: `zfs userspace` ignored all unresolved UIDs after the first
allanjude [Sat, 18 May 2019 12:27:22 +0000 (12:27 +0000)]
MFV/ZoL: `zfs userspace` ignored all unresolved UIDs after the first

zfsonlinux/zfs@88cfff182432e4d1c24c877f33b47ee6cf109eee

zfs_main: fix `zfs userspace` squashing unresolved entries

The `zfs userspace` squashes all entries with unresolved numeric
values into a single output entry due to the comparsion always
made by the string name which is empty in case of unresolved IDs.

Fix this by falling to a numerical comparison when either one
of string values is not found. This then compares any numerical
values after all with a name resolved.

Signed-off-by: Pavel Boldin <boldin.pavel@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reported by: clusteradm
Obtained from: ZFS-on-Linux
MFC after: 3 days

4 years agopowerpc64/pmap: NUMA-ize the page pv lock pool to reduce contention
jhibbits [Sat, 18 May 2019 11:14:43 +0000 (11:14 +0000)]
powerpc64/pmap: NUMA-ize the page pv lock pool to reduce contention

It was found during building llvm that the page pv lock pool was seeing very
high contention.  Since the pmap is already NUMA aware, it was surmised that
the domains were referencing similar pages in the different domains.  This
reduces contention to the point of noise in a lockstat(8) run (~51% down to
under 5%), reducing build times by up to 20%.

This doesn't do a perfect domain alignment, just a best-guess based on
hardware available, that the domain is roughly specified in the upper bits
of the PA.  Trying to be more clever would more than likely result in
reduced performance just on the work needed.

MFC after: 2 weeks

4 years agoUse M_NEXTFIT in memguard(9).
markj [Sat, 18 May 2019 02:02:14 +0000 (02:02 +0000)]
Use M_NEXTFIT in memguard(9).

memguard(9) wants to avoid reuse of freed addresses for as long as
possible.  Previously it maintained a racily updated cursor which was
passed to vmem_xalloc(9) as the minimum address.  However, vmem will
not in general return the lowest free address in the arena, so this
trick only really works until the cursor has wrapped around the first
time.

Reported by: alc
Reviewed by: alc
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D17227

4 years agoImplement the M_NEXTFIT allocation strategy for vmem(9).
markj [Sat, 18 May 2019 01:46:38 +0000 (01:46 +0000)]
Implement the M_NEXTFIT allocation strategy for vmem(9).

This is described in the vmem paper: "directs vmem to use the next free
segment after the one previously allocated."  The implementation adds a
new boundary tag type, M_CURSOR, which is linked into the segment list
and precedes the segment following the previous M_NEXTFIT allocation.
The cursor is used to locate the next free segment satisfying the
allocation constraints.

This implementation isn't O(1) since busy tags aren't coalesced, and we
may potentially scan the entire segment list during an M_NEXTFIT
allocation.

Reviewed by: alc
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D17226

4 years agoAdd DragonFly's partition number to fdisk(8) and diskmbr.h
cem [Sat, 18 May 2019 00:22:28 +0000 (00:22 +0000)]
Add DragonFly's partition number to fdisk(8) and diskmbr.h

This change doesn't make any attempt to add support for these slices to the
relevent GEOM classes.  Just register the number in fdisk and the canonical
list of kernel macros (diskmbr.h).

Obtained from: DragonFlyBSD (794d80aa519b394b3174f20776a) (small subset of)

4 years agoGrammar fixes for r347690.
kib [Fri, 17 May 2019 21:18:11 +0000 (21:18 +0000)]
Grammar fixes for r347690.

Submitted by: alc
MFC after: 3 days

4 years agonetmap: align if_ptnet to the changes introduced by r347233
vmaffione [Fri, 17 May 2019 20:29:31 +0000 (20:29 +0000)]
netmap: align if_ptnet to the changes introduced by r347233

This removes non-functional SCTP checksum offload support.
More information in the log message of r347233.

MFC after: 2 weeks

4 years agopowerpc/dtrace: Actually fix stack traces
jhibbits [Fri, 17 May 2019 19:57:08 +0000 (19:57 +0000)]
powerpc/dtrace: Actually fix stack traces

Fix stack unwinding such that requesting N stack frames in lockstat will
actually give you N frames, not anywhere from 0-3 as had been before.

lockstat prints the mutex function instead of the caller as the reported
locker, but the stack frame is detailed enough to find the real caller.

MFC after: 2 weeks

4 years agoAdd a new ioctl for the larger params struct that includes the label.
stevek [Fri, 17 May 2019 19:27:07 +0000 (19:27 +0000)]
Add a new ioctl for the larger params struct that includes the label.

We need to make the find_veriexec_file() function available publicly, so
rename it to mac_veriexec_metadata_find_file_info() and make it non-static.

Bump the version of the veriexec device interface so user space will know
the labelized version of fingerprint loading is available.

Approved by: sjg
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D20295

4 years agoAdd command to get version of the ioctl interface for the veriexec device.
stevek [Fri, 17 May 2019 18:25:53 +0000 (18:25 +0000)]
Add command to get version of the ioctl interface for the veriexec device.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agoRemove the notice that ae(4) will be removed in FreeBSD 13.
brooks [Fri, 17 May 2019 18:16:55 +0000 (18:16 +0000)]
Remove the notice that ae(4) will be removed in FreeBSD 13.

4 years agoBetter formatting for the logpage section
scottl [Fri, 17 May 2019 18:15:47 +0000 (18:15 +0000)]
Better formatting for the logpage section

4 years agoObtain a shared lock instead of exclusive in the MAC/veriexec
stevek [Fri, 17 May 2019 18:13:43 +0000 (18:13 +0000)]
Obtain a shared lock instead of exclusive in the MAC/veriexec
MAC_VERIEXEC_CHECK_PATH_SYSCALL per-MAC policy system call.

When we are checking the status of the fingerprint on a vnode using the
per-MAC-policy syscall, we do not need an exclusive lock on the vnode.

Even if there is more than one thread requesting the status at the same time,
the worst we can end up doing is processing the file more than once.

This can potentially be improved in the future with offloading the fingerprint
evaluation to a separate thread and blocking until the update completes. But
for now the race is acceptable.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agosysctls which should be restricted when securelevel is raised should also
stevek [Fri, 17 May 2019 18:09:48 +0000 (18:09 +0000)]
sysctls which should be restricted when securelevel is raised should also
be restricted when veriexec is enforced.

Add mpo_system_check_sysctl method to mac_veriexec which does this.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agoFix format strings for some debug messages that could have arguments that
stevek [Fri, 17 May 2019 18:06:24 +0000 (18:06 +0000)]
Fix format strings for some debug messages that could have arguments that
are different types across architectures by using %ju and typecasting to
uintmax_t, where appropriate.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agoProtect commands that are considered dangerous with checks for kmem write
stevek [Fri, 17 May 2019 18:02:26 +0000 (18:02 +0000)]
Protect commands that are considered dangerous with checks for kmem write
priv. This allows for MAC/veriexec to prevent apps that are not "trusted"
from using these commands.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agoEnsure we have obtained a lock on the process before calling
stevek [Fri, 17 May 2019 17:50:01 +0000 (17:50 +0000)]
Ensure we have obtained a lock on the process before calling
mac_veriexec_get_executable_flags(). Only try locking/unlocking if the caller
has not already acquired the process lock.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

4 years agoInstead of individual conditional statements to look for each hypervisor
stevek [Fri, 17 May 2019 17:21:32 +0000 (17:21 +0000)]
Instead of individual conditional statements to look for each hypervisor
type, use a table to make it easier to add more in the future, if needed.

Add VirtualBox detection to the table ("VBoxVBoxVBox" is the hypervisor
vendor string to look for.) Also add VM_GUEST_VBOX to the VM_GUEST
enumeration to indicate VirtualBox.

Save the CPUID base for the hypervisor entry that we detected. Driver code
may need to know about it in order to obtain additional CPUID features.

Approved by: bryanv, jhb
Differential Revision: https://reviews.freebsd.org/D16305

4 years agoFree microcode memory later.
kib [Fri, 17 May 2019 17:11:01 +0000 (17:11 +0000)]
Free microcode memory later.

With lockless DI, pmap_remove() requires operational thread lock,
which is initialized at SI_SUB_RUN_QUEUE for thread0.  Move it even
later where APs are started, the moment after which other boot memory
like trampoline stacks is already being freed.

Reported by: gtetlow
Sponsored by: The FreeBSD Foundation
MFC after: 30 days

4 years agopci: ecam: Correctly parse memory and IO region
manu [Fri, 17 May 2019 17:05:16 +0000 (17:05 +0000)]
pci: ecam: Correctly parse memory and IO region

When activating a resource do not compare the resource id to the adress.
Treat IO region as MEMORY region too.

Submitted by: Tuan Phan <tphan@amperecomputing.com> (Original Version)
Sponsored by: Ampere Computing, LLC
Differential Revision: https://reviews.freebsd.org/D20214

4 years agopci: ecam: Do not warn on mismatch of bus_end
manu [Fri, 17 May 2019 17:04:01 +0000 (17:04 +0000)]
pci: ecam: Do not warn on mismatch of bus_end

We cannot know the bus end number before parsing the MCFG table
so don't set the bus_end before that. If the MCFG table doesn't
exist we will set the configuration base address based on the _CBA
value and set the bus_end to the maximal number allowed by PCI.

Sponsored by: Ampere Computing, LLC

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

4 years agoImplement the ffs and fls functions, and their longer counterparts, in
dougm [Fri, 17 May 2019 15:52:17 +0000 (15:52 +0000)]
Implement the ffs and fls functions, and their longer counterparts, in
cpufunc, in terms of __builtin_ffs and the like, for arm64
architectures, and use those, rather than the simple libkern
implementations, in building arm64 kernels.

Tested by: greg_unrelenting.technology (earlier version)
Reviewed by: alc
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D20250

4 years agoFCP-101: correct date of device driver removal.
brooks [Fri, 17 May 2019 15:44:11 +0000 (15:44 +0000)]
FCP-101: correct date of device driver removal.

4 years agoFCP-101: Bump __FreeBSD_version for device removal.
brooks [Fri, 17 May 2019 15:31:28 +0000 (15:31 +0000)]
FCP-101: Bump __FreeBSD_version for device removal.

Bump accidentally omitted from r347924 due to a rebase accident.

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

4 years agoFCP-101: Bump __FreeBSD_version for driver removal.
brooks [Fri, 17 May 2019 15:24:54 +0000 (15:24 +0000)]
FCP-101: Bump __FreeBSD_version for driver removal.

Remove gone_by_fcp101_dev macro.

Remove orphaned comment.

4 years agoFCP-101: Remove xe(4)
brooks [Fri, 17 May 2019 15:24:44 +0000 (15:24 +0000)]
FCP-101: Remove xe(4)

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove wb(4)
brooks [Fri, 17 May 2019 15:24:34 +0000 (15:24 +0000)]
FCP-101: Remove wb(4)

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove vx(4).
brooks [Fri, 17 May 2019 15:24:26 +0000 (15:24 +0000)]
FCP-101: Remove vx(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove txp(4).
brooks [Fri, 17 May 2019 15:24:17 +0000 (15:24 +0000)]
FCP-101: Remove txp(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove tx(4).
brooks [Fri, 17 May 2019 15:24:08 +0000 (15:24 +0000)]
FCP-101: Remove tx(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove tl(4).
brooks [Fri, 17 May 2019 15:24:00 +0000 (15:24 +0000)]
FCP-101: Remove tl(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove sn(4).
brooks [Fri, 17 May 2019 15:23:52 +0000 (15:23 +0000)]
FCP-101: Remove sn(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove sf(4).
brooks [Fri, 17 May 2019 15:23:43 +0000 (15:23 +0000)]
FCP-101: Remove sf(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove pcn(4).
brooks [Fri, 17 May 2019 15:23:34 +0000 (15:23 +0000)]
FCP-101: Remove pcn(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove fe(4).
brooks [Fri, 17 May 2019 15:23:26 +0000 (15:23 +0000)]
FCP-101: Remove fe(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove ex(4).
brooks [Fri, 17 May 2019 15:23:18 +0000 (15:23 +0000)]
FCP-101: Remove ex(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove ep(4).
brooks [Fri, 17 May 2019 15:23:10 +0000 (15:23 +0000)]
FCP-101: Remove ep(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove ed(4).
brooks [Fri, 17 May 2019 15:23:02 +0000 (15:23 +0000)]
FCP-101: Remove ed(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove de(4).
brooks [Fri, 17 May 2019 15:22:54 +0000 (15:22 +0000)]
FCP-101: Remove de(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove cs(4).
brooks [Fri, 17 May 2019 15:22:45 +0000 (15:22 +0000)]
FCP-101: Remove cs(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: Remove bm(4).
brooks [Fri, 17 May 2019 15:20:51 +0000 (15:20 +0000)]
FCP-101: Remove bm(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoFCP-101: remove obsolete 10 and 10/100 Ethernet drivers.
brooks [Fri, 17 May 2019 15:19:12 +0000 (15:19 +0000)]
FCP-101: remove obsolete 10 and 10/100 Ethernet drivers.

Initial commit adding comment to ObsoleteFiles.  Each driver will be
removed in a seperate commit to allow later reverts if required.

FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230

4 years agoRemove unused define.
tychon [Fri, 17 May 2019 13:08:12 +0000 (13:08 +0000)]
Remove unused define.

Sponsored by: Dell EMC Isilon

4 years agoFix integer overflow in r346386.
tychon [Thu, 16 May 2019 22:27:38 +0000 (22:27 +0000)]
Fix integer overflow in r346386.

Sponsored by: Dell EMC Isilon

4 years agoRemove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros.
kib [Thu, 16 May 2019 22:20:54 +0000 (22:20 +0000)]
Remove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros.

In all practical situations, the resolver visibility is static.

Requested by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: so (emaste)
Differential revision: https://reviews.freebsd.org/D20281

4 years agoFix mergemaster after r347638 and the master.passwd / group move.
brd [Thu, 16 May 2019 21:50:12 +0000 (21:50 +0000)]
Fix mergemaster after r347638 and the master.passwd / group move.

Check the legacy directory and use it instead if present.

Install these first if using beinstall.

UPDATING entry to follow.

Approved by: allanjude (mentor, in person)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D20279

4 years agoLinuxKPI: Finalize import of seq_file.
johalun [Thu, 16 May 2019 21:17:18 +0000 (21:17 +0000)]
LinuxKPI: Finalize import of seq_file.

seq_file.h and linux_seq_file.c was imported form ports earlier but
linux_seq_file.c was never compiled in with the module. With this
commit base seq_file will replace ports seq_file and it required a
few modifications to not break functionality and build.

Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week

4 years agoLinuxKPI: Add in_task macro.
johalun [Thu, 16 May 2019 21:07:37 +0000 (21:07 +0000)]
LinuxKPI: Add in_task macro.

This patch is part of D19565

Reviewed by: hps, bwidawsk
Approved by: imp (mentor), hps
Obtained from: bwidawsk
MFC after: 1 week

4 years agoreinstate 4GB DMA boundary workarounds for bge and aac
tychon [Thu, 16 May 2019 20:41:28 +0000 (20:41 +0000)]
reinstate 4GB DMA boundary workarounds for bge and aac

Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20277

4 years agoLinuxKPI: Fix build on powerpc/sparc.
johalun [Thu, 16 May 2019 19:32:11 +0000 (19:32 +0000)]
LinuxKPI: Fix build on powerpc/sparc.

Use cmpset instead of testandset in tasklet lock code.

Reviewed by: hps
Approved by: imp (mentor), hps
Obtained from: hps
MFC after: 1 week

4 years agomips: Implement basic pmap_kenter_device, pmap_kremove_device
cem [Thu, 16 May 2019 19:10:48 +0000 (19:10 +0000)]
mips: Implement basic pmap_kenter_device, pmap_kremove_device

Unbreak mips.BERI_DE4_SDROOT build, which uses device xdma. Device xdma
depends on the pmap_kenter_device APIs.

Reported by: tinderbox (local)
Sponsored by: Dell EMC Isilon

4 years agoFix hostname to be returned in an ICMPv6 NI Reply message defined
hrs [Thu, 16 May 2019 19:09:41 +0000 (19:09 +0000)]
Fix hostname to be returned in an ICMPv6 NI Reply message defined
in RFC 4620, ICMPv6 Node Information Queries.  A vnet jail with an
IPv6 address sent a hostname of the host environment, not the
jail, even if another hostname was set to the jail.

This change can be tested by the following commands:

 # ifconfig epair0 create
 # jail -c -n j1 vnet host.hostname=vnetjail path=/ persist
 # ifconfig epair0b vnet j1
 # ifconfig epair0a inet6 -ifdisabled auto_linklocal up
 # jexec j1 ifconfig epair0b inet6 -ifdisabled auto_linklocal up
 # ping6 -w ff02::1%epair0a

Differential Revision: https://reviews.freebsd.org/D20207
MFC after: 1 week