]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoDon't call dlopen(3) for built-in NSS types - "cache", "compat",
trasz [Mon, 15 Oct 2018 17:50:02 +0000 (17:50 +0000)]
Don't call dlopen(3) for built-in NSS types - "cache", "compat",
"dns", "files", "db", and "nis". It saves some path lookups during
binary startup.

Reviewed by: markj
Approved by: re (gjb, kib)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17557

5 years agoiavf(4): Finish rename/rebrand internally
erj [Mon, 15 Oct 2018 17:23:41 +0000 (17:23 +0000)]
iavf(4): Finish rename/rebrand internally

Rename functions and variables from ixlv to iavf to match the
user-facing name change. There shouldn't be any functional changes
with this change, but this may help with browsing the source code
and reducing diffs in the future.

Submitted by:   kbowling@
Reviewed by:    erj@, sbruno@
Approved by: re (gjb@)
Differential Revision:  https://reviews.freebsd.org/D17544

5 years agoRemove stale libcasper(3) shared libraries following the
gjb [Mon, 15 Oct 2018 17:16:47 +0000 (17:16 +0000)]
Remove stale libcasper(3) shared libraries following the
OpenSSL 1.1.1 update.

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

5 years agoInitialize SPRG0 before its first possible use
luporl [Mon, 15 Oct 2018 16:43:07 +0000 (16:43 +0000)]
Initialize SPRG0 before its first possible use

At early boot, PCPU_GET(), that obtains a pointer from SPRG0, was being
used with SPRG0 not yet initialized. If it pointed to an invalid
address, the machine would hang.

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

5 years agoFix deadlock when destroying VLANs.
hselasky [Mon, 15 Oct 2018 10:29:29 +0000 (10:29 +0000)]
Fix deadlock when destroying VLANs.

Synchronizing the epoch before freeing the multicast addresses while holding
the VLAN_XLOCK() might lead to a deadlock. Use deferred freeing of the VLAN
multicast addresses to resolve deadlock. Backtrace:

Thread1:
epoch_block_handler_preempt()
ck_epoch_synchronize_wait()
epoch_wait_preempt()
vlan_setmulti()
vlan_ioctl()
in6m_release_task()
gtaskqueue_run_locked()
gtaskqueue_thread_loop()
fork_exit()
fork_trampoline()

Thread2:
sleepq_switch()
sleepq_wait()
_sx_xlock_hard()
_sx_xlock()
in6_leavegroup()
in6_purgeaddr()
if_purgeaddrs()
if_detach_internal()
if_detach()
vlan_clone_destroy()
if_clone_destroyif()
if_clone_destroy()
ifioctl()
kern_ioctl()
sys_ioctl()
amd64_syscall()
fast_syscall_common()
syscall()

Differential revision: https://reviews.freebsd.org/D17496
Reviewed by: slavash, mmacy
Approved by: re (kib)
Sponsored by: Mellanox Technologies

5 years agoAdd extra parentheses to fix "versrcreach" opcode, (oif != NULL) should
ae [Mon, 15 Oct 2018 10:25:34 +0000 (10:25 +0000)]
Add extra parentheses to fix "versrcreach" opcode, (oif != NULL) should
not be used as condition for ternary operator.

Submitted by: Tatsuki Makino <tatsuki_makino at hotmail dot com>
Approved by: re (kib)
MFC after: 1 week

5 years agoAdd .Xrs to kqueue(2) from pdfork(2) and procdesc(4), to make EVFILT_PROCDESC
trasz [Sun, 14 Oct 2018 18:42:54 +0000 (18:42 +0000)]
Add .Xrs to kqueue(2) from pdfork(2) and procdesc(4), to make EVFILT_PROCDESC
easier to find.

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

5 years agozfs: fix a panic after failed mount
mjg [Sun, 14 Oct 2018 16:14:01 +0000 (16:14 +0000)]
zfs: fix a panic after failed mount

r338927("zfs: depessimize zfs_root with rmlocks") failed to error check
the mount before caching root vnode.

Results in crashes in rrw_enter_read_impl tracing back to zfs_mount.

Reported by: Mike Tancsa
Tested by: allanjude
Approved by: re (kib)

5 years agoem/igb/ix(4): Port two Tx/Rx fixes made to ixl in r339338
erj [Sun, 14 Oct 2018 05:09:43 +0000 (05:09 +0000)]
em/igb/ix(4): Port two Tx/Rx fixes made to ixl in r339338

- Fix assert/panic on receive when Jumbo Frames are enabled.

From the commit I made to ixl:
"It turns out that *_isc_rxd_available is supposed to return how many
packets are available to be cleaned on the rx ring. This patch removes
a section of code where if the budget argument is 1, the function would return
one if there was a descriptor available, not necessarily a packet.

This is okay in regular mtu 1500 traffic since the max frame size is less
than the configured receive buffer size (2048), but this doesn't work when
received packets can span more than one  descriptor, as is the case when the
mtu is 9000 and the receive buffer size is 4096."

- Fix possible Tx hang because *_isc_txd_credits_update returns incorrect result

From the commit by Krzysztof Galazka to ixl: "Function isc_txd_update_credits
called with clear set to false should return 1 if there are TX descriptors
already handled by HW. It was always returning 0 causing troubles with UDP TX
traffic."

PR:             231659
Reported by:    lev@
Approved by: re (gjb@)
Sponsored by:   Intel Corporation

5 years agoMakefile.inc1: clean up dependencies after r339348
emaste [Sun, 14 Oct 2018 00:29:57 +0000 (00:29 +0000)]
Makefile.inc1: clean up dependencies after r339348

r339348 switched bcopy from .s to .c.  Add ad-hoc dependency cleanup
as done for similar cases.

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

5 years agoProcess irelocs for statically linked binaries from crt1 on x86.
kib [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
emaste [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
mjg [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
mjg [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
mjg [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
yuripv [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
allanjude [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
allanjude [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
np [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
mjg [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
erj [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
bz [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)
erj [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
mjg [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().
mav [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
tsoome [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.
kib [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.
br [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.
kib [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.
br [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.
mav [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
des [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
bz [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.
des [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.
des [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
mjg [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
mjg [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.
mjg [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
mjg [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()
yuripv [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
yuripv [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
yuripv [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.
jhb [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.
yuripv [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.
jkim [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
kevans [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
kevans [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
kevans [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.
0mp [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
emaste [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.
des [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
nwhitehorn [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
allanjude [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
allanjude [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.
des [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).
gjb [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
gjb [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
allanjude [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.
mav [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
mw [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.
des [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.
des [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.
des [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.
des [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.
yuripv [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 [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
gjb [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.
gjb [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 [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
shurd [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 agoFix portability issues with the Capsicum patch committed in r339216:
des [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.
jkim [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
emaste [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.
jhb [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
emaste [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.
jhb [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.
gjb [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
emaste [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
emaste [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
jtl [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);
egypcio [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
emaste [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.
rmacklem [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
jhb [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
gjb [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.
gjb [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.
jhb [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").
kib [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
gjb [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.
mav [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.
gjb [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.
hselasky [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 [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
vangyzen [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)
allanjude [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
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
kevans [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.
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.
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
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