Commit graph

294349 commits

Author SHA1 Message Date
Stephen J. Kiernan c644d3d896 libsys: Add dependencies for dirdeps build 2024-09-18 13:03:42 -04:00
Stephen J. Kiernan 9e2b87207b Allow additional "options" files to be specified in kernel config
The "includeoptions" directive can be used to specify an additional
options file to be used.

This is useful in conjunction with the "files" directive for build
environments to be able to add custom files and options.

Add "-v" flag to enable verbose mode. Added some additional error
messages when in verbose mode.

Obtained from:	Juniper Networks, Inc.
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D39540
2024-09-18 13:02:42 -04:00
Dag-Erling Smørgrav abed32f91d realpath(3): Minor style issues.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46695
2024-09-18 18:29:55 +02:00
Stephen J. Kiernan e47161e5f1 loader: update dependencies for dirdeps build
Add dependencies for MK_FDT and MK_FORTH knobs
Update dependencies for MK_LOADER_LUA knob
2024-09-18 11:22:34 -04:00
Stephen J. Kiernan 77d7da1dc8 Revert "mca: Allow for passing ECC error record to memory controller driver"
This reverts commit 996a832d2e.
2024-09-18 10:44:37 -04:00
Stephen J. Kiernan 996a832d2e mca: Allow for passing ECC error record to memory controller driver
Added (de)registration functions for memory controller driver to be
notified when ECC errors occur. This allows for decoding of the
specific error by the driver.

Submitted by:	Lakshman Likith Nudurupati <lnlakshman@juniper.net>
Sponsored by:	Juniper Networks, Inc.
Obtained from:	Semihalf
2024-09-18 10:37:14 -04:00
Richard Scheffenegger 0a05ea1f56 tcp: keep syncache flags when updating ECN info
While processing the ECN flags of an incoming packet,
incorrectly cleared all other syncache flags.

Reported by: tuexen
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D46694
2024-09-18 11:18:30 +02:00
Colin Percival 279734be11 RELNOTES: Document EC2 SSH RSA host key desupport.
Sponsored by:	Amazon
2024-09-17 23:51:53 -07:00
Colin Percival 0aabcd75db EC2: Disable RSA host key generation for sshd
These are largely obsolete, and generating them is responsible for
over 10% of the total boot time of EC2 instances.

Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D46638
2024-09-17 23:47:58 -07:00
Stefan Eßer 9b04aee86c vendor/bc: upgrade to version 7.0.2
This update fixes exiting from an interactive bc session with ^D on
FreeBSD and Linux when using editline.

This bug was caused by the macOS fix for editline in version 7.0.0,
which has been reverted in this version.

(cherry picked from commit c2c85f88902d18d2e9702381f1628112e15a5c3c)

MFC after:	3 days
Reported by:	mack@macktronics.com
2024-09-18 08:12:19 +02:00
Gordon Bergling 3e614fb600 e1000: Fix a typo in a source code comment
- s/chekcsums/checksums/

MFC after: 3 days
2024-09-18 04:32:41 +02:00
Cheng Cui ee45061051
cc_cubic: use newreno to emulate AIMD in TCP-friendly region
Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D46546
2024-09-17 10:37:00 -04:00
Cheng Cui b6c137de0a
tcp cc: re-organize newreno functions into parts that can be re-used
Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D46046
2024-09-17 09:54:17 -04:00
Konstantin Belousov 666303f598 sysarch: improve checks for max user address
making LA48 processes have the same limit as with the pre-LA57 kernels.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov 29a0a720c3 amd64 sysarch(2): style
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov e134cd9580 amd64: pml5 entries do not support PAT bits
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov 4f82af24f1 amd64 pmap: do not set PG_G for usermode pmap pml5 kernel entry
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov bbb00b1719 pmap_bootstrap_la57(): reload IDT
after the trip through protected mode.  This is required by AMD64 ARM.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Navdeep Parhar 07f47e8850 cxgbe/t4_tom: completely avoid L2T entries during stop/suspend.
1. Mark the L2T entry valid only if t4_write_l2e succeeds, which won't
   happen if the adapter is stopped.  This prevents L2T entries from
   sometimes getting (re)promoted to VALID on Tx activity during stop.
2. Discard a work request immediately instead of enqueueing it to the
   arp queue if the adapter is stopped.

Fixes:	c1c524852f cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-09-16 10:24:32 -07:00
Tom Jones 855c3dacfc imx clk: Skip reconfiguring the clock if we don't have a new best_parent
imx_clk_composite_find_best_parent can fail, when it does for all the
clocks checked we attempt to configure an uninitialized best_parent
leading to a panic.

