]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoProcess irelocs for statically linked binaries from crt1 on x86.
Konstantin Belousov [Sat, 13 Oct 2018 23:52:55 +0000 (23:52 +0000)]
Process irelocs for statically linked binaries from crt1 on x86.

This makes statically linked binaries with ifuncs operational.

Reported and tested by: mjg
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (rgrimes)
Differential revision: https://reviews.freebsd.org/D17363

5 years agoelfcopy: delete filter_reloc, it is broken and unnecessary
Ed Maste [Sat, 13 Oct 2018 21:26:07 +0000 (21:26 +0000)]
elfcopy: delete filter_reloc, it is broken and unnecessary

elfcopy contained logic to filter individual relocations in STRIP_ALL
mode.  However, this is not valid; relocations emitted by the linker are
required, unless they apply to an entire section being removed (which is
handled by other logic in elfcopy).

Note that filter_reloc was also buggy: for RELA relocation sections it
operated on uninitialized rel.r_info resulting in invalid operation.

The logic most likely needs to be inverted: instead of removing
relocations because their associated symbols are being removed, we must
keep symbols referenced by relocations.  That said, in practice we do
not encounter this code path today: objects being stripped are either
dynamically linked binaries which retain .dynsym, or static binaries
with no relocations.

Just remove filter_reloc.  This fixes certain cases including statically
linked binaries containing ifuncs.  Stripping binaries with relocations
referencing removed symbols was already broken, and after this change
may still be broken in a different way.

PR: 232176
Reviewed by: kaiw, kib, markj
Approved by: re (rgrimes)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17519

5 years agoamd64: partially depessimize cpu_fetch_syscall_args and cpu_set_syscall_retval
Mateusz Guzik [Sat, 13 Oct 2018 21:18:31 +0000 (21:18 +0000)]
amd64: partially depessimize cpu_fetch_syscall_args and cpu_set_syscall_retval

Vast majority of syscalls take 6 or less arguments. Move handling of other
cases to a fallback function. Similarly, special casing for _syscall
and __syscall
magic syscalls is moved away.

Return is almost always 0. The change replaces 3 branches with 1 in the common
case. Also the 'frame' variable convinces clang not to reload it on each access.

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17542

5 years agoamd64: convert libc bcopy to a C func to avoid future bloat
Mateusz Guzik [Sat, 13 Oct 2018 21:17:28 +0000 (21:17 +0000)]
amd64: convert libc bcopy to a C func to avoid future bloat

The function is of limited use and is an almost a direct clone of
memmove/memcpy (with arguments swapped). Introduction of ERMS variants
of string routines would mean avoidable growth of libc.

bcopy will get redefined to a __builtin_memmove later on with this
symbol only left for compatibility.

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17539

5 years agoamd64: import updated kernel memmove to libc
Mateusz Guzik [Sat, 13 Oct 2018 21:15:47 +0000 (21:15 +0000)]
amd64: import updated kernel memmove to libc

bcopy is left alone as it is expected to be converted to a C func.

Due to header mess ALIGN_TEXT is temporarily defined explicitly in memmove.S

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17538

5 years agostrptime: disallow zero hour for %I (defined by POSIX as [01,12]) and %l
Yuri Pankov [Sat, 13 Oct 2018 16:25:28 +0000 (16:25 +0000)]
strptime: disallow zero hour for %I (defined by POSIX as [01,12]) and %l
(extension, defined in strftime(3) as 1-12).

Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17543

5 years agoMake `mfiutil show progress` print out the elapsed time estimate in a
Allan Jude [Sat, 13 Oct 2018 02:21:23 +0000 (02:21 +0000)]
Make `mfiutil show progress` print out the elapsed time estimate in a
more humanized way

PR: 225993
Submitted by: Enji Cooper <yaneurabeya@gmail.com>
Reviewed by: jhb (previous version)
Approved by: re (rgrimes)

5 years agoDocument that sendfile(2) can return ENOTCAPABLE
Allan Jude [Sat, 13 Oct 2018 02:20:16 +0000 (02:20 +0000)]
Document that sendfile(2) can return ENOTCAPABLE

PR: 232207
Submitted by: Enji Cooper <yaneurabeya@gmail.com>
Approved by: re (rgrimes)

5 years agocxgbe(4): Fix a divide-by-zero that occurs when hw.cxgbe.toecaps_allowed
Navdeep Parhar [Sat, 13 Oct 2018 00:13:24 +0000 (00:13 +0000)]
cxgbe(4): Fix a divide-by-zero that occurs when hw.cxgbe.toecaps_allowed
is set to 0 with a kernel that has both TCP_OFFLOAD and RATELIMIT.

Approved by: re@ (gjb@)
Sponsored by: Chelsio Communications

5 years agocapsicum: provide cap_rights_fde_inline
Mateusz Guzik [Fri, 12 Oct 2018 23:48:10 +0000 (23:48 +0000)]
capsicum: provide cap_rights_fde_inline

Reading caps is in the hot path (on each successful fd lookup), but
completely unnecessarily requires a function call.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoixl/iavf: Update ixl(4) and iavf(4) [previously ixlv] man pages
Eric Joyner [Fri, 12 Oct 2018 22:57:52 +0000 (22:57 +0000)]
ixl/iavf: Update ixl(4) and iavf(4) [previously ixlv] man pages

Since there have been major updates to both drivers in r339338,
refresh the man pages with new and updated information.

Reviewed by:    sbruno@, 0mp@, jeffrey.e.pieper@intel.com, manpages
Approved by: re (gjb@, kib@)
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D15927

