Commit Graph

283688 Commits

Author SHA1 Message Date
Michael Tuexen
113f56ba49 tcp_rack: allow the module to be loaded without TCP_BLACKBOX
PR:			271091
Reviewed by:		cc
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D39860
2023-05-06 11:02:50 +02:00
Ed Maste
3e696dfb70 libfido2: update to 1.10.0
Some highlights from NEWS:

 ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*();
    gh#480.
 ** New API calls:
  - fido_dev_info_set;
  - fido_dev_io_handle;
  - fido_dev_new_with_info;
  - fido_dev_open_with_info.
 ** Documentation and reliability fixes.
 ** Support for TPM 2.0 attestation of COSE_ES256 credentials.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:57:34 -04:00
Ed Maste
f540a43052 libfido2: update to 1.9.0
Some highlights from NEWS:

 ** Added OpenSSL 3.0 compatibility.
 ** Removed OpenSSL 1.0 compatibility.
 ** Support for FIDO 2.1 "minPinLength" extension.
 ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation.
 ** Support for TPM 2.0 attestation.
 ** Support for device timeouts; see fido_dev_set_timeout().
 ** New API calls:
  - es256_pk_from_EVP_PKEY;
  - fido_cred_attstmt_len;
  - fido_cred_attstmt_ptr;
  - fido_cred_pin_minlen;
  - fido_cred_set_attstmt;
  - fido_cred_set_pin_minlen;
  - fido_dev_set_pin_minlen_rpid;
  - fido_dev_set_timeout;
  - rs256_pk_from_EVP_PKEY.
 ** Reliability and portability fixes.
 ** Better handling of HID devices without identification strings; gh#381.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:11:52 -04:00
Rick Macklem
648a208ef3 nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers
If the i-node number (d_fileno) for a file on the server did
not fit in 32bits, it would be truncated to the low order 32bits
for the NFSv3 Readdir and ReaddirPlus RPC replies.
This is no longer correct, given that ino_t is now 64bits.

This patch fixes this by sending the full 64bits of d_fileno
on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply.

PR:	271174
Reported by:	bmueller@panasas.com
Tested by:	bmueller@panasas.com
MFC after:	2 weeks
2023-05-05 15:43:55 -07:00
Doug Ambrisko
7e0f8b79b7 Add mrsasutil(8) as alias to mfiutil(8)
mfiutil(8) in theory can work on devices attached to mrsas(4) but
mrsas(4) is missing the FreeBSD mfi(4) ioctl support.  Once that
support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4)
attached devices.  So this commit depends on that.  When mrsasutil(8)
is run it automatically opens /dev/mrsas0 instead of /dev/mfi0.
Add -D <device> and -t <type> flag to optionally specify mrsas or mfi to
work with the existing -u <unit>.  Device is the device node with or
without /dev/

PR:			https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794
Differential Revision:	https://reviews.freebsd.org/D36343
Tested by:		Dan Mahoney <freebsd@gushi.org>
Reviewed by:		jhb
2023-05-05 09:20:48 -07:00
Dimitry Andric
2df58f1907 Apply libc++ fix for compiling <type_traits> with gcc 13
Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath):

  [libc++] Use __is_convertible built-in when available

  https://github.com/llvm/llvm-project/issues/62396 reports that
  GCC 13 barfs on parsing <type_traits> because of the declarations
  of `struct __is_convertible`.  In GCC 13, `__is_convertible` is a
  built-in, but `__is_convertible_to` is not.  Clang has both, so
  using either should be fine.

  Reviewed By: #libc, philnik

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

Reported by:	Mark Millard <marklmi@yahoo.com>
MFC after:	3 days
2023-05-05 18:19:40 +02:00
Alexander Motin
190290a9ac
Fix two abd_gang_add_gang() issues.
- There is no reason to assert that added gang is not empty.  It
may be weird to add an empty gang, but it is legal.
 - When moving chain list from the added gang clear its size, or it
will trigger assertion in abd_verify() when that gang is freed.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14816
2023-05-05 09:17:55 -07:00
Pawel Jakub Dawidek
6fa6bb051c
Simplify and optimize random_int_between().
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #14805
2023-05-05 09:09:12 -07:00
Pawel Jakub Dawidek
599df82049
Plug memory leak in zfsdev_state.
On kernel module unload, free all zfsdev state structures, except for
zfsdev_state_listhead, which is statically allocated.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #14824
2023-05-05 08:51:41 -07:00
Kyle Evans
494e7dfdbe daemon: EINTR from kevent(2) is not a fatal error
Simply resume waiting for events rather than exiting if we took a signal
here.

This at least fixes running programs under daemon(8) in the face of
suspend/resume, which I suspect hits us with a spurious EINTR rather
than a signal anyways.

