Commit graph

274501 commits

Author SHA1 Message Date
Ed Maste 87c1498d1a ssh: update to OpenSSH v9.0p1
Release notes are available at https://www.openssh.com/txt/release-9.0

Some highlights:

 * ssh(1), sshd(8): use the hybrid Streamlined NTRU Prime + x25519 key
   exchange method by default ("sntrup761x25519-sha512@openssh.com").
   The NTRU algorithm is believed to resist attacks enabled by future
   quantum computers and is paired with the X25519 ECDH key exchange
   (the previous default) as a backstop against any weaknesses in
   NTRU Prime that may be discovered in the future. The combination
   ensures that the hybrid exchange offers at least as good security
   as the status quo.

 * sftp-server(8): support the "copy-data" extension to allow server-
   side copying of files/data, following the design in
   draft-ietf-secsh-filexfer-extensions-00. bz2948

 * sftp(1): add a "cp" command to allow the sftp client to perform
   server-side file copies.

This commit excludes the scp(1) change to use the SFTP protocol by
default; that change will immediately follow.

MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2022-04-15 10:41:08 -04:00
Mark Johnston 10aa36702c etc/mtree: Remove tabs 2022-04-15 10:27:22 -04:00
Mark Johnston d0f245d21f libsysdecode: Add regression tests for sysdecode_cap_rights(3)
Reviewed by:	jhb, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34900
2022-04-15 10:23:32 -04:00
Mark Johnston 354efc4c94 libsysdecode: Include required headers in sysdecode.h
Make sysdecode.h self-contained rather than forcing all consumers to
include dependencies.  No functional change intended.

Reviewed by:	pauamma_gundo.com, jhb, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34899
2022-04-15 10:22:29 -04:00
Tom Jones 7c03df6855 diff3: allow diff3 ed scripts to generate deletions
diff3 with the -e (ed script flag) can generate line deletions, add
support for deletions and add a test case to exercise this behaviour.
This functionality was unearthed through comparison of bsd diff3 and gnu
diff3 output.

Reviewed by:	pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34912
2022-04-15 15:00:59 +01:00
Konstantin Belousov 362ff9867e Revert rest of a5970a529c: use vrefact() when working on fp->f_vnode
Now, since O_PATH-opened file descriptors use use references instead
of the hold references, vrefact() chahges from that revision can be
reverted.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34906
2022-04-15 16:56:20 +03:00
Michael Tuexen eeba222172 sctp: don't keep a pointer to a freed stcb around
Reported by:	syzbot+b9ef06efdae7cb9ee414@syzkaller.appspotmail.com
Reported by:	syzbot+b1e4793e0e6b25b0d510@syzkaller.appspotmail.com
MFC after:	3 days
2022-04-15 14:00:00 +02:00
Michael Tuexen e0127ea4c6 sctp: improve locking
Hold a refcount while giving up an stcp lock. This issue was
found by running syzkaller.

MFC after:	3 days
2022-04-15 13:58:45 +02:00
Rick Macklem 068fc05745 nfscl: Clean up the code by removing unused arguments
The "void *stuff" (also called fstuff and dstuff) argument
was used by the Mac OSX port.  For FreeBSD, this argument
is always NULL, so remove it to clean up the code.

This commit gets rid of "stuff" for nfscl_nget().
Future commits will do the same for other functions.
2022-04-14 16:15:56 -07:00
Navdeep Parhar 811a82d53a cxgbetool(8): User interface to round-robin queue selection via COP.
Queue "roundrobin" in a COP rule means the driver should select queues
for new tids in a round-robin manner.

Reviewed by:	jhb@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34922
2022-04-14 15:54:13 -07:00
Navdeep Parhar db28d4a0cd cxgbe/t4_tom: Support for round-robin selection of offload queues.
A COP (Connection Offload Policy) rule can now specify that the tx
and/or rx queue for a new tid should be selected in a round-robin
manner. There is no change in default behavior.

Reviewed by:	jhb@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34921
2022-04-14 15:49:58 -07:00
Navdeep Parhar 169e94c41e cxgbe(4): Add support for PPOD_EDRAM feature.
The driver queries the firmware to find out if it supports this feature
and enables it if it does. The firmware moves the iSCSI page pod region
to a lower address so that some of it is located in the faster on-chip
memory instead of external DDR.