5 years agoIn udp_input() when walking the pcblist we can come across
Bjoern A. Zeeb [Fri, 12 Oct 2018 22:51:45 +0000 (22:51 +0000)]
In udp_input() when walking the pcblist we can come across
an inp marked FREED after the epoch(9) changes.
Check once we hold the lock and skip the inp if it is the case.

Contrary to IPv6 the locking of the inp is outside the multicast
section and hence a single check seems to suffice.

PR: 232192
Reviewed by: mmacy, markj
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17540

5 years agoixl/iavf(4): Change ixlv to iavf and update it to use iflib(9)
Eric Joyner [Fri, 12 Oct 2018 22:40:54 +0000 (22:40 +0000)]
ixl/iavf(4): Change ixlv to iavf and update it to use iflib(9)

Finishes the conversion of the 40Gb Intel Ethernet drivers to iflib(9) for
FreeBSD 12.0, and fixes numerous bugs in both ixl(4) and iavf(4).

This commit also re-adds the VF driver to GENERIC since it now compiles and
functions.

The VF driver name was changed from ixlv(4) to iavf(4) because the VF driver is
now intended to be used with future products, not just with Fortville/Fort Park
VFs.

A man page update that documents these drivers is forthcoming in a separate
commit.

Reviewed by:    sbruno@, kbowling@
Tested by:      jeffrey.e.pieper@intel.com
Approved by: re (gjb@)
Relnotes:       yes
Sponsored by:   Intel Corporation
Differential Revision: https://reviews.freebsd.org/D16429

5 years agoamd64: employ MEMMOVE in copyin/copyout
Mateusz Guzik [Fri, 12 Oct 2018 21:59:09 +0000 (21:59 +0000)]
amd64: employ MEMMOVE in copyin/copyout

See r339205 for justification.

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17526

5 years agoAvoid zero-sized kmem_alloc() in vdev_compact_children().
Alexander Motin [Fri, 12 Oct 2018 16:55:28 +0000 (16:55 +0000)]
Avoid zero-sized kmem_alloc() in vdev_compact_children().

The device evacuation code adds a dependency that
vdev_compact_children() be able to properly empty the vdev_child
array by setting it to NULL and zeroing vdev_children.  Under Linux,
kmem_alloc() and related functions return a sentinel pointer rather
than NULL for zero-sized allocations.

This is a part of ZoL port of device removal patch:

commit a1d477c24c7badc89c60955995fd84d311938486
Author: Matthew Ahrens <mahrens@delphix.com>
Ported-by: Tim Chase <tim@chase2k.com>
Approved by: re (kib)
MFC after: 1 week

5 years agoloader.efi: add poweroff command
Toomas Soome [Fri, 12 Oct 2018 16:24:49 +0000 (16:24 +0000)]
loader.efi: add poweroff command

Add poweroff command to make life a bit easier.

Reviewed by: imp, allanjude
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17535

5 years agoCall initializecpucache() before ifuncs are resolved.
Konstantin Belousov [Fri, 12 Oct 2018 16:00:21 +0000 (16:00 +0000)]
Call initializecpucache() before ifuncs are resolved.

The function tweaks CPU capabilities based on the VM platform and
tunables, which affected selection of the cache flush method before
ifuncs were used, and should affect the cache flush in the same way
after ifunc.

PR: 232081
Reported by: phk
Analyzed by: avg
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)

5 years agoInitialize interrupt priority to 0 on all sources.
Ruslan Bukin [Fri, 12 Oct 2018 15:51:41 +0000 (15:51 +0000)]
Initialize interrupt priority to 0 on all sources.

Without this hardware raises an interrupt regardless of any
pending bits set.

This fixes operation on RocketChip and derivatives (e.g. lowRISC).

Approved by: re (kib)
Sponsored by: DARPA, AFRL

5 years agobhyve: emulate CLFLUSH and CLFLUSHOPT.
Konstantin Belousov [Fri, 12 Oct 2018 15:30:15 +0000 (15:30 +0000)]
bhyve: emulate CLFLUSH and CLFLUSHOPT.

Apparently CLFLUSH on mmio can cause VM exit, as reported in the PR.
I do not see that anything useful can be done except emulating page
faults on invalid addresses.

Due to the instruction encoding pecularity, also emulate SFENCE.

PR: 232081
Reported by: phk
Reviewed by: araujo, avg, jhb (all: previous version)
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17482

5 years agoAdd support for the UART device found in lowRISC system-on-a-chip.
Ruslan Bukin [Fri, 12 Oct 2018 15:19:41 +0000 (15:19 +0000)]
Add support for the UART device found in lowRISC system-on-a-chip.

The only source of documentation for this device is verilog,
so driver is minimalistic.

Reviewed by: Dr Jonathan Kimmitt <jrrk2@cam.ac.uk>
Approved by: re (kib)
Sponsored by: DARPA, AFRL

5 years agoAdd ZIO_TYPE_FREE support for indirect vdevs.
Alexander Motin [Fri, 12 Oct 2018 15:14:22 +0000 (15:14 +0000)]
Add ZIO_TYPE_FREE support for indirect vdevs.

Upstream code expects only ZIO_TYPE_READ and some ZIO_TYPE_WRITE
requests to removed (indirect) vdevs, while on FreeBSD there is also
ZIO_TYPE_FREE (TRIM).  ZIO_TYPE_FREE requests do not have the data
buffers, so don't need the pointer adjustment.

PR: 228750, 229007
Reviewed by: allanjude, sef
Approved by: re (kib)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17523

5 years agoReplace libldns's bootstrap dependency on libcrypto with one on libssl
Dag-Erling Smørgrav [Fri, 12 Oct 2018 13:01:17 +0000 (13:01 +0000)]
Replace libldns's bootstrap dependency on libcrypto with one on libssl
(which in turn has a bootstrap dependency on libcrypto).

