]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agocaroot: switch to using echo+shell glob to enumerate certs
kevans [Sun, 23 Aug 2020 23:56:57 +0000 (23:56 +0000)]
caroot: switch to using echo+shell glob to enumerate certs

This solves an issue on stable/12 that causes certs to not get installed.
ls is apparently not in PATH during installworld, so TRUSTED_CERTS ends up
blank and nothing gets installed. We don't really require anything
ls-specific, though, so let's just simplify it.

MFC after: 3 days

3 years agonet80211: improve media information for VHT5GHZ
bz [Sun, 23 Aug 2020 21:42:23 +0000 (21:42 +0000)]
net80211: improve media information for VHT5GHZ

Improve ieee80211_media_setup(), media2mode(), and
ieee80211_rate2media() for VHT5GHZ at least.

Reviewed by: adrian, gnn
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26089

3 years agonet80211: set_vht_extchan() reverse order to always return best
bz [Sun, 23 Aug 2020 21:37:20 +0000 (21:37 +0000)]
net80211: set_vht_extchan() reverse order to always return best

In set_vht_extchan() the checks are performed in the order of VHT20/40/80.
That means if a channel has a lower and higheer VHT flag set we would
return the lower first.
We normally do not set more than one VHT flag so this change is supposed
to be a NOP but follows the logical thinking order of returning the best
first. Also we nowhere assert a single VHT flag so make sure we'll not
be stuck with VHT20 when we could do more.

While here add the debugging printfs for VHT160 and VHT80P80 which still
need doing once we deal with a driver at that level.

Reviewed by: adrian, gnn
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision: https://reviews.freebsd.org/D26088

3 years agovfs: validate ndp state after the lookup
mjg [Sun, 23 Aug 2020 21:06:41 +0000 (21:06 +0000)]
vfs: validate ndp state after the lookup

The intent is to remove known-to-be-nops NDFREE calls after many lookups.

3 years agovfs: convert nameiop into an enum
mjg [Sun, 23 Aug 2020 21:05:39 +0000 (21:05 +0000)]
vfs: convert nameiop into an enum

While here change the field size from long to int and move it into the
gap next to cn_flags.

Shrinks struct componentname from 64 to 56 bytes on amd64.

3 years agovfs: support denying access in vaccess_vexec_smr
mjg [Sun, 23 Aug 2020 21:05:06 +0000 (21:05 +0000)]
vfs: support denying access in vaccess_vexec_smr

3 years agovfs: factor away doomed vnode handling into vdropl_final
mjg [Sun, 23 Aug 2020 21:04:35 +0000 (21:04 +0000)]
vfs: factor away doomed vnode handling into vdropl_final

3 years agoprocctl(8): usermode bits to force LA58/LA57 on exec.
kib [Sun, 23 Aug 2020 20:44:15 +0000 (20:44 +0000)]
procctl(8): usermode bits to force LA58/LA57 on exec.

Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoamd64: Handle 5-level paging on wakeup.
kib [Sun, 23 Aug 2020 20:43:23 +0000 (20:43 +0000)]
amd64: Handle 5-level paging on wakeup.

We can switch into long mode directly with LA57 enabled.

Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoamd64: Handle 5-level paging for efirt calls.
kib [Sun, 23 Aug 2020 20:40:35 +0000 (20:40 +0000)]
amd64: Handle 5-level paging for efirt calls.

Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoFix another minor style glitch.
imp [Sun, 23 Aug 2020 20:38:10 +0000 (20:38 +0000)]
Fix another minor style glitch.

