]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMerge ^/head r357931 through r357965.
dim [Sat, 15 Feb 2020 15:05:25 +0000 (15:05 +0000)]
Merge ^/head r357931 through r357965.

4 years agoMerge commit 221c5af4e from llvm git (by Nico Weber):
dim [Sat, 15 Feb 2020 15:03:26 +0000 (15:03 +0000)]
Merge commit 221c5af4e from llvm git (by Nico Weber):

  Fix a -Wbitwise-conditional-parentheses warning in
  _LIBUNWIND_ARM_EHABI libunwind builds

  ```
  src/UnwindCursor.hpp:1344:51: error: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses]
    _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0;  // Use enum?
~~~~~~~~~~~ ^
  src/UnwindCursor.hpp:1344:51: note: place parentheses around the '|' expression to silence this warning
    _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0;  // Use enum?
    ^
(          )
  src/UnwindCursor.hpp:1344:51: note: place parentheses around the '?:' expression to evaluate it first
    _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0;  // Use enum?
    ^
    (                )
  ```

  But `0 |` is a no-op for either of those two interpretations, so I
  think what was meant here was

  ```
    _info.flags = (isSingleWordEHT ? 1 : 0) | (scope32 ? 0x2 : 0);  // Use enum?
  ```

  Previously, if `isSingleWordEHT` was set, bit 2 would never be set.
  Now it is. From what I can tell, the only thing that checks these
  bitmask is ProcessDescriptors in Unwind-EHABI.cpp, and that only
  cares about bit 1, so in practice this shouldn't have much of an
  effect.

  Differential Revision: https://reviews.llvm.org/D73890

This fixes the above errors when building libunwind for arm variants.