Submitted by: jkim
Approved by: re (gjb)

5 years agor217592 moved the check for imo in udp_input() into the conditional block
Bjoern A. Zeeb [Fri, 12 Oct 2018 11:30:46 +0000 (11:30 +0000)]
r217592 moved the check for imo in udp_input() into the conditional block
but leaving the variable assignment outside the block, where it is no longer
used. Move both the variable and the assignment one block further in.

This should result in no functional changes. It will however make upcoming
changes slightly easier to apply.

Reviewed by: markj, jtl, tuexen
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17525

5 years agoMove libssl up in the bootstrap order.
Dag-Erling Smørgrav [Fri, 12 Oct 2018 05:42:38 +0000 (05:42 +0000)]
Move libssl up in the bootstrap order.

Submitted by: jkim
Approved by: re (gjb)

5 years agoAdd libssl to libldns for DANE.
Dag-Erling Smørgrav [Fri, 12 Oct 2018 05:27:58 +0000 (05:27 +0000)]
Add libssl to libldns for DANE.

Approved by: re (gjb)

5 years agoAdd a file missed in r339321
Mateusz Guzik [Fri, 12 Oct 2018 00:32:45 +0000 (00:32 +0000)]
Add a file missed in r339321

Approved by: re (implicit)
Sad face: mjg

5 years agoamd64: make memmove and memcpy less slow with mov
Mateusz Guzik [Thu, 11 Oct 2018 23:37:57 +0000 (23:37 +0000)]
amd64: make memmove and memcpy less slow with mov

The reasoning is the same as with the memset change, see r339205

Reviewed by: kib (previous version)
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17441

5 years agoProvide string functions for use before ifuncs get resolved.
Mateusz Guzik [Thu, 11 Oct 2018 23:28:04 +0000 (23:28 +0000)]
Provide string functions for use before ifuncs get resolved.

The change is a no-op for architectures which don't ifunc memset,
memcpy nor memmove.

Convert places which need them. Xen bits by royger.

Reviewed by: kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17487

5 years agolibmemstat: adjust for per-cpu stats after r338899
Mateusz Guzik [Thu, 11 Oct 2018 23:25:14 +0000 (23:25 +0000)]
libmemstat: adjust for per-cpu stats after r338899

Reported by: yuripv
Reviewed by: kib, markj
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17490

5 years agoFix PNP entries for if_ix and if_ixv properly using the IFLIB_PNP_INFO()
Yuri Pankov [Thu, 11 Oct 2018 22:27:12 +0000 (22:27 +0000)]
Fix PNP entries for if_ix and if_ixv properly using the IFLIB_PNP_INFO()
macro.

Reviewed by: imp, sbruno
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17473

5 years agoMODULE_PNP_INFO(9): catch up with r338948, and remove the element size
Yuri Pankov [Thu, 11 Oct 2018 21:18:51 +0000 (21:18 +0000)]
MODULE_PNP_INFO(9): catch up with r338948, and remove the element size
parameter from the man page.

Reviewed by: cem, imp
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17436

5 years agoRestore some of the ctype definitions reported in the PR from pre-CLDR
Yuri Pankov [Thu, 11 Oct 2018 18:30:12 +0000 (18:30 +0000)]
Restore some of the ctype definitions reported in the PR from pre-CLDR
data, namely 0xE000-0xF8FF private use area, and 0xFF00-0xFFF half- and
fullwidth punctuation.

While here, update tools/tools/locale/README based on my experience
rebuilding the locale data.

PR: 225692
Reviewed by: bapt, cem (previous version)
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17471

5 years agoFully restore the GDTR, IDTR, and LDTR after VT-x VM exits.
John Baldwin [Thu, 11 Oct 2018 18:27:19 +0000 (18:27 +0000)]
Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits.

The VT-x VMCS only stores the base address of the GDTR and IDTR.  As a
result, VM exits use a fixed limit of 0xffff for the host GDTR and
IDTR losing the smaller limits set in when the initial GDT is loaded
on each CPU during boot.  Explicitly save and restore the full GDTR
and IDTR contents around VM entries and exits to restore the correct
limit.

Similarly, explicitly save and restore the LDT selector.  VM exits
always clear the host LDTR as if the LDT was loaded with a NULL
selector and a userspace hypervisor is probably using a NULL selector
anyway, but save and restore the LDT explicitly just to be safe.

PR: 230773
Reported by: John Levon <levon@movementarian.org>
Reviewed by: kib
Tested by: araujo
Approved by: re (rgrimes)
MFC after: 1 week

5 years agoAdd fbsd:nokeywords to tools/tools/locale/etc/manual-input.UTF-8.
Yuri Pankov [Thu, 11 Oct 2018 18:26:18 +0000 (18:26 +0000)]
Add fbsd:nokeywords to tools/tools/locale/etc/manual-input.UTF-8.

Approved by: re (gjb), kib (mentor)

5 years agoRemove re-added header files from ObsoleteFiles.inc.
Jung-uk Kim [Thu, 11 Oct 2018 18:24:11 +0000 (18:24 +0000)]
Remove re-added header files from ObsoleteFiles.inc.

Approved by: re (delphij)

5 years agoDisable kernels_autodetect on installation media
Kyle Evans [Thu, 11 Oct 2018 17:18:49 +0000 (17:18 +0000)]
Disable kernels_autodetect on installation media

This feature is disabled on install media as these generally won't have any
interesting kernels to be listed other than the default kernel, so the
potential performance penalty in these situations likely isn't worth it.

Approved by: re (kib)