Initialize best_parent and skip reconfiguring the clock if we don't find
a new best_parent to use.

Reviewed By: manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46662
2024-09-16 15:45:26 +01:00
Kristof Provost 80eb861dc2 pfctl: lex <=, >=, and != into a single token
lex <=, >=, and != into a single token for correctness and to reduce the
lookahead in the parser
ok henning otto

Reviewed by:	zlei
Obtained from:	OpenBSD, deraadt <deraadt@openbsd.org>, e6e3ecf338
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46582
2024-09-16 13:48:58 +02:00
Kristof Provost 357c95ea46 pf tests: ensure we correctly optimize { any, 192.0.2.3 }
Reviewed by:	zlei
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46581
2024-09-16 13:48:54 +02:00
Kristof Provost 637d81c52d pfctl: fix incorrect optimization
In the non-optimized case, an address list containing "any" (ie. { any 10.0.0.1 })
should be folded in the parser to any, not to 10.0.0.1.  How long this bug has
been with us is unclear.
ok guenther mcbride

Obtained from:	OpenBSD, deraadt <deraadt@openbsd.org>, e3b4bc25a0
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46580
2024-09-16 13:48:49 +02:00
Kristof Provost e80f2a1087 pf.conf.5: document received-on
Reviewed by:	zlei
Obtained from:	OpenBSD, dlg <dlg@openbsd.org>, 456093dddc
Obtained from:	OpenBSD, jmc <jmc@openbsd.org>, 2bf0158fa8
Obtained from:	OpenBSD, deraadt <deraadt@openbsd.org>, be785dc6e2
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46579
2024-09-16 13:48:40 +02:00
Kristof Provost 661d0031bb pf tests: test the new received-on feature
Reviewed by:	zlei
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46578
2024-09-16 13:48:20 +02:00
Kristof Provost 2339ead638 pf: allow filtering on the receive interface
add support to pf for filtering a packet by the interface it was received
on. use the received-on IFNAME filter option on a pf.conf rule to restrict
which packet the interface had to be received on. eg:

  pass out on em0 from $foo to $bar received-on fxp0

ive been running this in production for a week now. i find it particularly
usefull with interface groups.

no objections, and a few "i like"s from henning, claudio, deraadt, mpf

Obtained from:	OpenBSD, dlg <dlg@openbsd.org>, 95b4320893
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46577
2024-09-16 13:47:07 +02:00
Kristof Provost 50ecaf1bd4 pf: use AF_INET6 when comparing IPv6 addresses
Reviewed by:	zlei
MFC after:	1 week
Obtained from:	OpenBSD, henning <henning@openbsd.org>, cf7c0bf78a
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46576
2024-09-16 13:46:14 +02:00
Kristof Provost 2ca286d0d2 pf: always drop ICMPv6 in IPv4 datagrams
Not only when compiled with INET6.

Suggested by Max Laier.
ok henning@

Reviewed by:	zlei
Obtained from:	OpenBSD, jsing <jsing@openbsd.org>, 0ba1e6e32b9
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46575
2024-09-16 13:46:09 +02:00
Michael Tuexen 1c6bb4c578 tcp: remove TCP_OFFLOAD_DISABLE
TCP_OFFLOAD_DISABLE is nowhere else used or defined. So remove it.
No functional change intended.