4 years agoMerge ^/vendor/llvm-project/release-10.x up to its last change (upstream
dim [Sat, 15 Feb 2020 14:58:40 +0000 (14:58 +0000)]
Merge ^/vendor/llvm-project/release-10.x up to its last change (upstream
commit llvmorg-10.0.0-rc2-0-g90c78073f73), bump versions, and update
build glue.

4 years agoTentatively apply D23691, which takes LINKER_FREEBSD_VERSION from the
dim [Sat, 15 Feb 2020 14:53:26 +0000 (14:53 +0000)]
Tentatively apply D23691, which takes LINKER_FREEBSD_VERSION from the
numerical field after the dash.  This avoids re-bootstrapping of the
linker, when only the git commit hash changes.

4 years agoVendor import of llvm-project branch release/10.x
dim [Fri, 14 Feb 2020 21:24:03 +0000 (21:24 +0000)]
Vendor import of llvm-project branch release/10.x
llvmorg-10.0.0-rc2-0-g90c78073f73.

4 years agoRemove unused utility script.
dim [Fri, 14 Feb 2020 21:05:15 +0000 (21:05 +0000)]
Remove unused utility script.

4 years agoMerge ^/head r357921 through r357930.
dim [Fri, 14 Feb 2020 19:33:48 +0000 (19:33 +0000)]
Merge ^/head r357921 through r357930.

4 years agoMerge ^/head r357855 through r357920.
dim [Fri, 14 Feb 2020 19:32:58 +0000 (19:32 +0000)]
Merge ^/head r357855 through r357920.

4 years agoRemove /usr/include/ssp from BSD.include.dist after r356356
dim [Fri, 14 Feb 2020 19:31:24 +0000 (19:31 +0000)]
Remove /usr/include/ssp from BSD.include.dist after r356356

This avoids having to delete it every time with "make delete-old".

PR: 242950
MFC after: 2 weeks
X-MFC-With: r356356

4 years agoUpgrade to OpenSSH 7.9p1.
emaste [Fri, 14 Feb 2020 19:06:59 +0000 (19:06 +0000)]
Upgrade to OpenSSH 7.9p1.

MFC after: 2 months
Sponsored by: The FreeBSD Foundation

4 years agosshd: add upgrade process note about TCP wrappers
emaste [Fri, 14 Feb 2020 18:59:50 +0000 (18:59 +0000)]
sshd: add upgrade process note about TCP wrappers

We need to add user-facing deprecation notices for TCP wrappers; start
with a note in the upgrade process docmentation.

Sponsored by: The FreeBSD Foundation

4 years agodtc: re-apply r353961, r354115
kevans [Fri, 14 Feb 2020 18:50:03 +0000 (18:50 +0000)]
dtc: re-apply r353961, r354115

I missed in final review of r357923's diff that these ones hadn't yet been
sent upstream and inadvertently reverted them. =-( Re-apply now.

4 years agoPull in latest fixes from dtc, up to 0060471
kevans [Fri, 14 Feb 2020 18:46:34 +0000 (18:46 +0000)]
Pull in latest fixes from dtc, up to 0060471

This includes a small battery of /memreserve/ fixes to make sure dtc is
properly writing these regions into the output file and reading them back
out.

As of this update, dtc will now also assume common defaults for -I/-O if
only one is specified; namely, dts for one implies dtb for the other and
vice versa (Requested by: jhibbits, preserves GPL dtc behavior too).

MFC after: 1 week

4 years agoopenssh: add a note about libwrap in config.h
emaste [Fri, 14 Feb 2020 17:05:35 +0000 (17:05 +0000)]
openssh: add a note about libwrap in config.h

LIBWRAP is defined by the Makefile based on MK_TCP_WRAPPERS and should
not be defined in config.h.

PR: 210141
Sponsored by: The FreeBSD Foundation

4 years agosysctl(9): properly use xor in ENFORCE_FLAGS macro
kaktus [Fri, 14 Feb 2020 16:56:59 +0000 (16:56 +0000)]
sysctl(9): properly use xor in ENFORCE_FLAGS macro

Assert on not specifying any of the (soon to be) required flags as well
 as specifying both of them.

Pointed out by: cem, hselasky
Reviewed by: hselasky, kib
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23678

4 years agoAdd support for Hygon NTB PCI device in ntb_hw_amd driver.
mav [Fri, 14 Feb 2020 15:04:56 +0000 (15:04 +0000)]
Add support for Hygon NTB PCI device in ntb_hw_amd driver.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23565

4 years agoAdd Hygon PCI ID and description for AHCI SATA controller.
mav [Fri, 14 Feb 2020 14:55:40 +0000 (14:55 +0000)]
Add Hygon PCI ID and description for AHCI SATA controller.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23556

4 years agocommitters-ports: add koobs@ information, somewhat belatedly
kevans [Fri, 14 Feb 2020 14:03:44 +0000 (14:03 +0000)]
committers-ports: add koobs@ information, somewhat belatedly

4 years agoamd64: only check for error != 0 in the inlined part of l1d flush check
mjg [Fri, 14 Feb 2020 13:14:19 +0000 (13:14 +0000)]
amd64: only check for error != 0 in the inlined part of l1d flush check

this replaces the following near the syscall exit:
cmp    $0x39,%rax
ja     0xffffffff8108f82c
movabs $0x200001800060005,%rcx
bt     %rax,%rcx
jae    0xffffffff8108f82c

with:
test   %edi,%edi
jne    0xffffffff8091a49c

4 years agoMerge audit and systrace checks
mjg [Fri, 14 Feb 2020 13:09:41 +0000 (13:09 +0000)]
Merge audit and systrace checks

This further shortens the syscall routine by not having to re-check after
the system call.

4 years agoAnnotate branches in the syscall path
mjg [Fri, 14 Feb 2020 13:08:46 +0000 (13:08 +0000)]
Annotate branches in the syscall path

This in particular significantly shortens amd64_syscall, which otherwise
keeps jumping forward over 2KB of code in total.

Note some of these branches should be either eliminated altogether or
coalesced.

4 years agor357895: fix typo in the relocation name for i386 IRELATIVE.
kib [Fri, 14 Feb 2020 12:59:27 +0000 (12:59 +0000)]
r357895: fix typo in the relocation name for i386 IRELATIVE.

Reported by: antoine
Sponsored by: The FreeBSD Foundation
MFC after: 6 days

4 years agolockmgr: add a change missed in r357907
mjg [Fri, 14 Feb 2020 11:56:50 +0000 (11:56 +0000)]
lockmgr: add a change missed in r357907

4 years agofd: annotate finstall with prediction branches
mjg [Fri, 14 Feb 2020 11:22:12 +0000 (11:22 +0000)]
fd: annotate finstall with prediction branches

4 years agolockmgr: rename lock_fast_path to lock_flags
mjg [Fri, 14 Feb 2020 11:21:28 +0000 (11:21 +0000)]
lockmgr: rename lock_fast_path to lock_flags

The routine is not much of a fast path and the flags name better describes
its purpose.

4 years agolockmgr: retire the unused lockmgr_unlock_fast_path routine
mjg [Fri, 14 Feb 2020 11:20:25 +0000 (11:20 +0000)]
lockmgr: retire the unused lockmgr_unlock_fast_path routine

4 years agoAdd basic IPDIVERT tests.
melifaro [Fri, 14 Feb 2020 09:36:35 +0000 (09:36 +0000)]
Add basic IPDIVERT tests.

Reviewed by: lwhsu,kp
Differential Revision: https://reviews.freebsd.org/D23316

4 years agoProperly fix GCC build in r357867
lwhsu [Fri, 14 Feb 2020 09:25:29 +0000 (09:25 +0000)]
Properly fix GCC build in r357867

Submitted by: kib
Sponsored by: The FreeBSD Foundation

4 years agoncurses: correct check for gcc >= 5.0
kevans [Fri, 14 Feb 2020 04:16:22 +0000 (04:16 +0000)]
ncurses: correct check for gcc >= 5.0

The hack in question is intended to workaround seemingly bogus #line markers
in cpp output. As far as I can tell, llvm cpp doesn't do this by default, so
there's no reason to add -P.

In our /bin/sh, the main incantation should be placed in a sub-shell in
order to properly pipe the output to fgrep.

The main motivation for this change is admittedly to stop emitting the noise
about clang not being gcc in make -s buildworld

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

4 years agou_char -> vm_prot_t in a couple of places, NFC
kevans [Fri, 14 Feb 2020 02:22:08 +0000 (02:22 +0000)]
u_char -> vm_prot_t in a couple of places, NFC

The latter is a typedef of the former; the typedef exists and these bits are
representing vmprot values, so use the correct type.

Submitted by: sigsys@gmail.com
MFC after: 3 days

4 years agoExclude modifier keys from keyboard repeat logic.
hselasky [Fri, 14 Feb 2020 00:29:21 +0000 (00:29 +0000)]
Exclude modifier keys from keyboard repeat logic.
This restores USB keyboard driver behaviour prior to r357861.

Requested by: jkim@
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoAdd a KASSERT that there's no outstanding CCBs when we call camperiphfree. We
imp [Fri, 14 Feb 2020 00:13:23 +0000 (00:13 +0000)]
Add a KASSERT that there's no outstanding CCBs when we call camperiphfree. We
know that if there are any outstanding CCBs, then when they dereference the path
that's freed at the bottom of camperiphfree there will be some flavor of
panic. This moves that eventual panic to a traceback of when we free the last
reference on the device, which is earlier but may not be early enough.

4 years agoxpt_release_simq_timeout is unused. Remove it.
imp [Fri, 14 Feb 2020 00:12:59 +0000 (00:12 +0000)]
xpt_release_simq_timeout is unused. Remove it.

4 years agoHandle non-plt IRELATIVE relocations, at least for x86.
kib [Thu, 13 Feb 2020 23:42:09 +0000 (23:42 +0000)]
Handle non-plt IRELATIVE relocations, at least for x86.

lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc.

Reported, reviewed, and tested by: dim (amd64, previous version)
Discussed with: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23652

4 years agoReturn success, instead of ESRCH, from pthread_cancel(3) applied to the
kib [Thu, 13 Feb 2020 23:22:12 +0000 (23:22 +0000)]
Return success, instead of ESRCH, from pthread_cancel(3) applied to the
exited but not yet joined thread.

Before, if the thread exited but was not yet joined, we returned
ESRCH.

According to IEEE Std 1003.1™-2017 recommendation in the
description of pthread_cancel(3):
  If an implementation detects use of a thread ID after the end of its
  lifetime, it is recommended that the function should fail and report
  an [ESRCH] error.
So it seems desirable to not return ESRCH until the lifetime of the
thread ID ends.  According to the section 2.9.2 Thread IDs,
  The lifetime of a thread ID ends after the thread terminates if it
  was created with the detachstate attribute set to
  PTHREAD_CREATE_DETACHED or if pthread_detach() or pthread_join()
  has been called for that thread.
In other words, lifetime for thread ID of exited but not yet joined thread
did not ended yet.

Prompted by: cperciva
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoFix handling of WAITFAIL in vm_page_grab() and vm_page_grab_pages().
markj [Thu, 13 Feb 2020 23:18:35 +0000 (23:18 +0000)]
Fix handling of WAITFAIL in vm_page_grab() and vm_page_grab_pages().

After sleeping through a memory shortage, we must return NULL rather
than retry.

Discussed with: jeff
Reported by: pho
Sponsored by: The FreeBSD Foundation

4 years agoUpdate the zone-global count of cached items in bucket_cache_reclaim().
markj [Thu, 13 Feb 2020 23:15:21 +0000 (23:15 +0000)]
Update the zone-global count of cached items in bucket_cache_reclaim().

This was missed in r351673.  The count is used to enfore cache limits,
which are rarely used.

Discussed with: jeff
Sponsored by: The FreeBSD Foundation

4 years agoDon't check the auth algorithm for GCM.
jhb [Thu, 13 Feb 2020 23:04:11 +0000 (23:04 +0000)]
Don't check the auth algorithm for GCM.

The upstream OpenSSL changes only set the cipher for GCM since the
authentication is redundant, and changes to OCF will soon remove the
GCM authentication algorithm constants entirely for the same reason.
In addition, ktls_create_session() already validates these fields and
wouldn't pass down an invalid auth_algorithm value to any drivers or
ktls backends.

Reviewed by: hselasky
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23671

4 years agoRemove the per-TXQ tls_wrs stat.
jhb [Thu, 13 Feb 2020 22:55:45 +0000 (22:55 +0000)]
Remove the per-TXQ tls_wrs stat.

It duplicated the kern_tls_records stat and was not conditional on NIC
TLS being enabled.

Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23670

4 years agovfs: use mac fastpath for lookup, open, read, write, mmap
mjg [Thu, 13 Feb 2020 22:22:55 +0000 (22:22 +0000)]
vfs: use mac fastpath for lookup, open, read, write, mmap

4 years agoPartially decompose priv_check by adding priv_check_cred_vfs_generation
mjg [Thu, 13 Feb 2020 22:22:15 +0000 (22:22 +0000)]
Partially decompose priv_check by adding priv_check_cred_vfs_generation

During buildkernel there are very frequent calls to priv_check and they
all are for PRIV_VFS_GENERATION (coming from stat/fstat).

This results in branching on several potential privileges checking if
perhaps that's the one which has to be evaluated.

Instead of the kitchen-sink approach provide a way to have commonly used
privs directly evaluated.

4 years agomac: implement fast path for checks
mjg [Thu, 13 Feb 2020 22:19:17 +0000 (22:19 +0000)]
mac: implement fast path for checks

All checking routines walk a linked list of all modules in order to determine
if given hook is installed. This became a significant problem after mac_ntpd
started being loaded by default.

Implement a way perform checks for select hooks by testing a boolean.

Use it for priv_check and priv_grant, which are constantly called from priv_check.

The real fix would use hotpatching, but the above provides a way to know when
to do it.

4 years agoInline jailed().
mjg [Thu, 13 Feb 2020 22:16:30 +0000 (22:16 +0000)]
Inline jailed().

It is constantly called from priv_check.

4 years agoAnnotate suser_enabled as __read_mostly
mjg [Thu, 13 Feb 2020 22:16:02 +0000 (22:16 +0000)]
Annotate suser_enabled as __read_mostly

It is read a lot in priv code.

4 years agoSince r357804 pcpu zones are required to use zalloc_pcpu(). Prior to this
jeff [Thu, 13 Feb 2020 21:10:17 +0000 (21:10 +0000)]
Since r357804 pcpu zones are required to use zalloc_pcpu().  Prior to this
it was only required if you were zeroing.  Switch to these interfaces.

Reviewed by: mjg

4 years agoFix a case where ub_seq would fail to be set if the cross bucket was
jeff [Thu, 13 Feb 2020 20:58:51 +0000 (20:58 +0000)]
Fix a case where ub_seq would fail to be set if the cross bucket was
flushed due to memory pressure.

Reviewed by: markj
Differential Revision: http://reviews.freebsd.org/D23614

4 years agoAdd more precise SMR entry asserts.
jeff [Thu, 13 Feb 2020 20:50:21 +0000 (20:50 +0000)]
Add more precise SMR entry asserts.

4 years agodiff: fix segfault with --tabsize and no/malformed argument
kevans [Thu, 13 Feb 2020 20:23:55 +0000 (20:23 +0000)]
diff: fix segfault with --tabsize and no/malformed argument

--tabsize was previously listed as optional_argument, but didn't account for
the optionality of it in the argument handling. This is irrelevant -- the
manpage doesn't indicate that the argument is optional, and indeed there's
no clear interpretation of omitting the argument because there's no other
side effect of --tabsize.

The "malformed" argument part of the header on this message is simply
referring to usage like this:

% diff --tabsize 4 A B

With an optional_argument, the argument must be attached to the parameter
directly (e.g. --tabsize=4), so the argument is effectively NULL with the
above invocation as if no argument had been passed.

PR: 243974
Submitted by: fehmi noyan isi <fnoyanisi yahoo com> (diff.c portion)
MFC after: 3 days

4 years agoMerge r357872 from the clang1000-import branch:
dim [Thu, 13 Feb 2020 19:29:57 +0000 (19:29 +0000)]
Merge r357872 from the clang1000-import branch:

Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
and cp(4).

These are false positives, since some of the driver source has been
deliberately obfuscated.

MFC after: 3 days

4 years agoMerge r357864 from the clang1000-import branch:
dim [Thu, 13 Feb 2020 19:28:30 +0000 (19:28 +0000)]
Merge r357864 from the clang1000-import branch:

Fix the following -Werror warning from clang 10.0.0 in sconfig:

sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
                                exit (-1);
                                ^
sbin/sconfig/sconfig.c:907:6: note: previous statement is here
                        } else
                          ^

The intent was to group the exit() call with the previous fprintf()
call.

MFC after: 3 days

4 years agoDisable new clang 10.0.0 warnings about misleading indentation in ce(4)
dim [Thu, 13 Feb 2020 19:25:49 +0000 (19:25 +0000)]
Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
and cp(4).

These are false positives, since some of the driver source has been
deliberately obfuscated.

4 years agohyperv: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:12:07 +0000 (19:12 +0000)]
hyperv: Add Hygon Dhyana support.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23563