Reported and tested by:	manu
Fixes:	8935a39932 ("daemon: use kqueue for all events")
2023-05-05 10:28:40 -05:00
Joseph Koshy
c2eae5c39a
man9: Add a manual page for kstack_contains(9).
Approved by:	gnn (mentor)
Reviewed by:	mhorne
Differential Revision: https://reviews.freebsd.org/D39933
2023-05-05 15:42:59 +01:00
Piotr Kubaj
448045e4a7 share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU
MFC after:	3 days
Approved by:	jhibbits
Differential revision:	https://reviews.freebsd.org/D39240
2023-05-05 16:20:28 +02:00
Joseph Mingrone
dd744a896b libpcap: Update to 1.10.4
Changelog:	https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES
Reviewed by:	emaste
Obtained from:	https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz
Sponsored by:	The FreeBSD Foundation
2023-05-05 10:56:10 -03:00
Corvin Köhne
b10e100d16
vmm: don't free unallocated memory
If vmx or svm is disabled in BIOS or the device isn't supported by vmm,
modinit won't allocate these state save areas. As kmem_free panics when
passing a NULL pointer to it, loading the vmm kernel module causes a
panic too.

PR:			271251
Reviewed by:		markj
Fixes:			74ac712f72 ("vmm: Dynamically allocate a couple of per-CPU state save areas")
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39974
2023-05-05 15:34:00 +02:00
Alexey Marchenko
66659955da bhyve(8): fix typo in examples
PR:		271259
2023-05-05 15:08:51 +02:00
Dag-Erling Smørgrav
5807f35c54 dd: Fix SIGINT handling.
Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup().  There are several issues with this:

* summary() is not signal safe;
* the parent is not informed about the signal;
* setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands.

Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write().

Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading.  I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	cracauer, ngie, imp
Differential Revision:	https://reviews.freebsd.org/D39641
2023-05-05 12:42:32 +00:00
Dag-Erling Smørgrav
dabef9818f dd: Tidy up the tests.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D39711
2023-05-05 12:42:32 +00:00
Ed Maste
f705765261 Makefile.inc1: use make builtin :ts instead of sed
Commit 3eb1b4da3cf7 replaced "xargs -n1" with a sed expression to
convert from space to newline as a list separator for *-old-* targets.
Dan Nelson followed up with a suggestion to use make's built-in :ts
instead, which should be slightly more efficient.

Reviewed by:	sjg
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39972
2023-05-05 08:14:35 -04:00
Kristof Provost
8216f1a9cc pf: fix a few more prototypes
Fix function prototypes to use the same type for sa_family_t as the
definition.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-05 13:41:02 +02:00
Yuri Pankov
6abf81b3d6 pvscsi: maximum target number is one less than number of targets
Fix the number of targets we inquiry to be one less than the maximum
number of targets adapter reports.  This gets rid of the errors reported
on VMware Workstation:

(probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error

While here, print the maximum number of targets.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D39867
2023-05-05 11:51:44 +02:00
Mina Galic
fff1551c03 ntpd: Support IPv6-only hosts
0.pool.* returns only IPv4 addresses.
2.pool.* returns both, IPv6 and IPv4 addresses.

conservatively extend our IPv4 only pool configuration by adding a
second pool, which also returns IPv6 addresses.

PR:			270536
Reported by:		Lapo Luchini <lapo@lapo.it>
MFC after:		3 days
Pull Request:		https://github.com/freebsd/freebsd-src/pull/731
Differential Revision:	https://reviews.freebsd.org/D39954
2023-05-04 21:37:02 -07:00
Ed Maste
fa4651d7ea build.7: remove reference to deprecated mergemaster
Sponsored by:	The FreeBSD Foundation
2023-05-04 21:14:06 -04:00
Igor Ostapenko
a1f2b76761 sys/x86/x86/mptable.c: typo (compatiblity)
https://bugs.freebsd.org/269753

PR:                      269753
Reported by:             Igor Ostapenko
Approved by:             doc, src (delphij, imp, zlei)
Differential revision:   https://reviews.freebsd.org/D38741
2023-05-05 01:23:09 +01:00
Igor Ostapenko
6f9f3b726b sys/sys/_endian.h: typo (Compatiblity)
https://bugs.freebsd.org/269753

PR:                      269753
Reported by:             Igor Ostapenko
Approved by:             doc, src (delphij, imp, zlei)
Differential revision:   https://reviews.freebsd.org/D38741
2023-05-05 01:23:09 +01:00
Igor Ostapenko
74081dc2bc sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity)
https://bugs.freebsd.org/269753

PR:                      269753
Reported by:             Igor Ostapenko
Approved by:             doc, src (delphij, imp, zlei)
Differential revision:   https://reviews.freebsd.org/D38741
2023-05-05 01:23:08 +01:00
Igor Ostapenko
0167b5a793 sys/amd64/conf/FIRECRACKER: typo (compatiblity)
https://bugs.freebsd.org/269753