5 years agoEnable lualoader's kernel autodetection, disabled on install media
Kyle Evans [Thu, 11 Oct 2018 17:17:54 +0000 (17:17 +0000)]
Enable lualoader's kernel autodetection, disabled on install media

As documented in loader.conf(5), kernels_autodetect="YES" will cause the
Lua scripts to effectively scan /boot for directories with a "kernel" file
inside, to be listed in the loader menu.

Approved by: re (kib)

5 years agolualoader: Provide a 'menu' command to redraw the menu at the loader prompt
Kyle Evans [Thu, 11 Oct 2018 17:16:39 +0000 (17:16 +0000)]
lualoader: Provide a 'menu' command to redraw the menu at the loader prompt

Reported by: allanjude
Approved by: re (kib)

5 years agolibusb(3): Update the link to the libusb homepage.
Mateusz Piotrowski [Thu, 11 Oct 2018 13:58:51 +0000 (13:58 +0000)]
libusb(3): Update the link to the libusb homepage.

While here, pet mandoc & igor.

Reviewed by: bcr, hselasky
Approved by: re (kib), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17516

5 years agolld: set sh_link and sh_info for .rela.plt sections
Ed Maste [Thu, 11 Oct 2018 13:19:17 +0000 (13:19 +0000)]
lld: set sh_link and sh_info for .rela.plt sections

ELF spec says that for SHT_REL and SHT_RELA sh_link should reference the
associated string table and sh_info should reference the "section to
which the relocation applies."  ELF Tool Chain's elfcopy / strip use
this (in part) to control whether or not the relocation entry is copied
to the output.

LLVM PR 37538 https://bugs.llvm.org/show_bug.cgi?id=37538

Approved by: re (kib)
Obtained from: llvm r344226 (backported for 6.0)

5 years agoRegenerate: remove GOST, enable DANE-TA now that we have OpenSSL 1.1.1.
Dag-Erling Smørgrav [Thu, 11 Oct 2018 08:14:31 +0000 (08:14 +0000)]
Regenerate: remove GOST, enable DANE-TA now that we have OpenSSL 1.1.1.

Approved by: re (gjb)

5 years agoLoader GELI support, like lua loader, seems to be broken on PowerPC as
Nathan Whitehorn [Thu, 11 Oct 2018 00:54:39 +0000 (00:54 +0000)]
Loader GELI support, like lua loader, seems to be broken on PowerPC as
well as on SPARC64 and can cause boot failures even when no encrypted
disks are present. Presumably, the reasons, while unknown, are the same
and most-likely are the result of some endian-unsafe code. Pending
finding the actual problem, extend the blacklist entry for these parts
of loader on SPARC to also cover all PowerPC platforms.

Approved by: re (kib)

5 years agoPull in a follow-on commit to resolve a deadlock in ZFS sequential
Allan Jude [Wed, 10 Oct 2018 22:59:15 +0000 (22:59 +0000)]
Pull in a follow-on commit to resolve a deadlock in ZFS sequential
resilver (r334844)

MFV/ZoL: Fix deadlock in IO pipeline

commit a76f3d0437e5e974f0f748f8735af3539443b388
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 16 16:46:06 2018 -0700

    Fix deadlock in IO pipeline

    In vdev_queue_aggregate() the zio_execute() bypass should not be
    called under the vdev queue lock.  This can result in a deadlock
    as shown in the stack traces below.

    Drop the vdev queue lock then walk the parents of the aggregate IO
    to determine the list of component IOs to be bypassed.  This can
    be done safely without holding the io_lock since the new aggregate
    IO has not yet been returned and its parents cannot change.

    ---  THREAD 1 ---
    arc_read()
      zio_nowait()
        zio_vdev_io_start()
          vdev_queue_io() <--- mutex_enter(vq->vq_lock)
            vdev_queue_io_to_issue()
              vdev_queue_aggregate()
                zio_execute()
            vdev_queue_io_to_issue()
              vdev_queue_aggregate()
                zio_execute()
                  zio_vdev_io_assess()
                    zio_wait_for_children() <- mutex_enter(zio->io_lock)

    --- THREAD 2 --- (inverse order)
    arc_read()
      zio_change_priority() <- mutex_enter(zio->zio_lock)
        vdev_queue_change_io_priority() <- mutex_enter(vq->vq_lock)

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reported by: ZFS Leadership Meeting
Reviewed by: mav
Approved by: re (kib)
Obtained from: ZFS-on-Linux
MFC after: 2 weeks
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D17495

5 years agoAdd missing sysctls for tuning vdev queue depths for new I/O types
Allan Jude [Wed, 10 Oct 2018 22:55:31 +0000 (22:55 +0000)]
Add missing sysctls for tuning vdev queue depths for new I/O types

This connects new tunables that were added but not exposed in:
r329502 (zpool remove)
r337007 (zpool initialize)

Reviewed by: avg
Approved by: re (kib)
MFC after: 2 weeks
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D17494

5 years agoTry harder to sanitize the environment before running configure.
Dag-Erling Smørgrav [Wed, 10 Oct 2018 22:29:06 +0000 (22:29 +0000)]
Try harder to sanitize the environment before running configure.
Remove a workaround for older Unbound versions that used sbrk.

Approved by: re (gjb)

5 years agoFix a minor typo in loader.conf(5).
Glen Barber [Wed, 10 Oct 2018 20:25:41 +0000 (20:25 +0000)]
Fix a minor typo in loader.conf(5).

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoAdd graphics/drm-legacy-kmod and graphics/drm-stable-kmod to the
Glen Barber [Wed, 10 Oct 2018 19:57:10 +0000 (19:57 +0000)]
Add graphics/drm-legacy-kmod and graphics/drm-stable-kmod to the
list of packages to include on the dvd installer.