4 years agoecc_inject: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:10:51 +0000 (19:10 +0000)]
ecc_inject: Add Hygon Dhyana support.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23561

4 years agoamdsbwd, intpm: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:09:24 +0000 (19:09 +0000)]
amdsbwd, intpm: Add Hygon Dhyana support.

Initialize the FCH SMBus controller for Hygon Dhyana CPU.
Set the vendor of the FCH description via the exact CPU vendor.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23558

4 years agoamdpm: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:07:42 +0000 (19:07 +0000)]
amdpm: Add Hygon Dhyana support.

Submitted by: Pu Wen <puwen@hygon.cn>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23557

4 years agoFix GCC build.
lwhsu [Thu, 13 Feb 2020 19:05:19 +0000 (19:05 +0000)]
Fix GCC build.

Sponsored by: The FreeBSD Foundation

4 years agobhyve, bhyvectl: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:05:14 +0000 (19:05 +0000)]
bhyve, bhyvectl: Add Hygon Dhyana support.

Submitted by: Pu Wen <puwen@hygon.cn>
Reviewed by: jhb
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23554

4 years agovmm: Add Hygon Dhyana support.
kib [Thu, 13 Feb 2020 19:03:12 +0000 (19:03 +0000)]
vmm: Add Hygon Dhyana support.

