Commit Graph

284233 Commits

Author SHA1 Message Date
Dmitry Chagin
c8dbef44ff xregs_sig: Add avx registers to test
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40384
2023-06-04 12:07:02 +03:00
Dmitry Chagin
0be13a45f7 xregs_sig: Add a ability to handle multiple register banks
While here replace the .global directive by traditionally used .globl.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40410
2023-06-04 12:06:25 +03:00
Jamie Gritton
086e0149ae jail: Use re-entrant versions of lex & yacc, and lex's yylineno 2023-06-03 20:07:09 -07:00
Jamie Gritton
097db30a8e jail: Allow nested jail definitions.
Make the jail.conf specification recursive, with jail definitions
allowed within a jail's parameter list, just as they are allowed
at the top level.  Such inner jails are part of the outer jail's
hierarchy, as if they were specified with hierarchical names.
2023-06-03 17:45:54 -07:00
Daniel Kolesa
fa6fa98ac7 sh(1): initialize smark to zero in main()
As popstackmark may be called on this without pushstackmark having
been called, we need to initialize it so that we don't get a bogus
comparison inside popstackmark, which would have resulted in a
NULL pointer dereference.

MFC After:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D40413
2023-06-03 23:09:31 +02:00
Christos Margiolis
47a5d58e3b kinst: fix kinst_probe_md field indentation
Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40411
2023-06-03 23:03:14 +03:00
Christos Margiolis
d434607b3d kinst: use bool where appropriate
Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40412
2023-06-03 23:02:53 +03:00
Dmitry Chagin
e5b3cd6100 xregs_sig: Simplify Makefile by using MACHINE_CPUARCH in SRCS
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40383
2023-06-03 20:13:23 +03:00
Dmitry Chagin
1b0d96f3c4 xregs_sig: Finish renaming simd to xregs before adding avx
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40382
2023-06-03 20:11:44 +03:00
Dmitry Chagin
8fdc9ce97c avx_sig: Better naming as the test will include more register banks
Reviewed by:		jhb, kib (early revision)
Differential Revision:	https://reviews.freebsd.org/D40381
2023-06-03 20:10:49 +03:00
Christos Margiolis
9b091f1200 kinst: simplify trampoline fill definitions
Centralize KINST_TRAMP_FILL_PATTERN and KINST_TRAMP_FILL_SIZE to reduce
redefinitions, and use the architecture-dependent kinst_patchval_t as
their size.

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40406
2023-06-03 20:04:57 +03:00
Christos Margiolis
980746e5cb fbt: simplify arm64 function-prologue parsing
Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40364
2023-06-03 20:04:33 +03:00
Christos Margiolis
bab7781e78 dtrace: deduplicate arm64 breakpoint definition
Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40363
2023-06-03 20:04:10 +03:00
Doug Rabson
4a6b92849e pf: Fix tests broken by enabling inet-local filtering
Summary:
Three of the pf dummynet tests were using filter rules which matched
both the intended epair interface as well as lo0 which now receives
PFIL_OUT events for messages delivered to the local network stack (if
enabled). This commit changes the rules to match only for the expected
epair interface.

PR:             268717
Reviewed-by:	kp
MFC-after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D40393
2023-06-03 11:07:56 +01:00
Konstantin Belousov
8dad5ece49 dd(1): neutralize SIGINT while non-async-signal safe code is executing
making the SIGINT handler (the terminate() function) safe to execute at
any interruption moment.  This fixes a race in
5807f35c54 where SIGINT delivered right
after the check_terminate() but before a blocking syscall would not
cause abort.

Do it by setting the in_io flag around potentially blocking io syscalls.
If handler sees the flag, it terminates the program.  Otherwise,
termination is delegated to the before_io/after_io fences.

Reviewed by:	Andrew Gierth <andrew@tao146.riddles.org.uk>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40281
2023-06-03 01:06:27 +03:00
Shailend Chand
54dfc97b0b Add gve, the driver for Google Virtual NIC (gVNIC)
gVNIC is a virtual network interface designed specifically for
Google Compute Engine (GCE). It is required to support per-VM Tier_1
networking performance, and for using certain VM shapes on GCE.

The NIC supports TSO, Rx and Tx checksum offloads, and RSS.
It does not currently do hardware LRO, and thus the software-LRO
in the host is used instead. It also supports jumbo frames.

For each queue, the driver negotiates a set of pages with the NIC to
serve as a fixed bounce buffer, this precludes the use of iflib.

