Commit Graph

281181 Commits

Author SHA1 Message Date
Mateusz Guzik
bef67a0f15 mvneta: add the missing include opt_mvneta.h
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-02-07 19:20:05 +00:00
Justin Hibbits
b34a60c54f Mechanically convert vtbe(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37844
2023-02-07 14:16:18 -05:00
Justin Hibbits
37d22ce087 Mechanically convert mana to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37835
2023-02-07 14:16:18 -05:00
Justin Hibbits
67fd4c9d07 Mechanically convert oce(4) to IfAPI
Reviewed By:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37829
2023-02-07 14:16:17 -05:00
Justin Hibbits
2c50292d06 Mechanically convert liquidio(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37828
2023-02-07 14:16:17 -05:00
Justin Hibbits
b9545c5794 Mechanically convert vnic to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37827
2023-02-07 14:16:17 -05:00
Justin Hibbits
0b2813768b Mechanically convert mlx4(4) to IfAPI
Reviewed by:	hselasky, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37823
2023-02-07 14:16:11 -05:00
Justin Hibbits
04abf87b2a Mechanically convert sfxge(4) to IfAPI
Reviewed by:	arybchik, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37817
2023-02-07 14:15:49 -05:00
Justin Hibbits
cc970676d2 Mechanically convert if_sume(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37808
2023-02-07 14:15:49 -05:00
Justin Hibbits
08ca347fc7 Mechanically convert stge(4) to IfAPI
Reviewed By:	zlei, melifaro
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37807
2023-02-07 14:15:48 -05:00
Justin Hibbits
2fda7967b6 Mechanically convert usb_ethernet(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37802
2023-02-07 14:15:45 -05:00
Justin Hibbits
dba12f7560 Mechanically convert if_xae to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37797
2023-02-07 14:15:04 -05:00
Justin Hibbits
b4ad37f693 Mechanically convert atse(4) to IfAPI
Reviewed by:	zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37795
2023-02-07 14:15:04 -05:00
Jung-uk Kim
eb9b98fb5a OpenSSL: Regen manual pages for OpenSSL 1.1.1t 2023-02-07 14:01:15 -05:00
Jung-uk Kim
f1cf49002d OpenSSL: Regen assembly files for OpenSSL 1.1.1t 2023-02-07 13:55:17 -05:00
Jung-uk Kim
fb31345581 OpenSSL: Merge OpenSSL 1.1.1t 2023-02-07 13:54:16 -05:00
Jung-uk Kim
640242a591 OpenSSL: Merge OpenSSL 1.1.1t
Merge commit '0d51f658515c605fcc4a8073cb5a8e0d7d904088'
2023-02-07 13:51:38 -05:00
Dag-Erling Smørgrav
146d9da6c2 tarfs: Silence warnings when no supported compression is enabled.
Some of the code in sys/fs/tarfs/tarfs_io.c is not specific to zstd, but is still only used when some form of decompression is enabled.  Put it behind #ifdef TARFS_ZIO to silence warnings.

Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D38415
2023-02-07 18:31:25 +01:00
Gleb Smirnoff
220d892129 inpcb: immediately return matching pcb on lookup
This saves a lot of CPU cycles if you got large connection table.

The code removed originates from 413628a7e3, a very large changeset.
Discussed that with Bjoern, Jamie we can't recover why would we ever
have identical 4-tuples in the hash, even in the presence of jails.
Bjoern did a test that confirms that it is impossible to allocate an
identical connection from a jail to a host. Code review also confirms
that system shouldn't allow for such connections to exist.

With a lack of proper test suite we decided to take a risk and go
forward with removing that code.

Reviewed by:		gallatin, bz, markj
Differential Revision:	https://reviews.freebsd.org/D38015
2023-02-07 09:21:52 -08:00
Gleb Smirnoff
dfc4d218ce tcp: use straight in_pcbconnect() in tcp_connect()
This brings tcp_connect() par with tcp6_connect().  The code removed
now is a remnant of "truncating old TIME-WAIT" removed back in 2004
in c94c54e4df.

Reviewed by:		markj, tuexen
Differential Revision:	https://reviews.freebsd.org/D38405
2023-02-07 09:21:52 -08:00
Jung-uk Kim
0d51f65851 Import OpenSSL 1.1.1t 2023-02-07 12:05:11 -05:00
Tijl Coosemans
8932f7ce17 local-unbound-setup: Use default root certificates
Don't force /etc/ssl/cert.pem.  It does not exist by default, only if
security/ca_root_nss is installed.  Just use the default OpenSSL search
locations which are /etc/ssl/cert.pem and /etc/ssl/certs/.

The tls-system-cert option was added in Unbound 1.16.0.

Reviewed by:	zlei
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38243
2023-02-07 11:13:33 +01:00
Dmitry Chagin
de59f46a82 bsdlabel: Fix whitespace.
MFC after:		1 week
2023-02-07 10:43:40 +03:00
Dmitry Chagin
901b050b36 bsdlabel: Remove a write-only variable.
Since r149061 (2005) the total_size variable is write-only.

Differential Revision:	https://reviews.freebsd.org/D38368
MFC after:		2 weeks
2023-02-07 10:43:18 +03:00
John Baldwin
e396612511 cxgbe T6 KTLS: Use intotcpcb().
Fixes:		e68b379244 tcp: embed inpcb into tcpcb
Sponsored by:	Chelsio Communications
2023-02-06 17:07:53 -08:00
Ed Maste
77934b7a13 ssh: default X11Forwarding to no, following upstream
Administrators can enable it if required.

Reviewed by:	bz, kevans
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37411
2023-02-06 18:41:10 -05:00
Olivier Cochard
d22c5c42e8 Skip if_wg regression tests if module doesn't exist
Approved by:	jhb
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D38406
2023-02-07 00:06:48 +01:00
Stefan Eßer
b92f8e5c0d usr.sbin/kbdcontrol.c: Add backwards compatibility functions
This commit allows a kbdcontrol binary built with a version of kbio.h
that supports Unicode characters in dead key maps to load and display
keymaps including the dead key tables on a kernel built with a
previous version of kbio.h (that only supported 8 bit characters in
the dead key map).

This commit is meant as a temporary compatibility shim that will be
reverted when it can be assumed that all relevant systems have been
upgraded to a kernel that uses the updated kbio.h.

MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38388
2023-02-06 23:56:44 +01:00
Stefan Eßer
4972fb9276 Support Unicode characters in keymap dead key tables
Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.

This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.

Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.

Reviewed by:	imp, brooks
Approved by:	brooks
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38381
2023-02-06 23:48:47 +01:00
Bartosz Sobczak
a527c18cd7
irdma(4): Add code for compilation on stable/13 branch
Current content of the irdma(4) driver consists only of code that is
compilable on current 14-CURRENT branch which makes it impossible to
merge into stable/13 branch because of missing dependencies in the ofed
tree.

This patch adds missing code that allows for merging into stable branch.
Once it is there, code relating only to version 14 or higher should be
removed.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38170
2023-02-06 14:37:39 -08:00
Piotr Kubaj
c0548bfc3a
em(4): Add IDs for new Intel(R) I219 devices
These include I219 (20) through I219 (23), which ends at Raptor Lake.

This also corrects a discrepancy where the (16) devices should be
mac type "e1000_pch_tgp" and not "e1000_pch_adp".

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

PR:		269224
Reviewed by:	erj@
MFC after:	1 day
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38376
2023-02-06 14:35:56 -08:00
Mateusz Guzik
819ed47204 amd64 pmap: patch up a comment in pmap_init_pv_table
Requested by:	jhb
2023-02-06 22:33:28 +00:00
Val Packett
393b0ba25f LinuxKPI: return an address string in pci_name()
amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to:	https://github.com/freebsd/drm-kmod/issues/134
Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	bz, hselasky, manu (earlier)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D34248
2023-02-06 21:56:39 +00:00
Ed Maste
f374ba41f5 ssh: update to OpenSSH 9.2p1
Release notes are available at https://www.openssh.com/txt/release-9.2

OpenSSH 9.2 contains fixes for two security problems and a memory safety
problem.  The memory safety problem is not believed to be exploitable.
These fixes have already been committed to OpenSSH 9.1 in FreeBSD.

Some other notable items from the release notes:

 * ssh(1): add a new EnableEscapeCommandline ssh_config(5) option that
   controls whether the client-side ~C escape sequence that provides a
   command-line is available. Among other things, the ~C command-line
   could be used to add additional port-forwards at runtime.

 * sshd(8): add support for channel inactivity timeouts via a new
   sshd_config(5) ChannelTimeout directive. This allows channels that
   have not seen traffic in a configurable interval to be
   automatically closed. Different timeouts may be applied to session,
   X11, agent and TCP forwarding channels.

 * sshd(8): add a sshd_config UnusedConnectionTimeout option to
   terminate client connections that have no open channels for a
   length of time. This complements the ChannelTimeout option above.
    
 * sshd(8): add a -V (version) option to sshd like the ssh client has.

 * scp(1), sftp(1): add a -X option to both scp(1) and sftp(1) to
   allow control over some SFTP protocol parameters: the copy buffer
   length and the number of in-flight requests, both of which are used
   during upload/download. Previously these could be controlled in
   sftp(1) only. This makes them available in both SFTP protocol
   clients using the same option character sequence.
    
 * ssh-keyscan(1): allow scanning of complete CIDR address ranges,
   e.g.  "ssh-keyscan 192.168.0.0/24". If a CIDR range is passed, then
   it will be expanded to all possible addresses in the range
   including the all-0s and all-1s addresses. bz#976

 * ssh(1): support dynamic remote port forwarding in escape
   command-line's -R processing. bz#3499

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2023-02-06 16:54:56 -05:00
John Baldwin
70efe1a2fe ccr,ccp: Fix argument order to sglist_append_vmpages.
The offset comes before the byte count.

Reported by:	br
Reviewed by:	asomers, markj
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38375
2023-02-06 13:51:57 -08:00
Stefan Eßer
4fca8e0f65 contrib/bc: uodate to version 6.2.4
This update contains only documentation changes (new main repository
URL and changed mail address of the program author) and changes to
the build system that do not affect the FreeBSD base system build.

MFC after:	3 days
2023-02-06 22:33:56 +01:00
Doug Ambrisko
bbd354cb23 enic: convert to IfAPI
Prompted by:	jhibbits
2023-02-06 13:19:48 -08:00
Eugene M. Kim
a1e3fb8fa0 Fix _REVISION to be always major.minor
Introduced in commit 613fe53, _REVISION was redefined to be just the
major version (14) instead of major.minor (14.0) iff:

  - PKG_VERSION was not overridden (default), and
  - Branch was -CURRENT, -STABLE, or -PRERELEASE.

This introduced side effects in other parts of the code which expected
_REVISION to be major.minor:

  - make-pkg-package.sh target triple became amd64-portbld-freebsd14
    (should be amd64-portbld-freebsd14.0);
  - Versioned cross dev symlink name became amd64-freebsd14-<tool>
    (should be amd64-freebsd14.0-<tool>)

Also, compounded with commit ea9a92d (which was introduced afterward
and removed minor version from _REVISION incorrectly using :S with a
regex) this also caused pkgbase repo to use a wrong PKG_ABI with a minor
version (FreeBSD:14.0:amd64) when a custom PKG_VERSION was specified.
(Note, without a custom PKG_VERSION the bug was not triggered because in
that case _REVISION was already major-only.)

This commit fixes both problems by introducing and using MAJOR_REVISION
instead of redefining _REVISION.  Existing uses of _REVISION now see
major.minor again, except PKG_ABI (ex: FreeBSD:14:amd64, as described
above) and PKG_VERSION (ex: 14.snap20220311121531) need only the major
version and now use MAJOR_REVISION instead.

PR: 262600, 262601
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/592
2023-02-06 14:02:32 -07:00
Justin Hibbits
96ab5e7199 mge(4): Fix build after IfAPI conversion
Fixes:		98fe10c8fc
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:56:22 -05:00
Justin Hibbits
932370ddd4 sbni(4): Fix i386 build
Fixes:		3fba06ad
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:56:22 -05:00
Maxim Konovalov
fb8f221aeb db_printf: fix a typo
PR:	269377
2023-02-06 20:41:05 +00:00
Stefan Eßer
d804497068 md5/tests: extend md5 test
The testloop function is called with various parameters, but those
were ignored in the coreutils-c-test script. This was an oversight
and is fixed by passing the option to all invocations of the hash
functions in this test script.

Reported by:	des
MFC after:	3 days
2023-02-06 21:25:44 +01:00
Justin Hibbits
d8b78838c5 tsec(4): Fix the build from IfAPI conversion
Fixes:		47842ecfe
Sponsored by:	Juniper Networks, Inc.
2023-02-06 15:23:52 -05:00
Mitchell Horne
f711d5c3d0 libdtrace: add riscv support
Largely untested, as we can't really do anything with user probes
without an implementation of fasttrap. However, this is enough to
generate an embedded dtrace program with `dtrace -G` and link the
generated ELF file.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38301
2023-02-06 15:26:53 -04:00
Mitchell Horne
2166649fa1 libdtrace: drop remaining mips support
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38300
2023-02-06 15:26:53 -04:00
Mitchell Horne
c6943b44f7 dtrace: implement riscv dtrace_getustackdepth()
Pretty trivial following other implementations. The existing
dtrace_getustack_common() does most of the work.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38303
2023-02-06 15:26:53 -04:00
Jessica Clarke
3872010732 dtrace: Fix RISC-V user stack unwinder
The unwind logic was copied from AArch64 which follows the peculiar
AACPS (where, unlike typical RISC architectures, its frame pointer
follows an x86/stack machine-like convention where the frame pointer
points at the bottom of the frame record, not the top). Delete the
pointless riscv_frame struct and fix this.

Reviewed by:	mhorne
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28054
2023-02-06 15:26:53 -04:00
Mitchell Horne
06faad1de2 dtrace: handle page faults in riscv dtrace_trap()
We must detect the correct amount to increment sepc, as it may have been
a compressed instruction that triggered the fault.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38299
2023-02-06 15:26:53 -04:00
Mitchell Horne
0e563bde48 dtrace_asm.S: properly enter/exit user access
In order to read or write userspace memory without generating an access
fault, we must first enable the SUM bit in the sstatus CSR.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38298
2023-02-06 15:26:53 -04:00
Val Packett
4a1c4de232 Allow sysctl hw.machine/hw.machine_arch in capability mode
There's no harm in reading strings like 'amd64'.

Reviewed by: emaste, manu
Sponsored by: https://www.patreon.com/valpackett
Differential Revision: https://reviews.freebsd.org/D28703
2023-02-06 14:00:52 -05:00