Submitted by: Pu Wen <puwen@hygon.cn>
Discussed with: grehan
Reviewed by: jhb (previous version)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23553

4 years agoFix the following -Werror warning from clang 10.0.0 in sconfig:
dim [Thu, 13 Feb 2020 18:37:17 +0000 (18:37 +0000)]
Fix the following -Werror warning from clang 10.0.0 in sconfig:

sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
                                exit (-1);
                                ^
sbin/sconfig/sconfig.c:907:6: note: previous statement is here
                        } else
                          ^

The intent was to group the exit() call with the previous fprintf()
call.

MFC after: 3 days

4 years agoaddr2line: use stdbool.h header for bool
emaste [Thu, 13 Feb 2020 16:17:05 +0000 (16:17 +0000)]
addr2line: use stdbool.h header for bool

Presumably a bool definition is obtained via header contamination on
FreeBSD-CURRENT.  Found while trying to upstream FreeBSD addr2line
changes - the FreeBSD 11.2 CI build failed there.

Reported by: Cirrus-CI, upstream ELF Tool Chain
MFC with: r357844
Sponsored by: The FreeBSD Foundation

4 years agoImprove USB gaming keyboard support.
hselasky [Thu, 13 Feb 2020 16:03:12 +0000 (16:03 +0000)]
Improve USB gaming keyboard support.

