Commit graph

294294 commits

Author SHA1 Message Date
Mark Johnston c9c2452a25 unix tests: Skip random_eor_and_waitall unconditionally
This test always fails, I don't see any reason to make it conditional on
the "CI" test parameter.

There is at least one test bug here, we're using the wrong sysctl to
obtain the receive buffer size, but fixing that is not sufficient.

PR:		279354
Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46726
2024-09-25 07:44:14 -04:00
Navdeep Parhar ee3da604dd cxgbe(4): Clobber all tracer state on stop and redo only traceq on restart.
Tracers have to be recreated after a restart but that's okay given that
they are used for debugging only.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-09-24 16:52:22 -07:00
Bjoern A. Zeeb 5b8f97d8db usb: change LIST to SLIST to avoid LinuxKPI conflicts
In order to better integrate modern LinuxKPI USB this tries to reduce
a contention point of "LIST".  Given there is no need to use a LIST here
change it to SLIST to avoid conflicts.
It is a workaround which does not solve the actual problem (overlapping
namespaces) but it helps us a lot for now.

Sponsored by:	The FreeBSD Foundation
X-MFC?		unclear
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D46534
2024-09-24 22:53:28 +00:00
Gleb Smirnoff a00c3a94bf tcp: remove remnants of 20+ year old disabled code from d912c694ee
Fixes:	90ad2dc287
2024-09-24 14:36:10 -07:00
Bjoern A. Zeeb e3b12ef6f7 Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:17:56 +00:00
Bjoern A. Zeeb 3c0de76f06 Merge remote-tracking branch 'freebsd/vendor/Linux/rtw88'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:17:45 +00:00
Bjoern A. Zeeb c9f9342a48 Merge remote-tracking branch 'freebsd/vendor/Linux/mt76'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:17:31 +00:00
Bjoern A. Zeeb bbd5885bfc Merge remote-tracking branch 'freebsd/vendor/Linux/iwlwifi'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:17:18 +00:00
Bjoern A. Zeeb d8f6658c9a Merge remote-tracking branch 'freebsd/vendor/Linux/ath12k'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:17:04 +00:00
Bjoern A. Zeeb 182375d342 Merge remote-tracking branch 'freebsd/vendor/Linux/ath11k'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:16:49 +00:00
Bjoern A. Zeeb 114f709b08 Merge remote-tracking branch 'freebsd/vendor/Linux/ath10k'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:16:34 +00:00
Bjoern A. Zeeb 413c5e9082 Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common'
Sponsored by:	The FreeBSD Foundation
2024-09-24 21:06:19 +00:00
Warner Losh 604919c47f loader: Fix 0 vs 1 confusion for column numbers
In two places we use '0' for a column number. However, the upper left
hand corner of the screen is 1, 1. Fix those two confusions. Also, fix
a comment that flipped the coordinates in a comment (I'm used to the
vt100 convention where it's row, column (eg y, x)) and didn't notice
the rest of the code uses x, y.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D46777
2024-09-24 14:18:42 -06:00
John Baldwin 1b3fa1ac36 nvmft: Defer datamove operations to a pool of taskqueue threads
Some block devices may request datamove operations from an ithread
context while holding locks.  Queue datamove operations to a taskqueue
backed by a thread pool to safely permit blocking allocations, etc. in
datamove handling.

Reviewed by:	asomers
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D46551
2024-09-24 16:16:11 -04:00
Ed Maste 3cf834d069 linuxulator: ignore AT_NO_AUTOMOUNT for all stat variants
Commit ff39d74aa9 ignored AT_NO_AUTOMOUNT for statx(), but did not
change fstat64() or newfstatat(), which also take an equivalent flags
argument.  Add a linux_to_bsd_stat_flags() helper and use it in all
three places.

PR:		281526
Reviewed by:	trasz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46711
2024-09-24 13:58:42 -04:00
Graham Percival ce251baf42 ipf.5: revert C style(9) applied to man page
These changes were made by accident in:
    ipfilter: Adjust userland returns to conform to style(9)
    2582ae5740

That commit made similar mistakes in other man pages, but those have
already been fixed.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1433
2024-09-24 14:29:39 -03:00
Warner Losh 3fb656f8ef loader: Use printc instead of print to fit in 24,80
print automatically adds a newline, while printc does not. Use printc in
preference to print for managing the autoboot message. This means we can
use line 24 safely on a 24x80 terminal, restoring some functionality
that was lost in 101afbc6ee.

Note: we still set the default curosor position to 25,1 in screen.lua,
but real VT100s (and successors) will treat any row larger than the
pnumber of rows in a cursor motion command to be the last physical row
(this is so you can move to 9999,9999 and do a cursor location query to
get the size of the screen). Keeping that as is looks better on a
typical VGA console.

Fixes: 101afbc6ee
Sponsored by: Netflix
Reviewed by: kevans
Differential Revision:	https://reviews.freebsd.org/D46771
2024-09-24 10:57:11 -06:00
Gordon Bergling 044f94adff timeout(1): Update STANDARDS section
Update the STANDARDS section for timeout(1) to
POSIX 1003.1-2024.

Update mandoc to be able to render the
new POSIX macro.

Reviewed by:	bapt, bcr
Approved by:	bapt
Obtained from:	OpenBSD
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45691
2024-09-24 18:42:18 +02:00
Navdeep Parhar 3883300afe cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update.
An L2 entry in the driver's hash was marked STALE unconditionally if it
changed in the kernel when its driver refcount is 0.  Fix the driver to
do this for VALID entries only.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-09-24 08:53:11 -07:00
Kevin Bowling bf085659da Revert "ixl: Increase tx/rx ring size to 8160"
iflib enforces powerof2 on the ring size:
panic: Assertion powerof2(sctx->isc_nrxd_max[i])

Revert until this change is better understood.

Reported by:	tuexen

This reverts commit 14561f1eda.
2024-09-24 03:58:50 -07:00
Kevin Bowling c9021340a3 e1000: Add sysctl for igb(4) DMA Coalesce
This feature can increase efficiency at the expense of latency

It does not work well with the default interrupt delay, but expose
the otherwise unconnected code in the driver in case people want to
experiment.

See
https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf

MFC after:	1 week
Sponsored by:	Blue Box Systems
2024-09-24 03:47:05 -07:00
Kevin Bowling 2e78e568c2 e1000: Handle igb EEE sysctl
MFC after:	1 week
Sponsored by:	Blue Box Systems
2024-09-24 03:15:58 -07:00
Kevin Bowling aa7d086ad9 e1000: Add sysctls for some missing MAC stats
MFC after:	1 week
Sponsored by:	Blue Box Systems
2024-09-24 03:00:18 -07:00
Ka Ho Ng 1d910b5f88 dirdeps: update Makefile.depend for toolchain
Sponsored by:	Juniper Networks, Inc.
2024-09-24 01:24:45 +00:00
Ka Ho Ng 306113630d libthr: add libsys for dirdeps build
Sponsored by:	Juniper Networks, Inc.
2024-09-24 01:24:36 +00:00
Ka Ho Ng 8067debcd1 dirdeps: update/fix Makefile.depend.host for hosttools
There were some leftover bits not picked up in 018a491dce.

Sponsored by:	Juniper Networks, Inc.
2024-09-24 00:26:20 +00:00
Ka Ho Ng 018a491dce dirdeps: Update Makefile.depend.host for hosttools
Sponsored by:	Juniper Networks, Inc.
2024-09-23 23:52:28 +00:00
Joseph Mingrone 0a7e5f1f02 tcpdump: Update to 4.99.5
Changes:        https://git.tcpdump.org/tcpdump/blob/4a789712f187e3ac7b2c0044c3a3f8c71b83646e:/CHANGES
Obtained from:  https://www.tcpdump.org/release/tcpdump-4.99.5.tar.xz
Sponsored by:   The FreeBSD Foundation
2024-09-23 20:23:25 +01:00
Doug Moore f1aaef47a0 swap_pager: update meta_free comment
Clarify the comment that introduces swp_page_meta_free.

Reviewed by:	markj, alc
Differential Revision:	https://reviews.freebsd.org/D46754
2024-09-23 13:27:54 -05:00
Doug Moore 940fec94b5 swap_pager: deoptimize swapoff_object
Undo a change in swap_pager_swapoff_object that assumed a swap block
would be valid after reacquiring a lock, when that validity cannot be
assumed.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46753
2024-09-23 12:11:55 -05:00
Mateusz Piotrowski 6e414739fc rc.subr.8: Fix the Bl macro of a list which is actually a table
MFC after:	2 weeks
2024-09-22 19:25:11 +01:00
Mateusz Piotrowski 859868156a rc.subr.8: Do not use mdoc macros for Bl width
Macros do not expand there.

MFC after:	1 week
2024-09-22 19:25:11 +01:00
Mateusz Piotrowski 91fac46bf7 rc.d/dnctl: Chmod +x for consistency with other rc scripts
MFC after:	1 week
Approved by:	bnovkov
2024-09-22 19:24:39 +01:00
Dimitry Andric f97c7fdc59 Bump lld LINKER_FREEBSD_VERSION for reproducibility fix
The upstream fix to make lld output for our EFI loaders reproducible
again was committed in 54521a2ff9. Bump lld's LINKER_FREEBSD_VERSION
to be able to check this in the EFI loader Makefile.

MFC after:	3 days
2024-09-22 19:12:38 +02:00
Dimitry Andric 54521a2ff9 Merge commit b84d773fd004 from llvm git (by Fangrui Song):
[Parallel] Revert sequential task changes

  https://reviews.llvm.org/D148728 introduced `bool Sequential` to unify
  `execute` and the old `spawn` without argument. However, sequential
  tasks might be executed by any worker thread (non-deterministic),
  leading to non-determinism output for ld.lld -z nocombreloc (see
  https://reviews.llvm.org/D133003).

  In addition, the extra member variables have overhead.
  This sequential task has only been used for lld parallel relocation
  scanning.

  This patch restores the behavior before https://reviews.llvm.org/D148728 .

  Fix #105958

  Pull Request: https://github.com/llvm/llvm-project/pull/109084

This fixes the non-reproducibility we had noticed when linking our EFI
loaders, and for which we committed a workaround in f5ce3f4ef5.

MFC after:	3 days
2024-09-22 19:12:17 +02:00
Warner Losh f5a8f6f71a rtld: Catch up to 07d90ee0a6 in subr_prf.c: Fix '+' conversion handling
Sponsored by:		Netflix
2024-09-22 10:52:11 -06:00
Ariel Ehrenberg 3503aa0cdc mlx5en: Handle install SA for ipv6 encapsulated case
Pass the right encap flag to network card

Sponsored by:	NVidia networking
MFC after:	1 week
2024-09-22 19:06:02 +03:00
Rozhuk Ivan bbf71b3159 sound: Fix SEQ_SYSEX() macro
Correct implementation also found in Linux's soundcard.h:
https://github.com/torvalds/linux/blob/master/include/uapi/linux/soundcard.h#L1178

seq_processevent() interprets event[1] as device number and does not
work properly with current SEQ_SYSEX() implementation.

Note: soundcard.h has its own funky style, which this commit follows

Reviewed by: imp, christos
Pull Request: https://github.com/freebsd/freebsd-src/pull/1374
2024-09-22 09:27:29 -06:00
Alexander Ziaee f8afe99cc8 efibootmgr: minor cleanup (spdx, typos, see also)
This page was getting pulled into `apropos unix` results due to
arguments being on the same line as a name macro in synopsis.
While here, tag spdx, fold a line slightly better, add loader.efi(8)
to see also and fix it's order.

MFC after:	3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1430
2024-09-22 09:21:39 -06:00
Bojan Novković 29a6f8fd93 vm: Use VM_ALLOC_NOFREE when allocating bogus_page
Allocate the 'bogus_page' page using VM_ALLOC_NOFREE since
it never gets released.

Differential Revision:	https://reviews.freebsd.org/D46699
Reviewed by:	alc, markj, kib
2024-09-22 16:02:53 +02:00
Warner Losh 17cccb6f90 libsa: Fix a comment to be less vague
Be more specific about where this is used.

Sponsored by:		Netflix
2024-09-22 07:32:00 -06:00
John F. Carr 00b0498051 Fix xo_emit format string for percentages
The "%lld" format string was used with a value of type long.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278532.

Reviewed by: imp, mmel
Pull Request: https://github.com/freebsd/freebsd-src/pull/1344
2024-09-22 07:26:46 -06:00
Warner Losh d00827a9ca Revert "netstat: Resolve duplicate "dropped-packets" key from libxo output"
This reverts commit 94567c8641.

This breaks normal netstat output. It's kinda tricky to do a quick fix
on, so revert this until that can be fixed. If via github, please
open a new pull request...

Sponsored by:		Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
2024-09-22 07:23:10 -06:00
Ayrton Munoz 1f0174c927 arm64: Add support for FIQs
arm64 supports FIQs, fast interrupt requests, which are required by
Apple silicon which hardwires the ARM timers to FIQs. This is needed by
the upcoming Apple Interrupt Controller. Based on work by andrew@ and
kevans@ in https://reviews.freebsd.org/D40161.

Signed-off-by: Ayrton Munoz <a.munoz3327@gmail.com>
Co-authored-by: Kyle Evans <kevans@FreeBSD.org>
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>
Reviewed-by: imp,mmel,mhorne
Pull-Request: https://github.com/freebsd/freebsd-src/pull/1363
2024-09-22 07:18:34 -06:00
Ayrton Munoz 85918beb38 intrng: Add support for multiple interrupt roots
Different types of interrupts may require using different exception
vectors so this commit adds support multiple interrupt roots to handle
these cases. Archs may opt-in to multiple interrupt roots by defining
INTR_ROOT_NUM as the number of roots in their intr.h. Based off
https://reviews.freebsd.org/D40161.

Signed-off-by: Ayrton Munoz <a.munoz3327@gmail.com>
Co-authored-by: Kyle Evans <kevans@FreeBSD.org>
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>
Reviewed-by: imp,mmel,mhorne
Pull-Request: https://github.com/freebsd/freebsd-src/pull/1363
2024-09-22 07:18:34 -06:00
Ed Maste a305f44d14 bhyve: validate corb->wp to avoid infinite loop
Guests must set HDAC_CORBWP less than corb->size.  Treat invalid values
as an error rather than entering an infinite loop.

Reported by:	Synacktiv
Reviewed by:	markj
Security:	HYP-12
Sponsored by:	The Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46134
2024-09-22 07:25:02 -04:00
Pavel Timofeev 4004e1752e hda: remove duplicate codec defines
Reviewed by:	emaste
Fixes: 35e492f3bd ("Update list of Conexant and Realtek codecs.")
Differential Revision: https://reviews.freebsd.org/D45965
2024-09-22 06:43:49 -04:00
Colin Percival 74a28cf6e7 loader: Load platform entropy even without menu
In 5c73b3e0a3 calls to core.loadEntropy were added to core.boot
and core.autoboot; but neither of those is invoked if we disable
the "beastie" menu.  Add a core.loadEntropy call to the no-menu
path.

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Amazon
Fixes:	5c73b3e0a3 ("Add support for getting early entropy from UEFI")
Differential Revision:	https://reviews.freebsd.org/D46637
2024-09-22 00:35:48 -07:00
Colin Percival 714a6d4368 EC2: Set entropy_efi_seed_size to 64
This dramatically improves boot speeds on Graviton 2 instances.

MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46636
2024-09-22 00:35:48 -07:00
Colin Percival c8ebbd28aa loader: Expand EFI entropy if < 2048 bytes
The EFI RNG on some platforms takes a long time if we request 2048
bytes of entropy, so we would like to request less; but our kernel
Fortuna RNG needs to be fed 2048 bytes in order to consider itself
"fully seeded".  If we have between 64 bytes (the size of a single
Fortuna pool and enough to guarantee cryptographic security) and
2048 bytes (what Fortuna wants) then the boot process will hang
waiting for more entropy despite in fact having enough to operate
securely.

Since 64 bytes of entropy is plenty to be cryptographically secure
(an attack of cost ~ 2^128 is infeasible, which implies a mere 16
bytes of entropy), use PBKDF2 (aka pkcs5v2_genkey_raw) to spread
the entropy across 2048 bytes.  This is secure since PBKDF2 has
the property that every subset of output bytes has within O(1) of
the maximum possible amount of entropy.

Reviewed by:	pjd
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46635
2024-09-22 00:35:48 -07:00