Approved by: re (marius, rgrimes)
Sponsored by: The FreeBSD Foundation

5 years agoResolve a hang in ZFS during vnode reclaimation
Allan Jude [Wed, 10 Oct 2018 19:39:47 +0000 (19:39 +0000)]
Resolve a hang in ZFS during vnode reclaimation

This is caused by a deadlock between zil_commit() and zfs_zget()

Add a way for zfs_zget() to break out of the retry loop in the common case

PR: 229614
Reported by: grembo, Andreas Sommer, many others
Tested by: Andreas Sommer, Vicki Pfau
Reviewed by: avg (no objection)
Approved by: re (gjb)
MFC after: 2 months
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D17460

5 years agoRemove extra thread_exit() call left after r329802.
Alexander Motin [Wed, 10 Oct 2018 16:34:53 +0000 (16:34 +0000)]
Remove extra thread_exit() call left after r329802.

spa_condense_indirect_thread() is no longer a thread function, but just
a callback for new zthr KPI.

Submitted by: allanjude
Approved by: re (gjb)
MFC after: 3 days

5 years agoUpdate Armada 38x UART device tree binding
Marcin Wojtas [Wed, 10 Oct 2018 10:34:17 +0000 (10:34 +0000)]
Update Armada 38x UART device tree binding

Recent changes in Linux updated Marvell Armada 38x
UART compatible string. As a result the FreeBSD driver
(uart_dev_snps) does not probe. This commit fixes the
situation, however not applying any functional modification
to the driver methods.

Approved by: re (kib)
Obtained from: Semihalf

5 years agoUpgrade to 1.8.1.
Dag-Erling Smørgrav [Wed, 10 Oct 2018 08:53:47 +0000 (08:53 +0000)]
Upgrade to 1.8.1.

Approved by: re (kib)

5 years agoImproved substitution logic for Unbound man pages.
Dag-Erling Smørgrav [Wed, 10 Oct 2018 08:20:14 +0000 (08:20 +0000)]
Improved substitution logic for Unbound man pages.

Approved by: re (kib)

5 years agoUpdate Makefile for 1.8.0, apologies for the breakage.
Dag-Erling Smørgrav [Wed, 10 Oct 2018 08:19:11 +0000 (08:19 +0000)]
Update Makefile for 1.8.0, apologies for the breakage.

Approved by: re (kib)

5 years agoUpgrade Unbound to 1.8.0. More to follow.
Dag-Erling Smørgrav [Wed, 10 Oct 2018 07:55:06 +0000 (07:55 +0000)]
Upgrade Unbound to 1.8.0.  More to follow.

Approved by: re (kib)

5 years agoAdd myself to committers-src.dot and calendar.freebsd.
Yuri Pankov [Wed, 10 Oct 2018 00:20:40 +0000 (00:20 +0000)]
Add myself to committers-src.dot and calendar.freebsd.

Approved by: re (gjb), kib (mentor)

5 years agoDon't include the broken riscv64sf TARGET_ARCH in universe.
Brooks Davis [Tue, 9 Oct 2018 22:22:15 +0000 (22:22 +0000)]
Don't include the broken riscv64sf TARGET_ARCH in universe.

riscv64sf has been broken due to duplicate symbols for months and
degrades the quality of universe builds.  Remove it until this is
resolved leaving a comment to it is not re-added.

PR: 232085
Reviewed by: emaste
Approved by: re (gjb, kib)
Sponsored by: DARPA, AFRL

5 years agoUpdate head from ALPHA8 to ALPHA9 as part of the 12.0-RELEASE
Glen Barber [Tue, 9 Oct 2018 21:54:58 +0000 (21:54 +0000)]
Update head from ALPHA8 to ALPHA9 as part of the 12.0-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

5 years agoMerge the remainder of the projects/openssl111 branch to head.
Glen Barber [Tue, 9 Oct 2018 21:28:26 +0000 (21:28 +0000)]
Merge the remainder of the projects/openssl111 branch to head.

- Update OpenSSL to version 1.1.1.
- Update Kerberos/Heimdal API for OpenSSL 1.1.1 compatibility.
- Bump __FreeBSD_version.

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoRegenerated assorted syscall related files after:
Brooks Davis [Tue, 9 Oct 2018 20:42:17 +0000 (20:42 +0000)]
Regenerated assorted syscall related files after:
 - r327895: Implement 'domainset'...
 - r329876: Use linux types for linux-specific syscalls

Diff generated with:
find . -name syscalls.conf | xargs dirname | \
    xargs -n1 -I DIR make -C DIR sysent

Approved by: re (kib)
Sponsored by: DARPA, AFRL

5 years agoUse mbuf defines to construct csum offload masks rather than literals
Stephen Hurd [Tue, 9 Oct 2018 20:16:19 +0000 (20:16 +0000)]
Use mbuf defines to construct csum offload masks rather than literals

Reviewed by: erj
Approved by: re (rgrimes)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17442

5 years agoVendor import of Unbound 1.8.1.
Dag-Erling Smørgrav [Tue, 9 Oct 2018 19:42:34 +0000 (19:42 +0000)]
Vendor import of Unbound 1.8.1.

5 years agoFix portability issues with the Capsicum patch committed in r339216:
Dag-Erling Smørgrav [Tue, 9 Oct 2018 19:27:42 +0000 (19:27 +0000)]
Fix portability issues with the Capsicum patch committed in r339216:

- Wrap access to pw_change and pw_expire in the appropriate #ifdefs.
- Wrap calls to login_cap(3) API in appropriate #ifdefs.
- Add wrapper for transferring time_t, which is still only 32 bits wide
  on FreeBSD i386.
- Use a temporary variable to deserialize size_t.