Add support for decoding pressed keys as a bitmap. The keys in the
bitmap are described in the interface specific HID descriptor. Some
keyboards even have multiple input interfaces, only using the bitmap
method when the event array is full. That typically means when more
than seven keys are pressed simultaneously.

The internals of the USB keyboard driver have been slightly reworked
to keep track of all keys in a single bitmap having 256 bits. This
bitmap is then divided into blocks of 64-bits as an optimisation.

Simplify automatic key repeat logic, because only the last key pressed
can be repeated.

PR: 224592
PR: 233884
Tested by: Alex V. Petrov <alexvpetrov@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoRevert r357343:
pfg [Thu, 13 Feb 2020 15:42:14 +0000 (15:42 +0000)]
Revert r357343:
services: Add PROFInet and EtherCAT.

Both are admitedly very niche features and no known users exist currently.
I am doing a further review/update of the services file (see D23621) and
both of these are not likely to be considered.

4 years agosesutil: fix Coverity CIDs
asomers [Thu, 13 Feb 2020 15:28:56 +0000 (15:28 +0000)]
sesutil: fix Coverity CIDs

1411604: file descriptor leak
1411586: memory leaks, null dereference on ENOMEM

Reported by: Coverity Scan
Coverity CIDs: 14116041411586
Reviewed by: trasz
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D23651