Reviewed-by: 		markj
MFC-after:		2 weeks
Differential Revision: https://reviews.freebsd.org/D39873
2023-06-02 14:31:54 -07:00
Mina Galić
0981275c75 rc(8): document how to reload rc's configuration
The fact that rc(8) only reads its configuration once is in the man
page, but how to trigger a reload is only in the code.

Discovered while trying to make cloud-init disable and stop syslogd.

Thanks to RhodiumToad for providing the words.

Reviewed by:           debdrup, grahamperrin
Approved by:           grahamperrin, imp
MFC after:             1 week
Sponsored by:          The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D40329
2023-06-02 19:27:37 +01:00
Mark Johnston
556b434922 ossl: Compile newly added files into the kernel if so requested
Fixes:	9a3444d91c ("ossl: Add a VAES-based AES-GCM implementation for amd64")
Fixes:	9b1d87286c ("ossl: Add a fallback AES-GCM implementation using AES-NI")
2023-06-02 13:43:15 -04:00
Mark Johnston
056305d3aa ipsec: Make algorithm tables read-only
No functional change intended.

MFC after:	1 week
2023-06-02 13:43:15 -04:00
Mark Johnston
7266f52498 x86: Mark the CPU idle function table as const
No functional change intended.

MFC after:	1 week
2023-06-02 13:43:15 -04:00
Mark Johnston
67f938c5ff kevent: Make references to filter definitions const
Follow-up revisions can make individual filter definitions const.  No
functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35842
2023-06-02 13:43:15 -04:00
John Baldwin
ee06552d62 <sys/memrange.h>: Include <sys/ioccom.h>.
This makes this header more self-contained.

Reviewed by:	imp, markj
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D40387
2023-06-02 10:40:46 -07:00
Alexander Motin
30ff1255fc Fix panic in nfs bootp/diskless after 0785c323f3.
If there is no interface, count won't be initialized, while cnt is
not even relevant. Check ifp, that really matters, and delete count.
2023-06-02 12:57:26 -04:00
Mateusz Piotrowski
1e078fb602 nproc.1: Fix "first appeared in" details
nproc(1) has been MFC'ed into 13-STABLE and made it into 13.2-RELEASE.

MFC after:	3 days
2023-06-02 18:53:55 +02:00
Mark Johnston
6a3e9a885a nlsysevent: Fix the EXPORT_SYMS definition
EXPORT_SYMS=YES has a special meaning, EXPORT_SYMS=yes does not.

Fixes:	8a2af0b469 ("nlsysevent: add a genetlink(4) module to report kernel events")
2023-06-02 12:17:44 -04:00
Mark Johnston
9b1d87286c ossl: Add a fallback AES-GCM implementation using AES-NI
This lets one use ossl(4) for AES-GCM operations on contemporary amd64
platforms.  A kernel benchmark indicates that this gives roughly
equivalent throughput to aesni(4) for various buffer sizes.

Bulk processing is done in aesni-gcm-x86_64.S, the rest is handled in a
C wrapper ported from OpenSSL's gcm128.c.

Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Reviewed by:	jhb
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D39967
2023-06-02 12:17:11 -04:00
Mark Johnston
9a3444d91c ossl: Add a VAES-based AES-GCM implementation for amd64
aes-gcm-avx512.S is generated from OpenSSL 3.1 and implements AES-GCM.
ossl_x86.c detects whether the CPU implements the required AVX512
instructions; if not, the ossl(4) module does not provide an AES-GCM
implementation.  The VAES implementation increases throughput for all
buffer sizes in both directions, up to 2x for sufficiently large
buffers.

The "process" implementation is in two parts: a generic OCF layer in
ossl_aes.c that calls a set of MD functions to do the heavy lifting.
The intent there is to make it possible to add other implementations for
other platforms, e.g., to reduce the diff required for D37421.

A follow-up commit will add a fallback path to legacy AES-NI, so that
ossl(4) can be used in preference to aesni(4) on all amd64 platforms.
In the long term we would like to replace aesni(4) and armv8crypto(4)
with ossl(4).

Note, currently this implementation will not be selected by default
since aesni(4) and ossl(4) return the same probe priority for crypto
sessions, and the opencrypto framework selects the first registered
implementation to break a tie.  Since aesni(4) is compiled into the
kernel, aesni(4) wins.  A separate change may modify ossl(4) to have
priority.

Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Reviewed by:	jhb
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D39783
2023-06-02 12:15:01 -04:00
Mark Johnston
9ad8dc721e ossl: Expose more CPUID bits in OPENSSL_ia32cap_P
This is needed to let OpenSSL 3.1 routines detect VAES and VPCLMULQDQ
extensions.  The intent is to import ASM routines which implement
AES-GCM using VEX-prefixed AES-NI instructions.