Approved by: re (gjb)

5 years agoUpdate ACPICA to 20181003.
Jung-uk Kim [Tue, 9 Oct 2018 18:40:36 +0000 (18:40 +0000)]
Update ACPICA to 20181003.

Approved by: re (gjb)

5 years agoSwitch ntp's embedded libevent to 2.1.18
Ed Maste [Tue, 9 Oct 2018 18:35:45 +0000 (18:35 +0000)]
Switch ntp's embedded libevent to 2.1.18

For OpenSSL 1.1.1 compatibility.

In Makefile.inc1 add (to the existing similar cases) a hack to handle
dependencies across the migration.

Reviewed by: jhb
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation.
Differential Revision: https://reviews.freebsd.org/D17481

5 years agoUpdate sendmail to work with the OpenSSL 1.1 API.
John Baldwin [Tue, 9 Oct 2018 17:44:25 +0000 (17:44 +0000)]
Update sendmail to work with the OpenSSL 1.1 API.

Submitted by: jkim
Approved by: re (gjb), gshapiro
Obtained from: ports/mail/sendmail/files/patch-tls.c

5 years agoRegenerate ssh_namespace.h for OpenSSL 1.1.1 update
Ed Maste [Tue, 9 Oct 2018 17:29:31 +0000 (17:29 +0000)]
Regenerate ssh_namespace.h for OpenSSL 1.1.1 update

5 years agoUpdate Apache Serf to 1.3.9 to support OpenSSL 1.1.1.
John Baldwin [Tue, 9 Oct 2018 15:28:06 +0000 (15:28 +0000)]
Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1.

Approved by: re (rgrimes)

5 years agoMFH r338661 through r339253.
Glen Barber [Tue, 9 Oct 2018 14:27:55 +0000 (14:27 +0000)]
MFH r338661 through r339253.

Sponsored by: The FreeBSD Foundation

5 years agolibevent: eliminate in-tree usage of arc4random_addrandom
Ed Maste [Tue, 9 Oct 2018 14:27:40 +0000 (14:27 +0000)]
libevent: eliminate in-tree usage of arc4random_addrandom

Apply r338059 to newly-added libevent 2.1.18.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoCopy libevent sources to contrib
Ed Maste [Tue, 9 Oct 2018 14:05:11 +0000 (14:05 +0000)]
Copy libevent sources to contrib

To replace the libevent embedded in ntp, for OpenSSL 1.1.1 compat.

Approved by: re (gjb)

5 years agoThere are three places where we return from a function which entered an
Jonathan T. Looney [Tue, 9 Oct 2018 13:26:06 +0000 (13:26 +0000)]
There are three places where we return from a function which entered an
epoch section without exiting that epoch section. This is bad for two
reasons: the epoch section won't exit, and we will leave the epoch tracker
from the stack on the epoch list.

Fix the epoch leak by making sure we exit epoch sections before returning.

Reviewed by: ae, gallatin, mmacy
Approved by: re (gjb, kib)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D17450