4 years agosack_newdata and snd_recover hold the same value. Therefore, use only
tuexen [Thu, 13 Feb 2020 15:14:46 +0000 (15:14 +0000)]
sack_newdata and snd_recover hold the same value. Therefore, use only
a single instance: use snd_recover also where sack_newdata was used.

Submitted by: Richard Scheffenegger
Differential Revision: https://reviews.freebsd.org/D18811

4 years agotests: Enable net tests
kp [Thu, 13 Feb 2020 14:09:09 +0000 (14:09 +0000)]
tests: Enable net tests

We have a number of tests in the net subdirectory that were not executed. List
the net directory so we run those tests.

4 years agoWhitespace cleanup. No functional change.
tuexen [Thu, 13 Feb 2020 13:58:34 +0000 (13:58 +0000)]
Whitespace cleanup. No functional change.

Sponsored by: Netflix, Inc.

4 years agoMerge ^/head r357662 through r357854.
dim [Thu, 13 Feb 2020 12:52:24 +0000 (12:52 +0000)]
Merge ^/head r357662 through r357854.

4 years agoCleanup gsched tool and geom_sched.so library after r356185.
dim [Thu, 13 Feb 2020 11:00:20 +0000 (11:00 +0000)]
Cleanup gsched tool and geom_sched.so library after r356185.

4 years agoUse INT instead of string for the ints. Because the string "I" was right, the
imp [Thu, 13 Feb 2020 03:37:11 +0000 (03:37 +0000)]
Use INT instead of string for the ints. Because the string "I" was right, the
old code appeared to work. This was a cut and paste error.

Noticed by: rpokala@

4 years agoAdd myself (freqlabs) as a src committer
freqlabs [Thu, 13 Feb 2020 01:42:13 +0000 (01:42 +0000)]
Add myself (freqlabs) as a src committer

Approved by: mav (mentor)
MFC after: 3 days

4 years agoConvert rotating and unmapped_io to a DA flag
imp [Thu, 13 Feb 2020 01:23:44 +0000 (01:23 +0000)]
Convert rotating and unmapped_io to a DA flag

Rotating and unmapped_io are really da flags. Convert them to a flag so it will
be reported with the other flags for the device. Deprecate the .rotating and
.unmapped_io sysctls in FreeBSD 14 and remove the softc ints.

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

4 years agoExport the current da flags as bitfield
imp [Thu, 13 Feb 2020 01:23:32 +0000 (01:23 +0000)]
Export the current da flags as bitfield

Export the current flags. They can be useful to other programs wanting to do
special thigns for removable or similar devices.

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

4 years agoFix typo introduced with r347534 (cap_sysctl additions).
dim [Wed, 12 Feb 2020 23:54:38 +0000 (23:54 +0000)]
Fix typo introduced with r347534 (cap_sysctl additions).

This ensures the old libcap_sysctl.so.1 gets cleaned up when running
"make delete-old-libs".

4 years agobhyve: move virtio-net header processing to pci_virtio_net
vmaffione [Wed, 12 Feb 2020 22:44:18 +0000 (22:44 +0000)]
bhyve: move virtio-net header processing to pci_virtio_net

This patch cleans up the API between the net frontends (e1000,
virtio-net) and the net backends (tap and netmap).
We move the virtio-net header stripping/prepending to the
virtio-net code, where this functionality belongs.
In this way, the netbe_send() and netbe_recv() signatures
can have const struct iov * rather than struct iov *.

Reviewed by: grehan, bcr, aleksandr.fedorov@itglobal.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23342

4 years agoefiloader: don't execute hooks when setting currdev/loaddev
kevans [Wed, 12 Feb 2020 22:29:08 +0000 (22:29 +0000)]
efiloader: don't execute hooks when setting currdev/loaddev