Reviewed by:	jhb@
MFC after:	3 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34895
2022-04-14 15:43:32 -07:00
Randall Stewart 6edfc10ca5 tcp: adding a functionality to define "trace points" so that BB logging can be enabled at specific events.
This commit will add a new concept to rack, tracepoints. A tracepoint
is a defined point inserted into the code (3 are included in this initial patch) that
allows a developer to insert a point that might be of interest. The developer numbers
the point in the tcp_rack.h file and then can use sysctl to enable that (or all) trace
points. A limit is also given to how many BB logged connections will turn on
so that a box is not overrun by BB logging.

Reviewed by: tuexen
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D34898
2022-04-14 16:07:34 -04:00
Randall Stewart 6e6439b238 tcp - hpts timing is off when we are above 1200 connections.
HPTS timing begins to go off when we reach the threshold of connections (1200 by default)
where we have any returning syscall or LRO stop finding the oldest hpts thread that
has not run but instead using the CPU it is on. This ends up causing quite a lot of times
where hpts threads may not run for extended periods of time. On top of all that which
causes heartburn if you are pacing in tcp, you also have the fact that where AMD's
podded L3 cache may have sets of 8 CPU's that share a L3, hpts is unaware of this
and thus on amd you can generate a lot of cache misses.

So to fix this we will get rid of the CPU mode, and always use oldest. But also make
HPTS aware of the CPU topology and keep the "oldest" to be within the same L3 cache.
This also works nicely for NUMA as well couple with Drew's earlier NUMA changes.

Reviewed by: glebius, gallatin, tuexen
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D34916
2022-04-14 16:04:08 -04:00
Michael Tuexen 2486a7c0c7 sctp: cleanup
MFC after:	3 days
2022-04-14 21:52:25 +02:00
Mark Johnston f82177b8cf vm: Initialize the transient buffer mapping arena with M_WAITOK
The wait flag is passed to UMA when allocating boundary tags for the
initial span, and UMA expects either M_WAITOK or M_NOWAIT to be present.

Reported by:	cperciva
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-14 15:46:14 -04:00
Mark Johnston 6fb7c42d59 vm: Move the "vm_wait in early boot" assertion to the proper place
The assertion was added in commit 1771e987ca.  After that, vm_wait()
and friends were refactored such that the actual sleep happens
elsewhere.  Now the assertion condition is not checked when
vm_wait_doms() is called directly, and it is checked even if we are not
going to sleep (because vm_page_count_min_set(wdoms) is false).

Reviewed by:	alc, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34909
2022-04-14 15:45:54 -04:00
Ed Maste f99cc5a389 sysent: regen after 52a1d90c8b, posix_fadvise in capmode 2022-04-14 15:17:36 -04:00
Ed Maste 52a1d90c8b Allow posix_fadvise in capability mode
posix_fadvise operates only on a provided fd.  Noted by
Mathieu <sigsys@gmail.com> in review D34761.

No new CAP_ rights are added for posix_fadvise(), as 'advice' in
general only influences when I/O happens; the fd must have existing
CAP_ rights for actual data access.

Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34903
2022-04-14 15:11:21 -04:00
Mike Karels 8f45652b6b genet: fix problems with interface down/up
The genet interface did not resume operation correctly after doing
ifconfig down then up.  The down/reset procedure did not clear the
RUNNING flag, and did not reset enough of the hardware state.  This
patch is modeled on OpenBSD code, with a call to gen_reset added
to reset the controller completely.  Regularize the parameter to
gen_dma_disable() while here.

PR:             263091
Submitted by:	jiahali@blackberry.com
2022-04-14 14:10:13 -05:00
Matteo Riondato d86cf44350 pfctl: fix recursive printing of rules
When asked to print rules recursively, correctly recurse for anchors
included in pf.conf with "anchorname/*".

PR:		262590
Reviewed by:	kp
MFC after:	3 weeks
2022-04-14 17:25:41 +02:00
Li-Wen Hsu 4642a6fac2
Disable building kcov test on powerpcspe
It's also 32-bit and lacks support for the needed atomic operations.

Sponsored by:	The FreeBSD Foundation
2022-04-14 23:03:00 +08:00
Baptiste Daroussin 7f39937557 libedit: import version of 2022-04-11
It includes improvements in the libreadline compatibility and a change
from pstef@ which fixes filename autocompletion for strings like a\)b
2022-04-14 16:46:47 +02:00
Baptiste Daroussin 6da940f2c7 libedit: import version 2022-04-11 2022-04-14 16:41:01 +02:00
Baptiste Daroussin 4fea9c7cfe update to 2022-03-22 2022-04-14 16:16:03 +02:00
Cy Schubert 1e0ca65a3b wpa: Correctly call pcap_next_ex()
The second argument to pcap_next_ex() is a pointer to a pointer.
Not a pointer. This fixes a wpa_supplicent SIGSEGV.