PR:                      269753
Reported by:             Igor Ostapenko
Approved by:             doc, src (delphij, imp, zlei)
Differential revision:   https://reviews.freebsd.org/D38741
2023-05-05 01:23:08 +01:00
Warner Losh
a1bae244b6 Add wifi(4) alias for wlan(4).
Suggested by:		jrtc27
Sponsored by:		Netflix
2023-05-04 16:20:56 -06:00
Tom Hukins
af32969ddb mpsutil(8): Remove a stray paragraph
Spotted by running `mandoc -Tlint usr.sbin/mpsutil/mpsutil.8`.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/729
2023-05-04 16:06:28 -06:00
Tom Hukins
910733a6f9 mpsutil(8): Improve English usage
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/729
2023-05-04 16:06:28 -06:00
Tom Hukins
560a7d2584 mpr(4) & mps(4): refer to related utilities
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/729
2023-05-04 16:06:27 -06:00
Brian Campbell
9affcf438b bluetooth/hccontrol: Fix unterminated command list
Signed-off-by: Brian Campbell <Brian.Campbell@ed.ac.uk>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/730
2023-05-04 16:01:36 -06:00
Tom Hukins
8fb0f07c7a wlan(4): Mention WiFi more prominently
WiFi is a commonly used term to describe wireless LANs.  Adding this
word will help readers better understand the contents of this manual
page and will help find the page when searching, for example when
running `man -k wifi`.

Pull Request: https://github.com/freebsd/freebsd-src/pull/721
Reviewed by: imp
2023-05-04 15:59:12 -06:00
John Baldwin
6cf4b46197 emac(4): Use bool rather than boolean_t.
This was already using true/false rather than TRUE/FALSE.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39927
2023-05-04 12:34:02 -07:00
John Baldwin
afdb42987c ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D39926
2023-05-04 12:33:39 -07:00
John Baldwin
2fd903276d dwc(4): Use bool rather than boolean_t.
This was already using true/false rather than TRUE/FALSE.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39925
2023-05-04 12:33:20 -07:00
John Baldwin
1efae8a24f dpaa2: Replace boolean_t with bool.
This was already using true/false rather than TRUE/FALSE.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39924
2023-05-04 12:32:57 -07:00
John Baldwin
463edaf441 al: Replace boolean_t with either al_bool or bool.
Use al_bool for interfaces and structures defined in the
OS-independent HAL in sys/contrib, and use plain bool for
FreeBSD-specific APIs and structures in sys/dev/al_eth.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39923
2023-05-04 12:32:40 -07:00
John Baldwin
65c92e48c4 acpi_button: Replace boolean_t with better types.
- Use an enum for the button type (it is not really a boolean value).

- Use bool for fixed.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39922
2023-05-04 12:32:09 -07:00
John Baldwin
4961faaacc pmap_{un}map_io_transient: Use bool instead of boolean_t.
Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D39920
2023-05-04 12:29:48 -07:00
John Baldwin
407f675718 imgact_elf: Change header_supported to return bool instead of boolean_t.
Reviewed by:	imp, kib, emaste
Differential Revision:	https://reviews.freebsd.org/D39919
2023-05-04 12:29:29 -07:00
Simon J. Gerraty
b75d7e2cbe md5 Makefile.depend.host 2023-05-04 12:03:34 -07:00
Simon J. Gerraty
e5e345a4b0 local.dirdeps.mk skip N_host_libs for non-FreeBSD host
The N_host_libs dance only makes sense if host is FreeBSD.
Even then, if MK_host_egacy is yes we need libmd

libnetbsd does not need libutil when using libegacy

Sponsored by:	Juniper Networks, Inc.
2023-05-04 11:58:39 -07:00
Dag-Erling Smørgrav
cb46f47c79 tsort: Error out if writing to stdout failed.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D39959
2023-05-04 18:51:11 +00:00
Dag-Erling Smørgrav
5903d9c00b ncal: Error out if writing to stdout failed.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D39958
2023-05-04 18:51:10 +00:00
Simon J. Gerraty
ba4d333364 dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE
This helps avoid ugly noise in dirdeps.cache on Linux.
2023-05-04 11:29:33 -07:00
Simon J. Gerraty
42d088299c Update meta.sys.mk ensure DEP_* set at level 1+ 2023-05-04 09:46:47 -07:00
Kristof Provost
bf206a1db2 pf: remove NULL check before uma_zfree()
uma_zfree() can be called on a NULL pointer. Simplify the pf code a
little by removing the redundant checks.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-04 18:22:54 +02:00
Ed Maste
0d66206fff Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb'
git-subtree-dir: contrib/spleen
git-subtree-mainline: 3582acbad3
git-subtree-split: 5eab6333fa

Reviewed by:	imp [earlier]
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20653
2023-05-04 11:46:40 -04:00
Konstantin Belousov
3582acbad3 amd64 mp_machdep.c: remove useless comment
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39945
2023-05-04 18:39:22 +03:00
Konstantin Belousov
af1c6d3f30 amd64: do not leak pcpu pages
Do not preallocate pcpu area backing pages on early startup, only
allocate enough of KVA for pcpu[MAXCPU] and the page for BSP.  Other
pages are allocated after we know the number of cpus and their
assignments to the domains.

PCPUs are not accessed until they are initialized, which happens on AP
startup.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D39945
2023-05-04 18:39:22 +03:00