We still need to set the hooks to prevent improper manipulations thereafter
at the loader prompt, but as it is we're actively preventing loaddev from
being set correctly in some circumstances (ZFS in particular) and doing more
work than needed with currdev -- that hook in particular validates it as a
correct device, which we can assume isn't needed in this context.

Reviewed by: imp, sigsys@gmail.com
Submitted/Diagnosed by: sigsys@gmail.com
Differential Revision: https://reviews.freebsd.org/D23390

4 years agoaddr2line: Handle DW_AT_ranges in compile units
emaste [Wed, 12 Feb 2020 21:52:10 +0000 (21:52 +0000)]
addr2line: Handle DW_AT_ranges in compile units

Based on original submission by Marat Radchenko in ELF Tool Chain
ticket #545, rebased and updated by Tiger Gao.

PR: 217736
Submitted by: Marat Radchenko <marat@slonopotamus.org>
Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23501

4 years ago* Fix flaking lle tests by filtering out non-relevant rtsock messages.
melifaro [Wed, 12 Feb 2020 21:16:30 +0000 (21:16 +0000)]
* Fix flaking lle tests by filtering out non-relevant rtsock messages.
* Consistently use RTM_DECLARE_ROOT_TEST() macro.
* Temporarily remove iftype validation from IPv6 lle notifications.

Reported by: kp

4 years agonetipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu
mjg [Wed, 12 Feb 2020 20:18:29 +0000 (20:18 +0000)]
netipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu

PR: 244077
Reported by: lwhsu
Fixes: r357805 ("amd64: store per-cpu allocations subtracted by __pcpu")
4 years agodiff.1: Fix style & document -y as extension to POSIX
0mp [Wed, 12 Feb 2020 20:06:41 +0000 (20:06 +0000)]
diff.1: Fix style & document -y as extension to POSIX

- Long options must be stylized with the Fl macro as well.

Reviewed by: bapt
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D23642

4 years agosys/kern sysent: re-add dependency on capabilities.conf
kevans [Wed, 12 Feb 2020 19:06:34 +0000 (19:06 +0000)]
sys/kern sysent: re-add dependency on capabilities.conf

r356868 inadvertently removed this, so changes to capabilities.conf were no
longer considered for being outdated.

4 years agoregen sysent after r357831, r357838
emaste [Wed, 12 Feb 2020 19:05:10 +0000 (19:05 +0000)]
regen sysent after r357831, r357838

Capability mode changes allowing fdatasync and getloginclass.

Sponsored by: The FreeBSD Foundation

4 years agoAllow getloginclass in capability mode
emaste [Wed, 12 Feb 2020 18:59:00 +0000 (18:59 +0000)]
Allow getloginclass in capability mode

As with e.g. getgroups and getlogin it allows querying current process
credential state.

Reported by: sigsys@gmail.com via kevans
Sponsored by: The FreeBSD Foundation

4 years agofusefs: fix some memory leaks in the tests.
asomers [Wed, 12 Feb 2020 18:11:07 +0000 (18:11 +0000)]
fusefs: fix some memory leaks in the tests.

Oddly, most of these were not detected by Coverity.

Reported by: Coverity (one of them, anyway)
Coverity CID: 1404490
MFC after: 2 weeks

4 years agoMake the warning for deprecated NO_ variables an error.
brooks [Wed, 12 Feb 2020 18:09:20 +0000 (18:09 +0000)]
Make the warning for deprecated NO_ variables an error.

Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS as deprecated in 2014 with a warning added for each one
found. Turn these into error in preperation for removal of compatability
support before FreeBSD 13.

This was previously committed in r354909 and reverted in r355011 due to
unforseen impacts on ports.  I've since corrected all amd64 and i386
ports reported in prior runs as well as instance of these variables I
found via grep.

4 years agoTag pjdfstest symlink with pkgbase package
emaste [Wed, 12 Feb 2020 17:37:32 +0000 (17:37 +0000)]
Tag pjdfstest symlink with pkgbase package

As with the rest of pjdfstest, tag the symlink with package=tests.
The tests -> . symlink seems a little strange but that's independent
of pkgbase.

Sponsored by: The FreeBSD Foundation

4 years agotag /etc/rmt symlink with pkgbase package
emaste [Wed, 12 Feb 2020 17:30:09 +0000 (17:30 +0000)]
tag /etc/rmt symlink with pkgbase package