PR:		263266
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Fixes:		6e5d01124f
MFC:		immediately
2022-04-14 06:16:45 -07:00
Gordon Bergling 3e0f3678ec time(3): Refine history in the manual page
The time() system call first appeared in Version 1 AT&T UNIX.  Through
the Version 3 AT&T UNIX, it returned 60 Hz ticks since an epoch that
changed occasionally, because it was a 32-bit value that overflowed in a
little over 2 years.

In Version 4 AT&T UNIX the granularity of the return value was reduced to
whole seconds, delaying the aforementioned overflow until 2038.

Version 7 AT&T UNIX introduced the ftime() system call, which returned
time at a millisecond level, though retained the gtime() system call
(exposed as time() in userland).  time() could have been implemented as a
wrapper around ftime(), but that wasn't done.

4.1cBSD implemented a higher-precision time function gettimeofday() to
replace ftime() and reimplemented time() in terms of that.

Since FreeBSD 9 the implementation of time() uses
clock_gettime(CLOCK_SECOND) instead of gettimeofday() for performance
reasons.

With most valuable input from Warner (imp@).

Reviewed by:	0mp, jilles, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34751
2022-04-14 10:04:14 +02:00
Navdeep Parhar 239170f292 cxgbe(4): Fix control flow issues reported by Coverity.
CID 1487932:  Control flow issues  (NESTING_INDENT_MISMATCH).
The macro on this line expands into multiple statements, only the first
of which is nested within the preceding parent while the rest are not.
9828                    ulp_region(RX_TLS_KEY);

Reported by:	Coverity (CID 1487932)
Fixes:	f88b31885c cxgbe(4): meminfo should get the TLS region's limits from the hardware.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2022-04-14 00:17:36 -07:00
Gordon Bergling 7fa5cd3827 Revert "drm2: Fix a typo in a source code comment"
This reverts commit 5158cf0a38.
2022-04-14 09:01:29 +02:00
Peter Holm 1346766f60 stress2: Permanently disable disruptive tests 2022-04-14 06:57:24 +02:00
Konstantin Belousov bf13db086b Mostly revert a5970a529c: Make files opened with O_PATH to not block non-forced unmount
Problem is that open(O_PATH) on nullfs -o nocache is broken then,
because there is no reference on the vnode after the open syscall exits.

Reported and tested by:	ambrisko
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-04-14 02:47:04 +03:00
John Baldwin a30eb84a5d powerpc mpc85xx: Remove unused variables. 2022-04-13 16:08:24 -07:00
John Baldwin 1c311640c0 powerpc: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin dd636cb9d0 ad7417: Avoid an unused but set warning when compiled with NO_SYSCTL_DESCR.
Use a ternary operator for the description string passed to
SYSCTL_ADD_PROC instead of a helper variable.
2022-04-13 16:08:23 -07:00
John Baldwin 2257e87203 dpaa: Remove unused variables. 2022-04-13 16:08:23 -07:00
John Baldwin 39f7de587b divert_packet: ip is only used for SCTP. 2022-04-13 16:08:23 -07:00
John Baldwin fe5324aca0 in_pcballoc: error is only used for IPSEC or MAC. 2022-04-13 16:08:23 -07:00
John Baldwin 36fb372264 kern: Move variables only used for MAC under #ifdef MAC. 2022-04-13 16:08:23 -07:00
John Baldwin a56881d3e9 riscv: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin 695d3e52ea xdma: Inline variables with simple values used once in a KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin d586fc165c i386 getmemsize: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin 8bf0d2d3e3 arm64 rk_pcie: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin 216536350a vnic: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin 4aec198420 sched_ule: Inline value of ts in sched_thread_priority.
This avoids a set but unused warning in kernels without SMP where
TDQ_CPU() doesn't use its argument.
2022-04-13 16:08:23 -07:00
John Baldwin 718fe5ddfa ata-fsl: Remove unused variable. 2022-04-13 16:08:23 -07:00
John Baldwin 43629a8b18 arm freescale: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin 9ad5422f27 arm sp804: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin 09f2892eee arm vybrid: #if 0 variables only used under #if 0. 2022-04-13 16:08:22 -07:00
John Baldwin 42278fc2e6 drm2: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin fcd0ea3a38 if_mvneta: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:22 -07:00