No functional change intended.

Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D39782
2023-06-02 12:15:01 -04:00
Gleb Smirnoff
7811cca872 netlink: fix compilation withous INET6
Fixes:	a77facd273
2023-06-02 09:10:26 -07:00
Andrew Turner
dd23557528 arm64: Fix the definition of ID_AA64DFR1_EL1 2023-06-02 16:24:15 +01:00
Andrew Turner
4baf5db06c Add more arm64 ID registers
These will be used by bhyve to emulate these registers.

Sponsored by:	Arm Ltd
2023-06-02 16:24:15 +01:00
Andrew Turner
8cca8e248f arm64: Correct a pmap unlock in pmap_stage2_fault
This is used by bhyve so was not an issue as it is still in development.
Sponsored by:	Arm Ltd
2023-06-02 16:24:15 +01:00
Ed Maste
533de2d7a9 Vendor import of Spleen font 2.0.0 2023-06-02 10:17:27 -04:00
Kristof Provost
460f0aaf7b pf: fix log message
Use __func__ so we log the correct function name.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-06-02 16:05:30 +02:00
Kristof Provost
9925aee0aa pf: carry over rule actions from route-to rules
If we route-to (or dup-to/reply-to) we re-run pf_test(), which will also
create states for the connection.
This means that we may end up matching a different (i.e. not the state
that was created by the route-to rule) state, without the attributes
(such as dummynet pipes/queues) set by the route-to rule.

Address this by inheriting the pf_rule_actions from the route-to rule
while evaluating the connection again in pf_test(). That is, we set
default pf_rule_actions based on the route-to rule for the new
evaluation. The new rule may still overrule these, but if it does not
have such actions the route-to actions are applied.

Do the same for IPv6 rules in pf_test6()/pf_route6().

See also:	https://redmine.pfsense.org/issues/14039
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D40340
2023-06-02 16:05:30 +02:00
Pierre Pronchery
caf98b9d13 dumpon: Request the OpenSSL 1.1 API
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update may migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Pull request:	https://github.com/freebsd/freebsd-src/pull/757
Sponsored by:	The FreeBSD Foundation
2023-06-02 10:00:48 -04:00
Alexander V. Chernikov
c1839039b1 netlink: use netlink mbufs in the mbuf chains.
Continue D40356 and switch the remaining parts of mbuf-related
code to the Netlink mbufs.

Reviewed By: gallatin
Differential Revision: https://reviews.freebsd.org/D40368
MFC after:	2 weeks
2023-06-02 13:14:20 +00:00
Baptiste Daroussin
9908461193 nlsysevent: add default command to the events 2023-06-02 14:22:10 +02:00
Baptiste Daroussin
0bcb3ebd1f nlsysevent: deduplicate the code and split into smaller functions
No functional changes intended

Suggested by:	melifaro
2023-06-02 10:19:27 +02:00
Baptiste Daroussin
3f9c093dfe nlsysevent: rename variables for clarity of the code
Suggested by:	melifaro
2023-06-02 10:04:49 +02:00
Baptiste Daroussin
cef0bbae37 nlsysevent: specify all netlink header the same way 2023-06-02 09:55:42 +02:00
Tom Hukins
409594ef34 gpart(8): Improve manual page syntax
Fix various warnings from `mandoc -Tlint lib/geom/part/gpart.8`.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702
2023-06-01 20:43:04 -06:00
Tom Hukins
d275d2e3d3 gpart(8): Refer to a related manual page
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702
2023-06-01 20:41:34 -06:00
Tom Hukins
2bcbf4d831 camcontrol(8): Use simpler language
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702
2023-06-01 20:41:33 -06:00
Tom Hukins
2675b8bd3d camcontrol(8): Add manual page cross references
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702
2023-06-01 20:41:32 -06:00
Tom Hukins
3e1af044c9 cam(3): Add a manual page cross reference
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702
2023-06-01 20:41:31 -06:00
Olivier Certner
d0b0bc37a3 ports(7): '*-list' targets: Add/fix doc on whether they are recursive
Signed-off-by: Olivier Certner <olce.freebsd@certner.fr>
Reviewed-by: imp
Pull-request: https://github.com/freebsd/freebsd-src/pull/691
2023-06-01 20:38:16 -06:00
Warner Losh
ed96987b4c mfiuitl: Spell acquire correctly 2023-06-01 20:33:42 -06:00
Elyes Haouas
f6a119cf8d zfsd: Fix typo in comment
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:42 -06:00
Elyes Haouas
a57ca37dd1 iovctl: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:42 -06:00