For historical reasons the "remote magtape protocol module" rmt gets
invoked as /etc/rmt, which is a symlink to /usr/sbin/rmt.  Put it in the
utilities package, as /usr/sbin/rmt is.

Sponsored by: The FreeBSD Foundation

4 years agoAllow fdatasync in capability mode
emaste [Wed, 12 Feb 2020 17:12:26 +0000 (17:12 +0000)]
Allow fdatasync in capability mode

fdatasync is essentially a subset of fsync (and may be exactly fsync,
depending on filesystem and development effort) and operates only on
a provided fd.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoDon't panic under INVARIANTS when we can't allocate memory for storing
tuexen [Wed, 12 Feb 2020 17:05:10 +0000 (17:05 +0000)]
Don't panic under INVARIANTS when we can't allocate memory for storing
a vtag in time wait.
This issue was found by running syzkaller.

MFC after: 1 week

4 years agoMark the socket as disconnected when freeing the association the first
tuexen [Wed, 12 Feb 2020 17:02:15 +0000 (17:02 +0000)]
Mark the socket as disconnected when freeing the association the first
time.
This issue was found by running syzkaller.

MFC after: 1 week

4 years agointerp_lua: fix bogus indentation, NFC
kevans [Wed, 12 Feb 2020 16:10:00 +0000 (16:10 +0000)]
interp_lua: fix bogus indentation, NFC

4 years agolualoader: disable autoboot on high-level interpreter errors
kevans [Wed, 12 Feb 2020 16:09:01 +0000 (16:09 +0000)]
lualoader: disable autoboot on high-level interpreter errors

If we hit an error at this level, we are almost certainly not in any kind
of sane state where autoboot can do the right thing. Instead of letting it
try and probably failing, disable autoboot so they immediately get kicked
into a loader prompt for manual remediation/diagnosis.

Reviewed by: tsoome
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23611

4 years agoelfcopy: set ELF OS/ABI field when converting from binary
emaste [Wed, 12 Feb 2020 15:59:59 +0000 (15:59 +0000)]
elfcopy: set ELF OS/ABI field when converting from binary

PR: 228934
Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Reviewed by: markj, jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23504

4 years agoLets get the real correct version.. gessh. I need
rrs [Wed, 12 Feb 2020 15:26:56 +0000 (15:26 +0000)]
Lets get the real correct version.. gessh. I need
more coffee evidently.

Sponsored by: Netflix

4 years agoImplement vm.pmap.kernel_maps for RISC-V
mhorne [Wed, 12 Feb 2020 14:06:02 +0000 (14:06 +0000)]
Implement vm.pmap.kernel_maps for RISC-V

This is taken from the arm64 version, with the following simplifications:

- Our current pmap implementation uses a 3-level paging scheme
- The "mode" field has been omitted since RISC-V PTEs don't encode
  typical mode attributes

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23594

4 years agoRISC-V: un-ifdef vm.kvm_size and vm.kvm_free
mhorne [Wed, 12 Feb 2020 13:58:37 +0000 (13:58 +0000)]
RISC-V: un-ifdef vm.kvm_size and vm.kvm_free

Fix formatting and add CTLFLAG_MPSAFE.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D23522

4 years agoOpps committed the wrong ratelimit version in the
rrs [Wed, 12 Feb 2020 13:37:53 +0000 (13:37 +0000)]
Opps committed the wrong ratelimit version in  the
whitespace cleanup.. Restore it to the proper version.

Sponsored by: Netfilx Inc.

4 years agoWhite space cleanup -- remove trailing tab's or spaces
rrs [Wed, 12 Feb 2020 13:31:36 +0000 (13:31 +0000)]
White space cleanup -- remove trailing tab's or spaces
from any line.

Sponsored by: Netflix Inc.

4 years agoWhitespace, remove from three files trailing white
rrs [Wed, 12 Feb 2020 13:07:09 +0000 (13:07 +0000)]
Whitespace, remove from three files trailing white
space (leftover presents from emacs).

Sponsored by: Netflix Inc.

4 years agoThis small fix makes it so we properly follow
rrs [Wed, 12 Feb 2020 13:04:19 +0000 (13:04 +0000)]
This small fix makes it so we properly follow
the RFC and only enable ECN when both the
CWR and ECT bits our set within the SYN packet.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D23645

4 years agoRemove all trailing white space from the BBR/Rack fold. Bits
rrs [Wed, 12 Feb 2020 12:40:06 +0000 (12:40 +0000)]
Remove all trailing white space from the BBR/Rack fold. Bits
left around by emacs (thanks emacs).