Reviewed by:		np
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46669
2024-09-15 11:44:49 +02:00
Peter Holm 4f4b483d31 stress2: Added a comment about a problem found and fixed 2024-09-16 10:17:50 +02:00
Konstantin Belousov 678bc2281c la57: do not set global bit for PML5 entry
The bit is reserved for PLM5, causing #PF on KVA access on real
hardware, unlike QEMU.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:13:51 +03:00
Konstantin Belousov 280e50461a amd64 la57_trampoline: save registers in memory
AMD64 ARM states that 64bit part of the architectural state is undefined
after 32<->64 mode switching.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:12:25 +03:00
Konstantin Belousov 687b896f8e amd64 la57_trampoline: lgdt descriptor is always 10 bytes in long mode
Extend its storage to be compliant.
This is currently nop due to padding and nul gdt descriptor right after
the lgdt descriptor.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:11:54 +03:00
Konstantin Belousov 1be58e67eb amd64 la57_trampoline: turn off global pages and PCID before turning off paging
SDM is explicit that having CR4.PCID=1 while toggling CR3.PG causes #GP.
To be safe and to avoid some more effects, also turn off CR4.PGE.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:10:16 +03:00
Konstantin Belousov b7ea2b69ef amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57
Changing paging mode while LME is set seems to be not allowed.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	jThe FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:09:38 +03:00
Konstantin Belousov 9a49c98baf amd64 la57_trampoline: stop using %rdx to remember original %cr0
Store %cr0 in %ebp.  %rdx is needed for MSR access.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:09:20 +03:00
Konstantin Belousov 180c8ab079 amd64 la57_trampoline: jump immediately after re-enabling paging
Literally follow requirements from SDM and execute jmp right after
%cr0 CR0_PG bit is toggled back.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:09:03 +03:00
Konstantin Belousov 787259bfe5 amd64 pmap: flush whole TLB after LA57 trampoline is installed
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:08:53 +03:00
Konstantin Belousov 2912c2fbd4 amd64 pmap: be more verbose around entering and leaving LA57 trampoline
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:08:53 +03:00
Doug Moore bae517022c swap_pager: enhance meta_transfer comments
Clarify comments about what happens to source blocks in
swp_pager_meta_transfer.  No functional changes.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D46682
2024-09-16 00:31:11 -05:00
Konstantin Belousov 4b273a7fb9 softdep_mount: report failure of the softdepflush thread creation
and do not hang waiting forever for an ack from non-existing thread.

PR:	281511
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-15 17:59:10 +03:00
Konstantin Belousov 8276c6ea9c softdep_mount: on journal start failure, report the mount point path
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-15 17:59:02 +03:00
Konstantin Belousov e3b777534b procstat(1): make rlimit_param[] size assertion automatic
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-15 09:30:13 +03:00
Konstantin Belousov 3a2a5d6060 getrlimit(2): document RLIMIT_UMTXP
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-15 09:30:00 +03:00
Doug Moore 4ccad54520 swap_pager: avoid meta_transfer race
Function swp_pager_meta_transfer expects that after dropping and
reacquiring an object lock, the swap block it's processing still
exists, and has not been removed from the trie and freed.  Rewrite to
avoid depending on that, by scrubbing, removing and freeing it before
releasing the lock.

Reviewed by:	alc, markj
Differential Revision:	https://reviews.freebsd.org/D46629
2024-09-15 01:00:00 -05:00
Joseph Mingrone f0bcebe67e
pflogd: Define structures removed in libpcap-1.10.5
In libpcap-1.10.5, two structures that we rely on, pcap_timeval and
pcap_sf_pkthdr, were made private.

c2d8cbb977

Temporarily define them here to fix the build.  kp and I will
investigate a permanent solution at EuroBSDCon in Dublin.

Reviewed by:	kp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46676
2024-09-14 17:28:27 -03:00
Enji Cooper 77864b545b sys/crypto/openssl: update powerpc* ASM
This change updates the crypto powerpc* ASM via the prescribed process
documented in `crypto/openssl/FREEBSD-upgrade`.

This change syncs the ASM with 3.0.15's generated ASM.

MFC after:	1 week
MFC with:	a7148ab39c
MFC with:	cc717b574d
Differential Revision:	https://reviews.freebsd.org/D46604
2024-09-14 12:38:17 -07:00
Colin Percival 0a5443da81 man4: Add a comment about Hardware Notes
The Hardware Notes for each release are generated automatically from a
template file and the HARDWARE sections of driver man pages.  When man
pages for new drivers are added here, they should usually be added to
the release notes template file.

Suggested by:	bz
Sponsored by:	Amazon
2024-09-14 12:23:31 -07:00
Robert Clausecker 61ed5748e4 lib/libc/tests/string: improve memccpy "bounds" unit test
The purpose of the "bounds" test is to check that the function does not
overread the array bounds.  The old unit test, copied from the strlcpy()
one, always ensured that we see the character c memccpy() is looking for
in the source array before the array ends.  While this is correct for
strlcpy(), memccpy()'s specification does not guarantee that c is
present within the given size limit.

The updated test handles this case better, ensuring that the source
array ends early if c is not supposed to be present.

Reported by:	getz
Approved by:	emaste
See also:	D46052
Event:		GSoC 2024
Differential Revision:	https://reviews.freebsd.org/D46051
2024-09-14 20:42:19 +02:00
Joseph Mingrone ecb75be376
libpcap: Add changes missed in update to 1.10.5
Fixes:		afdbf109c6 (libpcap: Update to 1.10.5)
Sponsored by:	The FreeBSD Foundation
2024-09-14 14:35:58 -03:00