1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00
Commit Graph

295287 Commits

Author SHA1 Message Date
Graham Percival
759ddb4d24 manuals: Misc syntax fixes
These were reported by `mandoc -T lint ...` as errors.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1472
2024-10-28 12:26:03 -03:00
Mark Johnston
abfd031b48 camcontrol: Plug a memory leak in getdevtree()
PR:		275338
MFC after:	1 week
2024-10-28 15:14:36 +00:00
Mark Johnston
01c738cd5c if_tuntap: Enable MEXTPG support
Fix tunread() to use m_mbuftouio() instead of manually copying (which
doesn't work for unmapped mbufs).

Reviewed by:	jhb, gallatin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47295
2024-10-28 15:14:36 +00:00
Mark Johnston
2bbfbf80d3 if_bridge: Mask MEXTPG if some members don't support it
Similar to how the network stack needs to use mb_unmapped_to_ext() to
convert mbufs before passing them to an unsupported driver, if_bridge
needs to avoid passing M_EXTPG mbufs to interfaces that don't support
them.  Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces
don't handle unmapped mbufs.

PR:		278245
Reviewed by:	jhb, gallatin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47294
2024-10-28 15:14:21 +00:00
Mark Johnston
878ede1a0d fstyp: Fix some memory safety bugs
In the hammer2 label reader, make sure to check for a NULL return from
read_buf().

In the NTFS label reader,
- Avoid an infinite loop if a record length is 0.
- Avoid walking past the end of the buffer.
- When a label is found, avoid reading past the end of the buffer.

PR:		278281
Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47292
2024-10-28 15:03:53 +00:00
Bjoern A. Zeeb
2ac644317e iwlwifi,rtw88,rtw89: connect to build again
Sponsored by:	The FreeBSD Foundation
Fixes:		f0b989348f (revert)
MFC after:	14 days
2024-10-28 14:42:37 +00:00
Bjoern A. Zeeb
6d67aabd63 rtw89: update Realtek's rtw89 driver.
This adds support for the Realtek 8922AE PCI
wireless network (Wi-Fi 7) adapter.

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:   The FreeBSD Foundation
MFC after:	14 days
2024-10-28 14:42:36 +00:00
Bjoern A. Zeeb
11c53278a8 rtw88: update Realtek's rtw88 driver.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:   The FreeBSD Foundation
MFC after:      14 days
2024-10-28 14:42:32 +00:00
Bjoern A. Zeeb
a4128aad85 iwlwifi: update Intel's iwlwifi/mvm driver.
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
98f7e32f20d28ec452afb208f9cffc08448a2652 ( tag: v6.11 ).

Sponsored by:	The FreeBSD Foundation
MFC after:	14 days
2024-10-28 14:42:25 +00:00
Bjoern A. Zeeb
7b43f4d064 LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89
Bring in the LinuxKPI 802.11 compat bits which are altering
the mac80211 KPI.

* In struct ieee80211_bss_conf chandef -> chanreq.
* Various struct ieee80211_ops gained a link_id arguemnt,
  stop gained a suspend flag.
* Various functions gained a link_id argument.
* ieee80211_tx_status() was renamed to ieee80211_tx_status_skb()

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-10-28 12:16:06 +00:00
Bjoern A. Zeeb
f0b989348f iwlwifi,rtw88,rtw89: temporary disable build
I tried to use LINUXKPI_VERSION to work out a plan which allows us to
compile linuxkpi_wlan and the LinuxKPI based wireless drivers without
interruption and flip a switch on the go.

I assume, with a lot of extra detours making the linuxkpi_wlan
implementation KPI changes compile time dependent would have been
possible and might be needed in the future.

One problem is that the various drivers currently in main were from
different sources or different hashes of the Linux wireless-testing.git
repository at last and we have no common base to use and
LINUXKPI_VERSION checks seem to slightly overlap.
Pulling drivers from official Linux version releases now will avoid
that problem and keep all drivers on the same KPI level in the future
which should avoid this problem.

The other problem is that the merges from the vendor branches are
independent and so the first merge will need to have the LinuxKPI
changes before but in between the (old) drivers will not compile
(unless linuxkpi_wlan can deal with both KPI versions).

For this time it was simply not possible to align all the changes
and instead we disable building the drivers over the merge window
only not to break intermediate builds.  After LinuxKPI 802.11 was
updated and drivers are merged from vendor branches we will
re-attach them to the build.

Sponsored by:	The FreeBSD Foundation
2024-10-28 12:15:25 +00:00
Bjoern A. Zeeb
ac1d519c01 LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89
Bring ing the LinuxKPI 802.11 compat bits which are not altering
the mac80211 ops KPI.

* Add various functions for drvier updates.
* Add functions (some compat code to I assume cleanup some
  mac80211 ops) emulating chanctx changes doing (*config) updates.
* Adjust structs and defines.
* Deal with an enum growing more than 32 bits in printf.
* Add a mtx to struct wiphy which is exposed to the drivers.
  Handle initialization and destruction for now.
* Implementation of wiphy_work and wiphy_delayed_work.
* Set was_assoc for deassoc/deauth in prep_tx_info.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-10-28 12:05:06 +00:00
Robert William Vesterman
65691b2daf libexec/rc/rc.d/netif: Typo fix
Just fixing a typo ("configuriing" => "configuring").

MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1484
2024-10-27 20:30:19 -07:00
Gary Bisson
6a7aa5530c if_ffec: fix MAC address bootverbose print
Remove extraneous colon at the end.

MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1479

Signed-off-by: Gary Bisson <gary.bisson@ezurio.com>
2024-10-27 20:27:18 -07:00
Gary Bisson
c222619cd4 if_ffec: fix imx6sx compatible flags
The i.MX 6 SoloX does support Gigabit and AVB features as can be seen in
its technical reference manual [1] or even Linux kernel [2].

Fixes: 94bc2117b4 ("Add i.MX 8M Quad support")

[1] https://www.nxp.com/webapp/Download?colCode=IMX6SXRM
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/freescale/fec_main.c?h=linux-6.6.y#n206

MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1479

Signed-off-by: Gary Bisson <gary.bisson@ezurio.com>
2024-10-27 20:26:50 -07:00
Alexander Ziaee
f4bd011a38 ixl.4 + ice.4: intro sentence for HARDWARE notes
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1495
2024-10-27 20:18:14 -07:00
Alexander Ziaee
a1d1b9049b liquidio.4: remove extra search keywords
Approved by:	emaste
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1500
2024-10-27 20:15:17 -07:00
Alan Cox
2001bef84b vm: Eliminate unnecessary lock asserts
There is no actual need for the VM object to be locked when initializing
a VM page iterator.

Reviewed by:	dougm
Differential Revision:	https://reviews.freebsd.org/D47298
2024-10-27 14:03:52 -05:00
Wolfram Schneider
95b17d3b1c mktemp(3): bring the documentation up to date with best practice
Using short temp filenames as /tmp/temp.XXXX (4 or 6 X) was probably ok
20 years ago, but not anymore. Best practice is to use 10 X. Given that our
users often copy & paste examples from our manual pages we need to
update the documentation.

PR: 261437
2024-10-27 16:41:01 +00:00
Wolfram Schneider
93181e3834 mktemp(1): bring the documentation up to date with best practice
Using short temp filenames as /tmp/temp.XXXX (4 or 6 X) was probably ok
20 years ago, but not anymore. Best practice is to use 10 X. Given that our
users often copy & paste examples from our manual pages we need to
update the documentation.

PR: 261437
2024-10-27 16:36:31 +00:00
Michael Tuexen
d08713dcdb sctp: another cleanup
No functional change intended.

MFC after:	3 days
2024-10-27 15:01:45 +01:00
Alexander Ziaee
cadb71e4b0 ix.4: update crossreferences to ixgbe.4
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1494
2024-10-27 02:07:27 -07:00
Alexander Ziaee
2d28fd51e5 ix.4: describe better
+ add controller name to title for search keywords
- remove "for the freebsd operating system" from title/search keywords
- remove `(R)` from the page title for consistency with other drivers
- increase specificity of HARDWARE for inclusion in Release HW Notes
- order HARDWARE in reverse chronological so non-eol appear first
- s/PCI/PCIe/

MFC after:	3 days
Reported by:	kbowling (additional hardware supported)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1494
2024-10-27 02:06:53 -07:00
Felix Johnson
a340b46496 ix.4: document LOADER TUNABLES
PR:		213026
MFC after:	3 days
Co-authored-by:	Alexander Ziaee <concussious@runbox.com>
2024-10-27 02:01:35 -07:00
Felix Johnson
d8b48a267f ixgbe.4: rename to ix.4
PR:		213026
MFC after:	3 days
Reported by:	Sergey Akhmatov <sergey@akhmatov.ru>
Co-authored-by:	Alexander Ziaee <concussious@runbox.com>
2024-10-27 02:00:43 -07:00
Jeremiah Lott
b87b3696c9 ixv: Check cap return before MSI-X enable write
In the QEMU workaround code in if_ixv.c, the ixv driver calls
pci_find_cap(dev, PCIY_MSIX, &rid). It is not checking the return code
from that function and the function appears to always be failing. This
then causes the driver to use the rid variable uninitialized, which
will mean setting a bit at an arbitrary offset in pci config space. For
now, this seems to have no adverse impact, but it could easily cause
very subtle problems.

PR:		207037
MFC after:	3 days
Sponsored by:	BBOX.io
2024-10-27 00:18:54 -07:00
Konstantin Belousov
439fa16e1f x86: do not leak msi_lock in msix_alloc() on iommu remapping failure
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-27 03:50:15 +02:00
Konstantin Belousov
b0993e3bca if_ixv: fix build without NETMAP
Sponsored by:	The FreeBSD Foundation
2024-10-27 02:42:48 +03:00
Kevin Bowling
cdbe3de538 ixv: Dynamically size the receive packet size
If MTU of the if_ixv VF driver is configured between 1501 and 2030, and
if a peer box have bigger MTU and sends a packet bigger than MTU into
this guest, kernel could crash.

Dynamically calculate the receive packet size on rx_mbuf_sz as ix(4)
does.

PR:		268092
Reported by:	Kumara Babu <nkumarababu@gmail.com>
MFC after:	3 days
Sponsored by:	BBOX.io
2024-10-26 14:36:48 -07:00
Gleb Smirnoff
5fa2e50ea4 genl: fix typo 2024-10-26 14:09:20 -07:00
Mark Johnston
35d05a14ed igc: Remove a bogus register write in igc_if_queues_free()
As explained in PR 277038, iflib calls IFDI_DETACH() and then
IFDI_QUEUES_FREE().  With igc, the latter writes to a register after it
has been unmapped.

igc_if_detach() already calls igc_release_hw_control(), and looking at
callers of igc_if_queues_free(), that appears to be sufficient.  So,
just remove the igc_release_hw_control() call.

PR:		277038
Reported by:	Mike Belanger <mibelanger@qnx.com>
Reviewed by:	kbowling
Tested by:	kbowling
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47293
2024-10-26 21:05:40 +00:00
Diego Casati
20b823a59b ixgbe.4: Add flow director CAVEAT
Flow-director support is not fully implemented and will cause
errors if enabled. Mention this in the ixgbe(4) manual.

PR:		202663
MFC after:	3 days
Co-authored-by:	Alexander Ziaee <concussious@runbox.com>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1493
2024-10-26 13:37:06 -07:00
Mark Johnston
3e55170e0f rc.d/kld: Print modules being loaded, take three
Some kernel modules will print informative messages when they are
loaded, making the output confusing.  Print everything up front instead.

Fixes:	152382e661 ("rc.d/kld: Print the kernel modules being loaded")
2024-10-26 19:20:29 +00:00
Mark Johnston
cdb3cda6fd rc.d/kld: Avoid printing a trailing space
Fixes:		152382e661 ("rc.d/kld: Print the kernel modules being loaded")
Reported by:	jrtc27
2024-10-26 19:07:22 +00:00
Mark Felder
152382e661 rc.d/kld: Print the kernel modules being loaded
PR:		282269
MFC after:	2 weeks
2024-10-26 18:43:46 +00:00
Robert Clausecker
7ed159c6cc contrib/mandoc: add -isoC-2024 and -svid1 to mdoc(7)
C23 (ISO/IEC 9899:2024) is not out yet, but will be shortly.
SVID1 is needed for the history section of memccpy(3).

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47284
2024-10-26 20:11:02 +02:00
Robert Clausecker
87c2aab0a0 lib/libcrypt: reinstate CFLAGS+=-I${SRCTOP}/sys/crypto/sha2
This is apparently needed for the cross-build from Linux to succeed.

Fixes:		cb5e41b160
2024-10-26 20:11:02 +02:00
Doug Moore
39f6d1e7f8 swap_pager: iter in haspage, lookup, getpages
Use pctrie iterators for swblk traversal in more swap_pager
functions: swap_pager_haspage, swp_pager_meta_lookup, and
swap_pager_getpages.

Reported by:	markj
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D47232
2024-10-26 13:03:40 -05:00
Mark Johnston
f44029e322 linker: Make linker.h more self-contained
struct kld_file_stat embeds a reference to MAXPATHLEN, defined in
param.h.

PR:		280432
MFC after:	2 weeks
2024-10-26 14:05:56 +00:00
Ed Maste
52d895fe63 nfs: trivial typo fix
via is not an abbreviation and doesn't need a period.
2024-10-26 09:50:22 -04:00
Ed Maste
01a5af6a98 zstream: avoid absolute symlink
PR:		282192
Reported by:	wosch
Fixes:		44877c8db0
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47226
2024-10-26 08:53:16 -04:00
Wolfram Schneider
9d585fc395 absolute-symlink.sh: check for absolute symlinks on a FreeBSD system
The purpose of this script is to detect absolute symlinks on
a machine, e.g.:

    /etc/localtime -> /usr/share/zoneinfo/UTC

Some of these absolute symbolic links can be created intentionally,
but it is usually better to use relative symlinks.

You can run the script after `make installworld', or any other
make targets thats installs files.

You can also check your local ports with:

   env ABSOLUTE_SYMLINK_DIRS=/usr/local ./absolute-symlink.sh
2024-10-26 08:31:19 +00:00
Colin Percival
2d4219919a acpi_gpiobus: Narrow scope of NOT_YET
GPIO interrupts work just fine and will be used shortly.  We still
do not support GPIO_INTR_SHAREABLE however, so leave that within
the NOT_YET scope.

Reviwed by:	andrew
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47251
2024-10-25 19:34:57 -07:00
Colin Percival
bc0d10d01c gpiobus: Make gpiobus_read_ivar extern
This allows acpi_gpiobus to override the method and fall back to the
generic gpiobus_read_ivar function if needed.

Reviewed by:	andrew
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47250
2024-10-25 19:34:57 -07:00
Colin Percival
2f3f867ac6 ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2
AWS Graviton [1234] systems have a bug in their ACPI where they mark
the PL061's GPIO pins as needing to be configured in PullUp mode (in
fact the PL061 has no pullup/pulldown resistors); this flag needs to
be removed in order for _AEI objects to be handled on these systems.

Reviewed by:	Ali Saidi
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47239
2024-10-25 19:34:56 -07:00
Doug Moore
0d965bc034 subr_pctrie: improve iter nbr search
pctrie_toval(node) can be applied to either a leaf or an internal
node; in the latter case it provides the address of the pn_owner
field. In a couple of places where a neighbor search is about to begin
for an iterator, the current code distinguishes the leaf and non-leaf
cases in a way that isn't really necessary. This change shrinks each
function by 16 bytes, and by a branch instruction.

Reviewed by:	bnovkov
Differential Revision:	https://reviews.freebsd.org/D47207
2024-10-25 17:00:31 -05:00
Kyle Evans
4b01a7fa76 Revert "intrng: change multi-interrupt root support type to enum"
This reverts commit 536c8d948e.  The
change seemed fine on the surface, but converting to an enum has raised
some concerns due to the asm <-> C interface.  Back it out and let
someone else deal with it later if they'd like to.

Further context about the concerns can be found in D47279.
2024-10-25 16:18:40 -05:00
Robert Clausecker
d8cd2d0833 depend-cleanup.sh: clean up after hash function removal from libcrypt
The hash function removal changed the mangled names of MD[45] and
SHA{256,512} hash function identifiers.  Clean these files to pick
up the symbol change.

Reported by:	bapt
Tested by:	brooks
Fixes:		cb5e41b160
2024-10-25 22:56:04 +02:00
Mark Johnston
28c9b13b23 virtio_p9fs: Simplify vt9p_req_wait() a bit
Remove an always-false check for whether the request has already
completed before sleeping.  Even if the request is complete, the
response tag is updated while holding the channel lock, which is also
held here.

No functional change intended.

Sponsored by:	Klara, Inc.
2024-10-25 17:54:39 +00:00
Mark Johnston
1f6f247b35 virtio_p9fs: Check for completions after enabling interrupts
Otherwise we can end up with a lost interrupt, causing lost request
completion wakeups and hangs in the filesystem layer.

Continue processing until we enable interrupts and then observe an empty
queue, like other virtio drivers do.

Sponsored by:	Klara, Inc.
2024-10-25 17:53:11 +00:00