Pull { to the end of the struct line rather than having them on their
own line.

3 years agoAdd bhyve support for LA57 guest mode.
kib [Sun, 23 Aug 2020 20:37:21 +0000 (20:37 +0000)]
Add bhyve support for LA57 guest mode.

Noted and reviewed by: grehan
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoAdd amd64 procctl(2) ops to manage forced LA48/LA57 VA after exec.
kib [Sun, 23 Aug 2020 20:32:13 +0000 (20:32 +0000)]
Add amd64 procctl(2) ops to manage forced LA48/LA57 VA after exec.

Tested by: pho (LA48 hardware)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoamd64 pmap: LA57 AKA 5-level paging
kib [Sun, 23 Aug 2020 20:19:04 +0000 (20:19 +0000)]
amd64 pmap: LA57 AKA 5-level paging

Since LA57 was moved to the main SDM document with revision 072, it
seems that we should have a support for it, and silicons are coming.

This patch makes pmap support both LA48 and LA57 hardware.  The
selection of page table level is done at startup, kernel always
receives control from loader with 4-level paging.  It is not clear how
UEFI spec would adapt LA57, for instance it could hand out control in
LA57 mode sometimes.

To switch from LA48 to LA57 requires turning off long mode, requesting
LA57 in CR4, then re-entering long mode.  This is somewhat delicate
and done in pmap_bootstrap_la57().  AP startup in LA57 mode is much
easier, we only need to toggle a bit in CR4 and load right value in CR3.

I decided to not change kernel map for now.  Single PML5 entry is
created that points to the existing kernel_pml4 (KML4Phys) page, and a
pml5 entry to create our recursive mapping for vtopte()/vtopde().
This decision is motivated by the fact that we cannot overcommit for
KVA, so large space there is unusable until machines start providing
wider physical memory addressing.  Another reason is that I do not
want to break our fragile autotuning, so the KVA expansion is not
included into this first step.  Nice side effect is that minidumps are
compatible.

On the other hand, (very) large address space is definitely
immediately useful for some userspace applications.

For userspace, numbering of pte entries (or page table pages) is
always done for 5-level structures even if we operate in 4-level mode.
The pmap_is_la57() function is added to report the mode of the
specified pmap, this is done not to allow simultaneous 4-/5-levels
(which is not allowed by hw), but to accomodate for EPT which has
separate level control and in principle might not allow 5-leve EPT
despite x86 paging supports it. Anyway, it does not seems critical to
have 5-level EPT support now.

Tested by: pho (LA48 hardware)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoAdd definition for CR4.LA57 bit.
kib [Sun, 23 Aug 2020 20:08:05 +0000 (20:08 +0000)]
Add definition for CR4.LA57 bit.

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoPass pointers to info parsed from notes, to brandinfo->header_supported filter.
kib [Sun, 23 Aug 2020 20:06:55 +0000 (20:06 +0000)]
Pass pointers to info parsed from notes, to brandinfo->header_supported filter.

Currently, we parse notes for the values of ELF FreeBSD feature flags
and osrel.  Knowing these values, or knowing that image does not carry
the note if pointers are NULL, is useful to decide which ABI variant
(brand) we want to activate for the image.

Right now this is only a plumbing change

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agoStyle.
kib [Sun, 23 Aug 2020 20:05:35 +0000 (20:05 +0000)]
Style.

3 years agoReserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64.
kib [Sun, 23 Aug 2020 19:47:27 +0000 (19:47 +0000)]
Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64.

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agokern_sharedpage.c: Add exec_sysvec_init_secondary() helper.
kib [Sun, 23 Aug 2020 19:43:47 +0000 (19:43 +0000)]
kern_sharedpage.c: Add exec_sysvec_init_secondary() helper.

It allows a sysent to share existing usermode data in shared page with
other sysent, assuming ABI differences are not in the layout of the
page.

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D25273

3 years agong_ubt: Add a device ID.
markj [Sun, 23 Aug 2020 19:30:06 +0000 (19:30 +0000)]
ng_ubt: Add a device ID.

PR: 248838
Submitted by: Andrey Zholos <aaz@q-fu.com>
MFC after: 1 week

3 years agolibc: hide alphasort_thunk behind I_AM_SCANDIR_B
mjg [Sun, 23 Aug 2020 11:06:59 +0000 (11:06 +0000)]
libc: hide alphasort_thunk behind I_AM_SCANDIR_B

Should unbreak gcc build as reported by tinderbox:
lib/libc/gen/scandir.c:59:12: warning: 'alphasort_thunk' declared 'static' but never defined [-Wunused-function]

3 years agovfs: mark freevnode as noinline
mjg [Sun, 23 Aug 2020 11:05:26 +0000 (11:05 +0000)]
vfs: mark freevnode as noinline

3 years agocxgbe(4): Use large clusters for TOE rx queues when TOE+TLS is enabled.
np [Sun, 23 Aug 2020 04:16:20 +0000 (04:16 +0000)]
cxgbe(4): Use large clusters for TOE rx queues when TOE+TLS is enabled.

Rx is more efficient within the chip when the receive buffer size
matches the TLS PDU size.

MFC after: 3 days
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D26127

3 years agoFix several issues with process group orphanage.
kib [Sat, 22 Aug 2020 21:32:11 +0000 (21:32 +0000)]
Fix several issues with process group orphanage.

Attempt of adding assertions that pgrp->pg_jobc counters do not
underflow in r361967, reverted in r362910, points out bugs in the
handling of job control.  Peter Holm was able to narrow down the
problem to very easy reproduction with timeout(1) which uses reaping.

The following list of problems with calculation of pg_jobs which
directs SIGHUP/SIGCONT delivery for orphaned process group was
identified:
- Re-calculation of the orphaned status for children of exiting parent
  was wrong, but mostly unnoticed when all children were reparented to
  init(8).  When child can be reparented to a different process which
  could affect the child' job control state, it was not properly
  accounted for in pg_jobc.
- Lockless check for exiting process' parent process group is racy
  because nothing prevents the parent from changing its group
  membership.
- Exited process is left in the process group, until waited. This
  affects other calculations of pg_jobc.

Split handling of job control status on process changing its process
group, and process exiting.  Calculate increments and decrements for
pg_jobs by exact checking the orphanage instead of assuming process
group membership for children and parent.  Move the call to killjobc()
later under the proctree_lock.  Mark exiting process in killjobc()
with a new flag P_TREE_GRPEXITED and skip it for all pg_jobc
calculations after the flag is set.

Add checker that independently recalculates pg_jobc value and compares
it with the memoized process group state. This is enabled under INVARIANTS.

Reviewed by: jilles
Discussed with: kevans
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D26116

3 years agomtree(8): add xref to mtree(5)
emaste [Sat, 22 Aug 2020 20:52:02 +0000 (20:52 +0000)]
mtree(8): add xref to mtree(5)

mtree(5) and mtree(8) come from different contrib sources. The former
already had an xref to the latter, but not the other way around.

MFC after: 1 week

3 years agoFinish r364492 by renaming rt_flags to rte_flags for multipath code.
melifaro [Sat, 22 Aug 2020 20:02:40 +0000 (20:02 +0000)]
Finish r364492 by renaming rt_flags to rte_flags for multipath code.

3 years agoRename rt_flags to rte_flags && reduce number of rt_nhop accesses.
melifaro [Sat, 22 Aug 2020 19:30:56 +0000 (19:30 +0000)]
Rename rt_flags to rte_flags && reduce number of rt_nhop accesses.

No functional changes.

Most of the routing flags are stored in the netxtop instead of rtentry.
Rename rt->rt_flags to rt->rte_flags to simplify reading/modifying code
 checking routing flags.

In the new multipath code, rt->rt_nhop may actually point to nexthop group
 instead of nhop. To ease transition, reduce the amount of rt->rt_nhop->...
 accesses.

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

3 years agoWhitespace change to line up dev_sotfc definition.
imp [Sat, 22 Aug 2020 19:18:31 +0000 (19:18 +0000)]
Whitespace change to line up dev_sotfc definition.

3 years agoRetire obsolete sysctl hw.bus.devctl_disable
imp [Sat, 22 Aug 2020 19:02:15 +0000 (19:02 +0000)]
Retire obsolete sysctl hw.bus.devctl_disable

hw.bus.devctl_disable has tagged been obsolete for a decade. Remove it. Also
remove some long obsolete comments. This was done and backed out once in 2014,
but we've had enough releases with the 'new' method of setting queue length that
we can just remove this sysctl now (stable/11, stable/12 and current all don't
reference it).

3 years agoAdd test for checking RTF_HOST and RTAX_NETMASK inconsistency.
melifaro [Sat, 22 Aug 2020 18:14:05 +0000 (18:14 +0000)]
Add test for checking RTF_HOST and RTAX_NETMASK inconsistency.

RTF_HOST indicates whether route is a host route
 (netmask is empty or /{32,128}).
Check that if netmask is empty and host route is not specified, kernel
 returns an error.

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

3 years agovfs: assert that HASBUF is only set with SAVENAME or SAVESTART
mjg [Sat, 22 Aug 2020 16:58:59 +0000 (16:58 +0000)]
vfs: assert that HASBUF is only set with SAVENAME or SAVESTART

as requested by the caller. The intent is to eradicate the mostly
spurious NDFREE_PNBUF calls.

3 years agocache: stronger vnode asserts in cache_enter_time
mjg [Sat, 22 Aug 2020 16:58:34 +0000 (16:58 +0000)]
cache: stronger vnode asserts in cache_enter_time

3 years agofd: pwd_drop after releasing filedesc lock
mjg [Sat, 22 Aug 2020 16:57:45 +0000 (16:57 +0000)]
fd: pwd_drop after releasing filedesc lock

Fixes a potential LOR against vnode lock.

3 years agoAdd a missed source file for LLVM's BPF target. This target is not
dim [Sat, 22 Aug 2020 15:31:56 +0000 (15:31 +0000)]
Add a missed source file for LLVM's BPF target. This target is not
enabled by default, so I forgot about it, apologies for the breakage.

Reported by: hrs
MFC after: 6 weeks
X-MFC-With: r364284

3 years agoacpi_iort: fix mapping end calculation
emaste [Sat, 22 Aug 2020 14:39:14 +0000 (14:39 +0000)]
acpi_iort: fix mapping end calculation

According to the ARM Design Document "IO Remapping Table Platform"
(DEN 0049D), the "Number of IDs" field of the ID mapping format means
"The number of IDs in the range minus one".

Submitted by: Greg V <greg@unrelenting.technology>
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D25179

3 years agoFix a typo in r364438 affecting 32-bit platforms.
markj [Sat, 22 Aug 2020 14:24:17 +0000 (14:24 +0000)]
Fix a typo in r364438 affecting 32-bit platforms.

Reported by: antoine
MFC with: r364438

3 years agoAdd a few new source files to libc++, in particular the implementation
dim [Sat, 22 Aug 2020 12:05:11 +0000 (12:05 +0000)]
Add a few new source files to libc++, in particular the implementation
part of std::random_shuffle. These were split off at some point by
upstream, but I forgot to add them to our Makefile.

This should allow some ports which use std::random_shuffle to correctly
link again.

Reported by: thierry
PR: 248795
MFC after: 6 weeks
X-MFX-With: r364284

3 years agosysctl(8): clarify -n flag
fernape [Sat, 22 Aug 2020 11:59:14 +0000 (11:59 +0000)]
sysctl(8): clarify -n flag

-n omits the name of the variable regardless of the type of information that is
requested. Rephrase to clarify this point.

PR: 242191
Submitted by: stilezy@gmail.com
Approved by: emaste@
Differential Revision: https://reviews.freebsd.org/D26149

3 years agoMerge commit 1ce07cd614be from llvm git (by me):
dim [Sat, 22 Aug 2020 10:55:55 +0000 (10:55 +0000)]
Merge commit 1ce07cd614be from llvm git (by me):

  Instantiate Error in Target::GetEntryPointAddress() only when
  necessary

  When Target::GetEntryPointAddress() calls
  exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
  entry_addr is valid, it can immediately be returned.

  However, just before that, an llvm::Error value has been setup, but
  in this case it is not consumed before returning, like is done
  further below in the function.

  In https://bugs.freebsd.org/248745 we got a bug report for this,
  where a very simple test case aborts and dumps core:

  * thread #1, name = 'testcase', stop reason = breakpoint 1.1
      frame #0: 0x00000000002018d4 testcase`main(argc=1, argv=0x00007fffffffea18) at testcase.c:3:5
     1    int main(int argc, char *argv[])
     2    {
  -> 3        return 0;
     4    }
  (lldb) p argc
  Program aborted due to an unhandled Error:
  Error value was Success. (Note: Success values must still be checked prior to being destroyed).

  Thread 1 received signal SIGABRT, Aborted.
  thr_kill () at thr_kill.S:3
  3       thr_kill.S: No such file or directory.
  (gdb) bt
  #0  thr_kill () at thr_kill.S:3
  #1  0x00000008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
  #2  0x0000000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
  #3  0x000000000451b5f5 in fatalUncheckedError () at /usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
  #4  0x00000000019cf008 in GetEntryPointAddress () at /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
  #5  0x0000000001bccbd8 in ConstructorSetup () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
  #6  0x0000000001bcd2c0 in ThreadPlanCallFunction () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
  #7  0x00000000020076d4 in InferiorCallMmap () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
  #8  0x0000000001f4be33 in DoAllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
  #9  0x0000000001fe51b9 in AllocatePage () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
  #10 0x0000000001fe5385 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
  #11 0x0000000001974da2 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
  #12 CanJIT () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
  #13 0x0000000001a1bf3d in Evaluate () at /usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
  #14 0x00000000019ce7a2 in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
  #15 0x0000000001ad784c in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
  #16 0x0000000001ad86ae in DoExecute () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
  #17 0x0000000001a5e3ed in Execute () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
  #18 0x0000000001a6c4a3 in HandleCommand () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
  #19 0x0000000001a6f98c in IOHandlerInputComplete () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
  #20 0x0000000001a90b08 in Run () at /usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
  #21 0x00000000019a6c6a in ExecuteIOHandlers () at /usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
  #22 0x0000000001a70337 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
  #23 0x0000000001d9d812 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
  #24 0x0000000001918be8 in MainLoop () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
  #25 0x000000000191a114 in main () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890

  Fix the incorrect error catch by only instantiating an Error object
  if it is necessary.

  Reviewed By: JDevlieghere

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

This should fix lldb aborting as described in the scenario above.

Reported by: dmgk
PR: 248745

3 years agoFix tinderbox build after r364465
mjg [Sat, 22 Aug 2020 07:43:38 +0000 (07:43 +0000)]
Fix tinderbox build after r364465

3 years agovfs: add a work around for vp_crossmp bug to realpath
mjg [Sat, 22 Aug 2020 06:56:04 +0000 (06:56 +0000)]
vfs: add a work around for vp_crossmp bug to realpath

The actual bug is not yet addressed as it will get much easier after other
problems are addressed (most notably rename contract).

The only affected in-tree consumer is realpath. Everyone else happens to be
performing lookups within a mount point, having a side effect of ni_dvp being
set to mount point's root vnode in the worst case.

Reported by: pho

3 years agoAdd an entry for r364475.
rmacklem [Sat, 22 Aug 2020 04:07:44 +0000 (04:07 +0000)]
Add an entry for r364475.

3 years agor364475 changed the internal API between the kernel RPC and NFS, so bump version.
rmacklem [Sat, 22 Aug 2020 04:01:05 +0000 (04:01 +0000)]
r364475 changed the internal API between the kernel RPC and NFS, so bump version.

3 years agoAdd TLS support to the kernel RPC.
rmacklem [Sat, 22 Aug 2020 03:57:55 +0000 (03:57 +0000)]
Add TLS support to the kernel RPC.

An internet draft titled "Towards Remote Procedure Call Encryption By Default"
describes how TLS is to be used for Sun RPC, with NFS as an intended use case.
This patch adds client and server support for this to the kernel RPC,
using KERN_TLS and upcalls to daemons for the handshake, peer reset and
other non-application data record cases.

The upcalls to the daemons use three fields to uniquely identify the
TCP connection. They are the time.tv_sec, time.tv_usec of the connection
establshment, plus a 64bit sequence number. The time fields avoid problems
with re-use of the sequence number after a daemon restart.
For the server side, once a Null RPC with AUTH_TLS is received, kernel
reception on the socket is blocked and an upcall to the rpctlssd(8) daemon
is done to perform the TLS handshake.  Upon completion, the completion
status of the handshake is stored in xp_tls as flag bits and the reply to
the Null RPC is sent.
For the client, if CLSET_TLS has been set, a new TCP connection will
send the Null RPC with AUTH_TLS to initiate the handshake.  The client
kernel RPC code will then block kernel I/O on the socket and do an upcall
to the rpctlscd(8) daemon to perform the handshake.
If the upcall is successful, ct_rcvstate will be maintained to indicate
if/when an upcall is being done.

If non-application data records are received, the code does an upcall to
the appropriate daemon, which will do a SSL_read() of 0 length to handle
the record(s).

When the socket is being shut down, upcalls are done to the daemons, so
that they can perform SSL_shutdown() calls to perform the "peer reset".

The rpctlssd(8) and rpctlscd(8) daemons require a patched version of the
openssl library and, as such, will not be committed to head at this time.

Although the changes done by this patch are fairly numerous, there should
be no semantics change to the kernel RPC at this time.
A future commit to the NFS code will optionally enable use of TLS for NFS.

3 years agoAfter the clang/llvm version 11 import LLD_VERSION is no longer used
bz [Fri, 21 Aug 2020 22:31:45 +0000 (22:31 +0000)]
After the clang/llvm version 11 import LLD_VERSION is no longer used
upstream so Version.inc now only defines LLD_VERSION_STRING.

This breaks the WANT_LINKER_VERSION magic and might lead to us building
more than needed (e.g., for croos-tools).

Change the awk script to parse LLD_VERSION_STRING instead of LLD_VERSION,
which not only unbreaks the current situation but should also be backwards
compatible as dim points out.

PR: 248818
Reviewed by: emaste, dim (seems right and the way to go)
MFC after: 4 weeks
X-MFC before: 364284

3 years agoMake net.fibs growable.
melifaro [Fri, 21 Aug 2020 21:34:52 +0000 (21:34 +0000)]
Make net.fibs growable.

Allow to dynamically grow the amount of fibs in each vnet.

This change alters current behavior. Currently, if one defines
 ROUTETABLES > 1 in the kernel config, each vnet will be created
 with the number of fibs defined in the kernel config.
 After this commit vnets will be created with fibs=1.

Dynamic net.fibs is not compatible with net.add_addr_allfibs.
 The plan is to deprecate the latter and make
 net.add_addr_allfibs=0 default behaviour.

Reviewed by: glebius
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D26062

3 years agovfs: fix freevnode accounting
mjg [Fri, 21 Aug 2020 21:24:14 +0000 (21:24 +0000)]
vfs: fix freevnode accounting

Most notably add the missing decrement to vhold_smr.

    .-'---`-.
  ,'          `.
  |             \
  |              \
  \           _  \
  ,\  _    ,'-,/-)\
  ( * \ \,' ,' ,'-)
   `._,)     -',-')
     \/         ''/
      )        / /
     /       ,'-'

Reported by: Dan Nelson <dnelson_1901@yahoo.com>
Fixes: r362827 ("vfs: protect vnodes with smr")

3 years agoFix CTL ioctl port creation error handling.
mav [Fri, 21 Aug 2020 20:10:29 +0000 (20:10 +0000)]
Fix CTL ioctl port creation error handling.

Submitted by: Bret Ketchum
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26143

3 years agoixgbe: fix impossible condition
vangyzen [Fri, 21 Aug 2020 19:34:41 +0000 (19:34 +0000)]
ixgbe: fix impossible condition

Coverity flagged this condition: The condition
    offset == 0 && offset == 65535
can never be true because offset cannot be equal
to two different values at the same time.

Submitted by: bret_ketchum@dell.com
Reported by: Coverity
Reviewed by: tsoome, cem
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26144

3 years agouma: record allocation failures due to zone limits
gallatin [Fri, 21 Aug 2020 18:31:57 +0000 (18:31 +0000)]
uma: record allocation failures due to zone limits

The zone limit mechanism was recently reworked, and
allocation failures due to limits being exceeded
were inadvertently no longer being recorded. This
would lead to, for example, mbuf allocation failures
not being indicated in netstat -m or vmstat -z

Reviewed by: markj
Sponsored by: Netflix

3 years agoipfw(8): Fix typo in man page
fernape [Fri, 21 Aug 2020 17:45:17 +0000 (17:45 +0000)]
ipfw(8): Fix typo in man page

s/exmaple/example

Approved by: manpages (gbe@)
Differential Revision: https://reviews.freebsd.org/D26147

3 years agoamd64 pmap: potential integer overflowing expression
vangyzen [Fri, 21 Aug 2020 14:22:32 +0000 (14:22 +0000)]
amd64 pmap: potential integer overflowing expression

Coverity has identified the line in this change as "Potential integer
overflowing expression" due to the variable i declared as an int
and used in an expression with vm_paddr_t, a 64bit variable.

This change has very little effect as when this line is execute
nkpt is small and phys_addr is a the beginning of physical memory.
But there is no explicit protection that the above is true.

Submitted by: bret_ketchum@dell.com
Reported by: Coverity
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26141

3 years agoMerge commit 95e18b2d9d5f from llvm git (by Kang Zhang):
dim [Fri, 21 Aug 2020 10:06:01 +0000 (10:06 +0000)]
Merge commit 95e18b2d9d5f from llvm git (by Kang Zhang):

  [PowerPC] Fix a typo for InstAlias of mfsprg

  D77531 has a type for mfsprg, it should be mtsprg. This patch is to
  fix this typo.

This should fix booting powerpc64 kernels, after LLVM 11 was imported.

PR: 248763

3 years agoReference spi(8) from spigen.4
0mp [Fri, 21 Aug 2020 09:50:03 +0000 (09:50 +0000)]
Reference spi(8) from spigen.4

MFC after: 2 weeks

3 years agoClean up spi.8
0mp [Fri, 21 Aug 2020 09:48:00 +0000 (09:48 +0000)]
Clean up spi.8

- Remove trailing whitespace
- Address igor and mandoc warnings
- Sort options
- Use macros consistently (e.g., Fl for flags, Dq for quoting, Bd for code
  blocks)
- Add a history section
- Fix incorrect use of macros in various places

MFC after: 2 weeks

3 years agogre(4): Mention sysctl for nesting gre tunnels
gbe [Fri, 21 Aug 2020 07:03:54 +0000 (07:03 +0000)]
gre(4): Mention sysctl for nesting gre tunnels

PR: 228465
Submitted by: Sergey Akhmatov <sergey at akhmatov dot ru>
Reviewed by: bcr
Approved by: bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26097

3 years agols(1): Update POSIX conformance from 2001 to 2008
gbe [Fri, 21 Aug 2020 06:20:11 +0000 (06:20 +0000)]
ls(1): Update POSIX conformance from 2001 to 2008

- Update the options that are non-existing in POSIX from 2001 to 2008
- Update POSIX conformance in the STANDARDS section from 2001 to 2008

Verified by checking [1].

[1] https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/toc.htm

PR: 140435
Submitted by: Dan Lukes <dan at obluda dot cz>
Reviewed by: bcr
Approved by: bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26096

3 years ago[PowerPC] Fix translation-related crashes during startup
bdragon [Fri, 21 Aug 2020 03:31:01 +0000 (03:31 +0000)]
[PowerPC] Fix translation-related crashes during startup

After spending a lot of time trying to track down what was going on, I have
isolated the "black screen" failures when using boot1 to boot a G4 machine.

It turns out we were replacing the traps before installing the temporary
BAT entry for the bottom of physical memory. That meant that until the MMU
was bootstrapped, the cached translations were the only thing keeping us
from losing.

Throwing boot1 into the mix was affecting execution flow enough to cause us
to hit an uncached page and crash.

Fix this by properly setting up the initial BAT entry at the same time we
are replacing the OpenFirmware traps, so we can continue executing in
segment 0 until the rest of the DMAP has been set up.

A second thing discovered while researching this is that we were entering a
BAT region for segment 16. It turns out this range was a) considered part
of KVA, and b) has firmware mappings with varying attributes.

If we ever accessed an unmapped page in segment 16, it would cause a BAT
entry to be installed for the whole segment, which would bypass the
existing mappings until it was flushed out again.

Instead, translate the OFW memory attributes into VM memory attributes and
install the ranges into the kernel address space properly.

Reviewed by: adalava
MFC after: 3 weeks
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D25547

3 years ago[PowerPC64] Fix invalid OPAL call in xive_bind().
bdragon [Fri, 21 Aug 2020 03:23:10 +0000 (03:23 +0000)]
[PowerPC64] Fix invalid OPAL call in xive_bind().

This fixes spurious "XIVE[ IC 00  ] ISN 1 lead to invalid IVE !" messages
generated by OPAL when running with the debug level cranked up.

Discussed with jhibbits.

Sponsored by: Tag1 Consulting, Inc.

3 years agocxgbei: destroy the worker threads' CV and mutex in stop_worker_threads.
np [Fri, 21 Aug 2020 00:34:33 +0000 (00:34 +0000)]
cxgbei: destroy the worker threads' CV and mutex in stop_worker_threads.

Reported by: bz@
MFC after: 3 days

3 years agoveloader: insist on verifying .4th .lua etc
sjg [Fri, 21 Aug 2020 00:27:06 +0000 (00:27 +0000)]
veloader: insist on verifying .4th .lua etc

When files are read from .rc or .4th, verify_file is asked to
guess the severity (VE_TRY,VE_WANT,VE_MUST)

Reviewed by: stevek
MFC after: 1 week
Sponsored by: Juniper Networks

3 years agoUse devctl.h instead of bus.h to reduce newbus pollution.
imp [Fri, 21 Aug 2020 00:03:24 +0000 (00:03 +0000)]
Use devctl.h instead of bus.h to reduce newbus pollution.

There's no need for these parts of the kernel to know about newbus,
so narrow what is included to devctl.h for device_notify_*.

Suggested by: kib@

3 years agoWhen we have a command returned by zfs_nextboot() that is longer
glebius [Thu, 20 Aug 2020 20:31:47 +0000 (20:31 +0000)]
When we have a command returned by zfs_nextboot() that is longer
than command in the loader.conf, the latter needs to be nul terminated,
otherwise garbage trailer left from zfs_nextboot() will be passed to
parse_cmd() together with loader.conf command.

While here, reset cmd to empty string if read() returns error.

Reviewed by: tsoome

3 years agoFix a typo in r364438.
markj [Thu, 20 Aug 2020 20:11:58 +0000 (20:11 +0000)]
Fix a typo in r364438.

Reported by: Jenkins
MFC with: r364438

3 years agoUnbreak LINT
imp [Thu, 20 Aug 2020 19:51:25 +0000 (19:51 +0000)]
Unbreak LINT

Remove ufm from the NOTES file.

3 years agoEnable creation of static userspace probes in incremental builds.
markj [Thu, 20 Aug 2020 19:28:19 +0000 (19:28 +0000)]
Enable creation of static userspace probes in incremental builds.

To define USDT probes, dtrace -G makes use of relocations for undefined
symbols: the target address is overwritten with NOPs and the location is
recorded in the DOF section of the output object file.  To avoid link
errors, the original relocation is destroyed.  However, this means that
the same input object file cannot be processed multiple times, as
happens during incremental rebuilds.  Instead, only set the relocation
type to NONE, so that all information required to reconstruct USDT
probes is preserved.

Reported by: bdrewery
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation

3 years agoRemove non-FreeBSD ifdefs from dt_link.c.
markj [Thu, 20 Aug 2020 19:27:49 +0000 (19:27 +0000)]
Remove non-FreeBSD ifdefs from dt_link.c.

This file is too complicated as it is and has diverged a fair bit from
illumos due to toolchain differences, so just drop unused code
(including SPARC support).

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoAdd ufm(4) to ObsoleteFiles.inc
zeising [Thu, 20 Aug 2020 19:14:53 +0000 (19:14 +0000)]
Add ufm(4) to ObsoleteFiles.inc

The ufm driver was removed in r364432, add the manual to ObsoleteFiles.

OK by: imp

3 years agoBump kldxref's MAXSEGS to 16, to stop complaints about the kernel
dim [Thu, 20 Aug 2020 18:50:46 +0000 (18:50 +0000)]
Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel
supposedly having too many segments, when lld 11 links it. Such kernels
should load just fine.

Note that we may still do some tweaking of our kernel linker scripts, to
lower the number of segments, although the exact benefit is not entirely
clear.

3 years agoRemove ufm.4 from the Makefile
imp [Thu, 20 Aug 2020 18:31:50 +0000 (18:31 +0000)]
Remove ufm.4 from the Makefile

3 years agoFix regression after r364379.
hselasky [Thu, 20 Aug 2020 17:45:54 +0000 (17:45 +0000)]
Fix regression after r364379.

The AMD's Ryzen 3 3200g XHCI controllers apparently need the evaluate
control endpoint context command, but we don't need to issue this
command when the bMaxPacketSize is received after the read of the USB
device descriptor, because this part should be handled automatically.

PR: 248784
Tested by: emaste, hselasky
MFC after: 1 week
Sponsored by: Mellanox Technologies

3 years agoRemove the long obsolete ufm driver.
imp [Thu, 20 Aug 2020 17:35:47 +0000 (17:35 +0000)]
Remove the long obsolete ufm driver.

It was a driver for a USB FM tuner that was available in the market in 2002. I
wrote the driver in 2003. I've not used it since 2005 or so, so it's time to
retire this driver. No userland code ever interfaced to the special device it
created. There's no user base: the last bug I received on this driver was in
2004.

Relnotes: Yes

3 years agoTag pccard drivers with gone in 13.
imp [Thu, 20 Aug 2020 17:19:40 +0000 (17:19 +0000)]
Tag pccard drivers with gone in 13.

MFC After: 3 days
Reviewed by: emaste, brooks, adrian (on twitter)
Differential Revision: https://reviews.freebsd.org/D26095

3 years agoMove from TAILQ to STAILQ because the nodes are a bit smaller.
imp [Thu, 20 Aug 2020 17:14:44 +0000 (17:14 +0000)]
Move from TAILQ to STAILQ because the nodes are a bit smaller.

3 years agoMove devctl_notify* to devctl.h.
imp [Thu, 20 Aug 2020 17:14:39 +0000 (17:14 +0000)]
Move devctl_notify* to devctl.h.

3 years agoMake devctl_queue_data_f and devctl_queue_data private.
imp [Thu, 20 Aug 2020 17:14:33 +0000 (17:14 +0000)]
Make devctl_queue_data_f and devctl_queue_data private.

I thought we'd need them, but nobody is using them. Narrow the interface. This
will facilitate changes in the future.

3 years agoipfw: style(9) fixes
emaste [Thu, 20 Aug 2020 16:56:13 +0000 (16:56 +0000)]
ipfw: style(9) fixes

Submitted by: Neel Chauhan <neel AT neelc DOT org>
Reviewed by: emaste, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26126

3 years agoUse names suggested by kib@ in review D25969, move call for unmount to not call
imp [Thu, 20 Aug 2020 16:52:48 +0000 (16:52 +0000)]
Use names suggested by kib@ in review D25969, move call for unmount to not call
with vnode locked, use NOWAIT alloc and only report when we don't overflow.

These changes were accidentally omitted from r364402, except for the not
reporting on overflow. They were lumped in with a debugging commit in my tree
that I omitted w/o realizing this.

Other issues from the review are pending some other changes I need to do first.

3 years agoFix function name in zone.9
imp [Thu, 20 Aug 2020 16:52:34 +0000 (16:52 +0000)]
Fix function name in zone.9

uma_zone_prealloc -> uma_prealloc. There's no uma_zone_prealloc defined and the
docs for it describe uma_prealloc exactly.

3 years agodl_iterate_phdr(3): provide exclusive locking for callback when statically linked.
kib [Thu, 20 Aug 2020 15:19:09 +0000 (15:19 +0000)]
dl_iterate_phdr(3): provide exclusive locking for callback when statically linked.

Apparently llvm unwinder depends on the external locking for callback.

Reviewed by: cem, emaste
Tested by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26109

3 years agolibsa: smbios: Parse the chassis type and export it as smbios.chassis.type
manu [Thu, 20 Aug 2020 12:50:49 +0000 (12:50 +0000)]
libsa: smbios: Parse the chassis type and export it as smbios.chassis.type

It can be useful to know what type of machine we are running on for desktop
related thing.
It also allow us to support all the DMI variable that linux driver can fetch.

MFC after: 1 week
Sponsored by: Sponsored-by: The FreeBSD Foundation

3 years agocache: don't use cache_purge_negative when renaming
mjg [Thu, 20 Aug 2020 10:06:50 +0000 (10:06 +0000)]
cache: don't use cache_purge_negative when renaming

It avoidably scans (and evicts) unrelated entries. Instead take
advantage of passed componentname and perform a hash lookup
for the exact one.

Sample data from buildworld probed on cache_purge_negative extended
to count both scanned and evicted entries on each call are below.
At most it has to evict 1.

  evicted
           value  ------------- Distribution ------------- count
              -1 |                                         0
               0 |@@@@@@@@@@@@@@@                          19506
               1 |@@@@@                                    5820
               2 |@@@@@@                                   7751
               4 |@@@@@                                    6506
               8 |@@@@@                                    5996
              16 |@@@                                      4029
              32 |@                                        1489
              64 |                                         193
             128 |                                         109
             256 |                                         56
             512 |                                         16
            1024 |                                         7
            2048 |                                         3
            4096 |                                         1
            8192 |                                         1
           16384 |                                         0

  scanned
           value  ------------- Distribution ------------- count
              -1 |                                         0
               0 |@@                                       2456
               1 |@                                        1496
               2 |@@                                       2728
               4 |@@@                                      4171
               8 |@@@@                                     5122
              16 |@@@@                                     5335
              32 |@@@@@                                    6279
              64 |@@@@                                     5671
             128 |@@@@                                     4558
             256 |@@                                       3123
             512 |@@                                       2790
            1024 |@@                                       2449
            2048 |@@                                       3021
            4096 |@                                        1398
            8192 |@                                        886
           16384 |                                         0

3 years agocache: add cache_rename, a dedicated helper to use for renames
mjg [Thu, 20 Aug 2020 10:05:46 +0000 (10:05 +0000)]
cache: add cache_rename, a dedicated helper to use for renames

While here make both tmpfs and ufs use it.

No fuctional changes.

3 years agocache: reimplement cache_lookup_nomakeentry as cache_remove_cnp
mjg [Thu, 20 Aug 2020 10:05:19 +0000 (10:05 +0000)]
cache: reimplement cache_lookup_nomakeentry as cache_remove_cnp

This in particular removes unused arguments.

3 years agousr.sbin/fstyp: Fix incorrect pfs_type test in ondisk inode
pfg [Thu, 20 Aug 2020 05:18:08 +0000 (05:18 +0000)]
usr.sbin/fstyp: Fix incorrect pfs_type test in ondisk inode

"ipdata.meta.pfs_type & HAMMER2_PFSTYPE_SUPROOT" happened to have
the same result (except HAMMER2_PFSTYPE_DUMMY could also match).

Obtained from: Dragonfly (git 29e6489bbd4f8e237c9c17b300ac8b711f36770)

3 years agoextfs: remove redundant little endian conversion.
pfg [Thu, 20 Aug 2020 05:08:49 +0000 (05:08 +0000)]
extfs: remove redundant little endian conversion.

The XTIME_TO_NSEC macro already calls the htole32(), so there is no need
to call it twice. This code does nothing on LE platforms and affects only
nanosecond and birthtime fields so it's difficult to notice on regular use.

Hinted by: DragonFlyBSD (git ae503f8f6f4b9a413932ffd68be029f20c38cab4)

X-MFC with: r361136

3 years agoAdd MSG_TLSAPPDATA to lib/libsysdecode/mktables.
rmacklem [Thu, 20 Aug 2020 03:53:18 +0000 (03:53 +0000)]
Add MSG_TLSAPPDATA to lib/libsysdecode/mktables.

I have no idea what this does (and until now that it even existed), but
apparently it needs this entry changed for the MSG_TLSAPPDATA, since
it is kernel only.

3 years agozfs: fix EIO accessing dataset after resuming interrupted receive
asomers [Thu, 20 Aug 2020 01:31:21 +0000 (01:31 +0000)]
zfs: fix EIO accessing dataset after resuming interrupted receive

ZFS unmounts a dataset while receiving into it and remounts it afterwards.
But if ZFS is resuming an incomplete receive, it screws up and ends up with
a dataset that is mounted, but returns EIO for every access. This commit
fixes that condition.

While the vulnerable code also exists in OpenZFS, the problem is not
reproducible there. Apparently OpenZFS doesn't unmount the destination
dataset during receive, like FreeBSD does.

PR: 248606
Reviewed by: mmacy
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D26034

3 years agoUse pmap_mapbios() to map ACPI tables on amd64 and i386.
markj [Thu, 20 Aug 2020 00:52:53 +0000 (00:52 +0000)]
Use pmap_mapbios() to map ACPI tables on amd64 and i386.

The ACPI table-mapping code used pmap_kenter_temporary() to create
mappings, which in turn uses the fixed-size crashdump map.  Moreover,
the code was not verifying that the table fits in this map, so when
mapping large tables we could clobber adjacent mappings.  This use of
pmap_kenter_temporary() appears to predate support in pmap_mapbios() for
creating early mappings, but that restriction no longer applies.

PR: 248746
Reviewed by: kib, mav
Tested by: gallatin, Curtis Villamizar <curtis@ipv6.occnc.com>
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26125

3 years agoRemove an unused parameter from map_table().
markj [Thu, 20 Aug 2020 00:38:32 +0000 (00:38 +0000)]
Remove an unused parameter from map_table().

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoAdd the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS
rmacklem [Wed, 19 Aug 2020 23:42:33 +0000 (23:42 +0000)]
Add the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS
data records.

The kernel RPC cannot process non-application data records when
using TLS. It must to an upcall to a userspace daemon that will
call SSL_read() to process them.

This patch adds a new flag called MSG_TLSAPPDATA that the kernel
RPC can use to tell sorecieve() to return ENXIO instead of a non-application
data record, when that is what is at the top of the receive queue.
I put the code in #ifdef KERN_TLS/#endif, although it will build without
that, so that it is recognized as only useful when KERN_TLS is enabled.
The alternative to doing this is to have the kernel RPC re-queue the
non-application data message after receiving it, but that seems more
complicated and might introduce message ordering issues when there
are multiple non-application data records one after another.

I do not know what, if any, changes will be required to support TLS1.3.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D25923

3 years agolibsa: remove leftover whitespace
tsoome [Wed, 19 Aug 2020 20:41:22 +0000 (20:41 +0000)]
libsa: remove leftover whitespace

Tiny cleanup, no functional changes.

3 years agoUnify AcpiGetTable() KPI use in identify, probe and attach.
mav [Wed, 19 Aug 2020 19:55:12 +0000 (19:55 +0000)]
Unify AcpiGetTable() KPI use in identify, probe and attach.

While there, change probe order to not call AcpiGetTable() for every
probed ACPI device.

PR: 248746
MFC after: 3 days

3 years agoAdd a KCOV man page.
markj [Wed, 19 Aug 2020 18:52:22 +0000 (18:52 +0000)]
Add a KCOV man page.

Reviewed by: andrew, gbe, tuexen
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26108

3 years agoTCP: remove special treatment for hardware (ifnet) TLS
gallatin [Wed, 19 Aug 2020 17:59:06 +0000 (17:59 +0000)]
TCP: remove special treatment for hardware (ifnet) TLS

Remove most special treatment for ifnet TLS in the TCP stack, except
for code to avoid mixing handshakes and bulk data.

This code made heroic efforts to send down entire TLS records to
NICs. It was added to improve the PCIe bus efficiency of older TLS
offload NICs which did not keep state per-session, and so would need
to re-DMA the first part(s) of a TLS record if a TLS record was sent
in multiple TCP packets or TSOs. Newer TLS offload NICs do not need
this feature.

At Netflix, we've run extensive QoE tests which show that this feature
reduces client quality metrics, presumably because the effort to send
TLS records atomically causes the server to both wait too long to send
data (leading to buffers running dry), and to send too much data at
once (leading to packet loss).

Reviewed by: hselasky,  jhb, rrs
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D26103

3 years agoipfirewall(4): remove Cuseeme from supported list
emaste [Wed, 19 Aug 2020 17:52:06 +0000 (17:52 +0000)]
ipfirewall(4): remove Cuseeme from supported list

Submitted by: Dries Michiels
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26075

3 years agoDocument the VFS FS events
imp [Wed, 19 Aug 2020 17:10:09 +0000 (17:10 +0000)]
Document the VFS FS events

MOUNT notifies when a filesystem is mounted
REMOUNT notifies when a filesystem is mounted again
UNMOUNT notifies when a filesystem is unmounted

These events are asynchronous to the actual state of the event (though the data
is recorded at a time when it is stable). The mount event is reported after the
filesystem is mounted. However, in the interim it may be unmounted by another
agent. Likewise, umount is called just before the mountpoint is finished tearing
down. It may be remounted (or maybe if the process scheduling is wonky and devd
gets to run before the last few steps are complete).

Sponsored by: Netflix
Diffential Revision: https://reviews.freebsd.org/D25969

3 years agoAdd VFS FS events for mount and unmount to devctl/devd
imp [Wed, 19 Aug 2020 17:10:04 +0000 (17:10 +0000)]
Add VFS FS events for mount and unmount to devctl/devd

Report when a filesystem is mounted, remounted or unmounted via devd, along with
details about the mount point and mount options.

Discussed with: kib@
Reviewed by: kirk@ (prior version)
Sponsored by: Netflix
Diffential Revision: https://reviews.freebsd.org/D25969

3 years agoMove the mount name to bit mapping into sys/mount.h so it can be shared with the
imp [Wed, 19 Aug 2020 17:09:58 +0000 (17:09 +0000)]
Move the mount name to bit mapping into sys/mount.h so it can be shared with the
kernel.

Discussed with: kib@
Reviewed by: kirk@ (prior version)
Sponsored by: Netflix
Diffential Revision: https://reviews.freebsd.org/D25969

3 years agoFix the mips64 world build after r364284.
dim [Wed, 19 Aug 2020 17:05:30 +0000 (17:05 +0000)]
Fix the mips64 world build after r364284.

Linking the full version of clang 11 results in errors similar to:

lld: error: /usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0): relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; references operator new(unsigned long)

Add -mxgot to the compilation flags for llvm libraries to work around
this error. This may be too big of a hammer, but it can always be
refined later.

MFC after: 6 weeks