5 years agofollowing "Setup, Conventions, and Traditions" (Committer's Guide);
Vinícius Zavam [Tue, 9 Oct 2018 07:22:14 +0000 (07:22 +0000)]
following "Setup, Conventions, and Traditions" (Committer's Guide);

5. share/misc/committers-ports.dot
  * reflecting my privileges only for ports/, with mentors' entries;
  * did test it with dot (graphics/graphviz) to check accent support.
9. usr.bin/calendar/calendars/calendar.freebsd
  * added birth date + place.

'calendar.freebsd' offers UTF-8, so I added my entry using proper accents.

Reviewed by: rene (mentor)
Approved by: re (gjb), araujo (mentor), beat (mentor)
Differential Revision: https://reviews.freebsd.org/D17469

5 years agoopenssh: regenerate ssh-namespace.h after r339213 and r339216
Ed Maste [Tue, 9 Oct 2018 03:11:59 +0000 (03:11 +0000)]
openssh: regenerate ssh-namespace.h after r339213 and r339216

Reported by: des
Approved by: re (rgrimes)

5 years agoFix the pNFS server's reporting of disk space usage for the "#<path>" case.
Rick Macklem [Tue, 9 Oct 2018 01:10:50 +0000 (01:10 +0000)]
Fix the pNFS server's reporting of disk space usage for the "#<path>" case.

The pNFS server would report the total disk space used and free for all
of the DSs, even when certain DSs are assigned to the file system via
the "#<path>" suffix used in the "nfsd -p" option argument.
This patch fixes this case. It only reports usage for the file system
that the argument vnode resides on. This is consistent with the non-pNFS
NFSv4 server. In NFSv4 it is possible to have subtrees on other file
systems, but these are not included in the usage information for NFSv4.

Approved by: re (gjb)

5 years agocrypto: Don't limit to TLSv1 only
John Baldwin [Mon, 8 Oct 2018 23:23:09 +0000 (23:23 +0000)]
crypto: Don't limit to TLSv1 only

Approved by: re (rgrimes, gjb)
Obtained from: upstream commit e94f50bbbe7318eec5b6b165ff73d94bbc9d20b0

5 years agoFix the distribution path for -ALPHA builds, which are under
Glen Barber [Mon, 8 Oct 2018 19:48:58 +0000 (19:48 +0000)]
Fix the distribution path for -ALPHA builds, which are under
the snapshots directory, not releases.

Reported by: David Marec david.marec _at_ davenulle _dot_ org
Approved by: re (rgrimes)
Sponsored by: The FreeBSD Foundation

5 years agoFix a mismerge from head to projects/openssl111.
Glen Barber [Mon, 8 Oct 2018 19:39:05 +0000 (19:39 +0000)]
Fix a mismerge from head to projects/openssl111.

r339213 was cherry-picked back to head from the project branch, which
caused a conflict.  This commit properly records the mergeinfo from
head.

r339205 was missed, and r339214 is required for reintegration.

Sponsored by: The FreeBSD Foundation

5 years agoAdd support for relocations in RISC-V kernel modules to kldxref.
John Baldwin [Mon, 8 Oct 2018 19:15:58 +0000 (19:15 +0000)]
Add support for relocations in RISC-V kernel modules to kldxref.

Reviewed by: br, markj
Approved by: re (gjb)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17415

5 years agoDisallow zero day of month from strptime("%d").
Konstantin Belousov [Mon, 8 Oct 2018 18:45:40 +0000 (18:45 +0000)]
Disallow zero day of month from strptime("%d").

It is required by POSIX, specified in our man page, and followed by
Linux.

PR: 232072
Reported by: miguel_tete17@hotmail.com
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week

5 years agoMFH r339206-r339212, r339215-r339239
Glen Barber [Mon, 8 Oct 2018 18:06:40 +0000 (18:06 +0000)]
MFH r339206-r339212, r339215-r339239

Sponsored by: The FreeBSD Foundation

5 years agoFix r336951 mismerge -- use of uninitialized variable.
Alexander Motin [Mon, 8 Oct 2018 15:19:03 +0000 (15:19 +0000)]
Fix r336951 mismerge -- use of uninitialized variable.

Reported by: tsoome
Approved by: re (gjb)
MFC after: 3 days

5 years agoMFV r339226 (peter): Record merge of serf-1.3.9.
Glen Barber [Mon, 8 Oct 2018 15:16:04 +0000 (15:16 +0000)]
MFV r339226 (peter): Record merge of serf-1.3.9.

Sponsored by: The FreeBSD Foundation

5 years agoAdd missing steering rules for virtual function, VF, in mlx4en(4) driver.
Hans Petter Selasky [Mon, 8 Oct 2018 14:52:21 +0000 (14:52 +0000)]
Add missing steering rules for virtual function, VF, in mlx4en(4) driver.

When acting as a VF it is required to add steering rules for all unicast
addresses. Even if promiscious mode is selected. Else incoming data packets
will be dropped.

MFC after: 3 days
Approved by: re (gjb)
Sponsored by: Mellanox Technologies

5 years agoVendor import serf-1.3.9 (now Apache serf)
Peter Wemm [Mon, 8 Oct 2018 08:12:28 +0000 (08:12 +0000)]
Vendor import serf-1.3.9 (now Apache serf)

5 years agoem/igb: Do not print link state messages
Eric van Gyzen [Mon, 8 Oct 2018 01:28:46 +0000 (01:28 +0000)]
em/igb:  Do not print link state messages

These messages are totally redundant with the iflib messages.
They're also not very useful, since they don't include the
interface name.

Discussed with: shurd
Approved by: re (rgrimes)
Sponsored by: Dell EMC Isilon

5 years agoTeach truss how to display shm_open(2), shm_unlink(2)
Allan Jude [Sun, 7 Oct 2018 19:50:44 +0000 (19:50 +0000)]
Teach truss how to display shm_open(2), shm_unlink(2)

Submitted by: Thomas Munro <munro@ip9.org>
Reviewed by: tuexen, kib
Approved by: re (rgrimes)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D17457

5 years agoAddress the warning regarding duplicate option 'GEOM_PART_GPT' when
Michael Tuexen [Sun, 7 Oct 2018 15:54:13 +0000 (15:54 +0000)]
Address the warning regarding duplicate option 'GEOM_PART_GPT' when
configuring kernels for i386, amd64, and arm64.
The 'GEOM_PART_GPT' option was added to the DEFAULTS configuration
in r337967.

Approved by: re (kib@)
Reviewed by: ler@
Differential Revision: https://reviews.freebsd.org/D17458
Sponsored by: Netflix, Inc.

5 years agolualoader: Honor boot_* variables at lua init
Kyle Evans [Sun, 7 Oct 2018 15:28:50 +0000 (15:28 +0000)]
lualoader: Honor boot_* variables at lua init

For non-UEFI systems, boot.config(5) may have -s or -v specified for
single-user and verbose boot respectively. These were not being properly
taken into account and reflected in the "Boot Options" submenu. When we
initialize core.lua, we'll record boot_single and boot_verbose as we do ACPI
and consider these the system defaults.

Reported by: David Wolfskill <david@catwhisker.org>
Approved by: re (kib)

5 years agoAvoid truncating unrecognised parameters when reporting them.
Michael Tuexen [Sun, 7 Oct 2018 15:13:47 +0000 (15:13 +0000)]
Avoid truncating unrecognised parameters when reporting them.
This resulted in sending malformed packets.

Approved by: re (kib@)
MFC after: 1 week

5 years agoEnable TCP Fast Open support for PPC platforms.
Michael Tuexen [Sun, 7 Oct 2018 12:56:05 +0000 (12:56 +0000)]
Enable TCP Fast Open support for PPC platforms.

Reviewed by: kbowling@, andreast@
Approved by: re (kib@)
Differential Revision: https://reviews.freebsd.org/D17407

5 years agoEnsure that the ips_localout counter is incremented for
Michael Tuexen [Sun, 7 Oct 2018 11:26:15 +0000 (11:26 +0000)]
Ensure that the ips_localout counter is incremented for
locally generated SCTP packets sent over IPv4. This make
the behaviour consistent with IPv6.

Reviewed by: ae@, bz@, jtl@
Approved by: re (kib@)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17406

5 years agolualoader: Create a module blacklist, add DRM modules to it
Kyle Evans [Sun, 7 Oct 2018 01:53:43 +0000 (01:53 +0000)]
lualoader: Create a module blacklist, add DRM modules to it

This is a step in the process of easing migration into the new world order
of DRM drivers. Strongly encourage users towards loading DRM modules via
rc.conf(5) instead of loader.conf(5) by failing the load from loader(8).
Users so inclined may wipe out the blacklist via module_blacklist="" in
loader.conf(5), and it is expected that these modules will eventually be
removed from the blacklist. They may still be loaded as dependencies of
other modules or explicitly via the loader prompt, but this should not be a
major problem.

Approved by: re (rgrimes)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16914

5 years agosshd: address capsicum issues
Ed Maste [Sat, 6 Oct 2018 21:32:55 +0000 (21:32 +0000)]
sshd: address capsicum issues

* Add a wrapper to proxy login_getpwclass(3) as it is not allowed in
  capability mode.
* Cache timezone data via caph_cache_tzdata() as we cannot access the
  timezone file.
* Reverse resolve hostname before entering capability mode.

PR: 231172
Submitted by: naito.yuichiro@gmail.com
Reviewed by: cem, des
Approved by: re (rgrimes)
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D17128

5 years agopowerpc/pseries: EOI interrupts in XICS by setting lowest priority
Justin Hibbits [Sat, 6 Oct 2018 18:51:49 +0000 (18:51 +0000)]
powerpc/pseries: EOI interrupts in XICS by setting lowest priority

Discussing with Benjamin Herrenschmidt, OPAL_INT_GET_XIRR masks the
returned priority, so must be resumed before more interrupts can be
handled at this priority.  Since there are only two priorities used in
FreeBSD, we know that the previous priority in an EOI will always be
0xff (lowest priority).

Reviewed by: nwhitehorn
Approved by: re(rgrimes)
Differential Revision: https://reviews.freebsd.org/D17361

5 years agoRemove BUGS section from nscd.conf(5) man page. This was missed in r339194.
Edward Tomasz Napierala [Sat, 6 Oct 2018 17:40:14 +0000 (17:40 +0000)]
Remove BUGS section from nscd.conf(5) man page.  This was missed in r339194.

Approved by: re (rgrimes)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL

5 years agoopenssh: cherry-pick OpenSSL 1.1.1 compatibility
Ed Maste [Sat, 6 Oct 2018 14:38:34 +0000 (14:38 +0000)]
openssh: cherry-pick OpenSSL 1.1.1 compatibility

Compatibility with existing OpenSSL versions is maintained.

Upstream commits:
482d23bcac upstream: hold our collective noses and use the openssl-1.1.x
48f54b9d12 adapt -portable to OpenSSL 1.1x API
86e0a9f3d2 upstream: use only openssl-1.1.x API here too
a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest
cce8cbe0ed Fix openssl-1.1 fallout for --without-openssl.

Trivial conflicts in sshkey.c and test_sshkey.c were resolved.

Connect libressl-api-compat.c to the build, and regenerate config.h

Reviewed by: des
Approved by: re (rgrimes)
MFC after: 2 seeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17444

5 years agopowerpc64/powernv: Don't mask MSIs in OPAL
Justin Hibbits [Sat, 6 Oct 2018 03:20:26 +0000 (03:20 +0000)]
powerpc64/powernv: Don't mask MSIs in OPAL

Summary:
Discussing with Benjamin Herrenschmidt, MSIs, and edge-triggered
interrupts in general, must not be masked in XICS and XIVE, else
subsequent interrupts may be ignored.

Testing locally on my Talos II (single CPU, 18-core POWER9), NVMe now
works with MSI, improving read throughput by ~70% (900MB/s -> 1.67GB/s,
with 64MB block size) over INTx interrupts, and snd_hda(4) now will
actually play music with MSI.  Previously, snd_hda(4) would not receive
interrupts, timing out, and declaring the channels dead.

This has also been tested by Kevin Bowling, and others, with great
success.  Kevin reported NVMe unusable on his Talos II prior to this
patch.

Reviewed by: nwhitehorn, kbowling
Approved by: re(rgrimes)
Differential Revision: https://reviews.freebsd.org/D17356

5 years agoFix the test prohibiting jails from sharing IP addresses.
Jamie Gritton [Sat, 6 Oct 2018 02:10:32 +0000 (02:10 +0000)]
Fix the test prohibiting jails from sharing IP addresses.

It's not supposed to be legal for two jails to contain the same IP address,
unless both jails contain only that one address.  This is the behavior
documented in jail(8), and is there to prevent confusion when multiple
jails are listening on IADDR_ANY.

VIMAGE jails (now the default for GENERIC kernels) test this correctly,
but non-VIMAGE jails have been performing an incomplete test when nested
jails are used.

Approved by: re@ (kib@)
MFC after: 5 days

5 years agolibcrypto: have buildinf.h depend on Makefile
Ed Maste [Fri, 5 Oct 2018 20:49:54 +0000 (20:49 +0000)]
libcrypto: have buildinf.h depend on Makefile

So that it will be regenerated after Makefile changes affecting the
file's content - specifically, the OpenSSL 1.1.1 update adds a DATE
macro which did not exist previously.

Sponsored by: The FreeBSD Foundation

5 years agoFix information about $firewall_myservices
Danilo G. Baio [Fri, 5 Oct 2018 20:35:43 +0000 (20:35 +0000)]
Fix information about $firewall_myservices

After r273201 it is supported "/{udp,tcp,proto}" suffix into
$firewall_myservices, and in the rc.conf the information is outdated.

Reviewed by: bcr, rgrimes
Approved by: re (gjb), doc (bcr), src (rgrimes)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17338