14.3: Update stable/14 to -PRERELEASE
This marks the start of the FreeBSD 14.3 release cycle; the stable/14
tree is now in "code slush".
Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time. Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.
Approved by: re (implicit)
Sponsored by: Amazon
vm_map: use page iterators in pmap_enter
Change vm_map_pmap_enter to use pctrie iterators to iterate over
pages, rather than using TAILQ links.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49896
vm_swapout: use VM_RADIX_FOREACH
Replace the use of TAILQ over the object memq with a VM_RADIX_FOREACH loop.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49894
vm_page: drop prev and next
Functions vm_page_prev() and vm_page_next() are no longer
invoked. Remove them.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49892
csu: drop support for GCJ
Remove .jcr sections and related infrastructure. This has no impact on
existing binaries and the toolchain remains capability of linking them,
but would require different (or additional) csu files.
GCC removed GCJ from trunk in on September 30, 2016. Our support came
in with D17587 for compatibility with old object files. It was roughly
contemporaneous with GCC 6.5, the last release with GCJ support. At
this point we don't even have a compiler port capable of producing GCJ
binaries so there is no need to carry this around any more.
For reference see:
https://en.wikipedia.org/wiki/GNU_Compiler_for_Java#History
Reviewed by: kib, emaste
Discussed with: imp
Sponsored by: SRI International
Differential Revision: https://reviews.freebsd.org/D49882
Fix build with WITH_CLANG_BOOTSTRAP and WITHOUT_CLANG
When WITH_CLANG_BOOTSTRAP and WITHOUT_CLANG are both set, the
cross-tools stage does not build a cross clang binary. This is because
the Makefile in usr.bin/clang checks for WITHOUT_CLANG, and skips
building the binary.
To fix this, ensure that WITH_CLANG is set for the cross-tools phase
whenever WITH_CLANG_BOOTSTRAP is set. While here, skip using the
Makefile in usr.bin/clang, and directly use the Makefile in
usr.bin/clang/clang instead.
PR: 286154
Reported by: avg
Reviewed by: avg, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49886
intel_idpgtbl: use FORALL macro for page walk
Change two loops to use VM_RADIX_FORALL and drop the use of vm_page_next().
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49891
vm_radix: pass pointers to VM_RADIX_FOR macros
Rather than pass the iterator name to VM_RADIX_FOREACH, and similar
macros, pass a pointer to the iterator.
Suggested by: kib
Reviewed by: kib
amd_idpgtbl: use iterator instead of vm_page_next
Use VM_RADIX_FORALL instead of vm_page_next in a loop in
amdiommu_domain_free_pgtbl.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49890
kern_kcov: replace vm_page_next() with iterator
Use VM_RADIX_FORALL, and drop a use of vm_page_next(), in kcov_free().
Reviewed by: kib
Differential Revision: kern_kcov: replace vm_page_next() with iterator
pwait tests: Fix some exit annotations
A number of tests rely on timeout(1) to kill a pwait instance, and with
--preserve-status the corresponding exit status is propagated to
atf_check. Update the checks to reflect this.
MFC after: 2 weeks
vm _radix: define foreach macros for walking pages
Define VM_RADIX_FOREACH to be TAILQ free equivalent of TAIL_FOREACH,
and VM_RADIX_FORALL for walking consecutive pages.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49881
ptrace_test: add test for the PT_ATTACH behavior on sleeping thread
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D49887
libalias: Handle GetNewPort() errors properly
AddLink() fails when memory allocation fails or no free port is
available; both are error conditions. However, functions such as
FindUdpTcpIn() were converting such failures to PKT_ALIAS_IGNORED, which
effectively means, "pass the packet without translation," which isn't
what we want.
Fix the problem by making sure that AddLink() errors are converted to
PKT_ALIAS_ERROR where appropriate. The diff is a bit large but is
mostly mechanical: functions like TcpAliasOut() are converted to return
a result code, and an additional out-parameter is added to return the
alias_link pointer.
Reported by: Yuxiang Yang <yangyx22 at mails.tsinghua.edu.cn>
Tested by: Yuxiang Yang <yangyx22 at mails.tsinghua.edu.cn>
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D47778
pf: Avoid logging state creation failures unless requested
pd.act.log is applied unconditionally, but the intent in commit
886396f1b1a7 was to log only if the rule specifically requested it.
Thus, check the rule and associated NAT rule before setting
PF_LOG_FORCE.
For consistency with other handling of memory allocation failures, we
also want to log if state creation failed for that reason. Thus, modify
pf_create_state() to return the drop reason.
Extend the regression test added in commit 886396f1b1a7 to check that we
don't log anything if a state creation failure occurs for a rule without
logging configured.
Fixes: 886396f1b1a7 ("pf: Force logging if pf_create_state() fails")
Reviewed by: kp
MFC after: 2 weeks
Sponsored by: Klara, Inc.
[2 lines not shown]
LinuxKPI: 802.11: avoid using an mbuf tag for now
We are using an mbuf tag to carry the ni reference in the TX path
from the TX function past the taskq along with the mbuf.
Contrary to initial assumptions we only need the ni and no other data
so attach the ni to m->m_pkthdr.PH_loc.ptr avoiding the extra allcation.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit dbae3dcff72f53abe6874466baea78f552b3a316)
LinuxKPI: 802.11: plug mbuf leak
Now that we are doing VHT it is possible to overflow the mbufqs
we use in the TX and RX paths. Check the return code of mbufq_enqueue()
deal with any error accordingly and propagate it.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c816f64e66a0d21196ede35da3eca19e54b59a03)
LinuxKPI: 802.11: better dealing with errors in RX path
In case we fail to allocate the mbuf or mtag in the RX path or fail
for other reasons report it as ic_ierrors for better diagnostics
and more correct statistics.
Also do what the comment had indicated and mandate that mtag allocation
succeeds or otherwise drop the packet. There may be room for future
improvements in a follow-up commit here.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c013f810ecb615289c2bd69a10f4317a3a867d50)
iwlwififw: remove Intel iwlwifi firmware from src.git
Following the example of rtw88 and rtw89 only ship iwlwifi firmware
from ports/packages. Users are asked to run fwget(8) to install the
firmware needed for their system or build it from ports
(see also UPDATING).
This is the end of a long story adding wireless support to fwget(8),
migrating the firmware for multiple branches into ports, splitting them
up into flavors, and updating some install media and the installer to
provide firmware.
The overall amount for new firmware amongst all drivers would have
added more than 100M of binary blobs to src.git for the first import,
ignoring future updates which (along with some duplication between
multiple drivers) was considered too much.
While maintenance within the src tree certainly would have been
easier in the longer term this seems to be the better solution and
[14 lines not shown]
LinuxKPI; 802.11: start filling rxrate statistics
Start collecting rxrate information from the RX statistics which are
passed per packet. Store them in the lsta and upon printing statistics,
if no RX_BIRATE is provided copy them over from the lsta.
This allows us to see rate information in both directions on modern
iwlwifi chipsets, which are doing [tx]rate handling in firmware.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit a1adefb139b3c8f95e5255c67705fb92f4d9fc04)
Bump __FreeBSD_version to 1402505 for LinuxKPI alloc routine changes
Also for iwlwifi firmware removal.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7acd5af48cf1870ec48d5910dff1a26466d98074)
LinuxKPI: 802.11: further locking workarounds fro crypto updates
There are cases when net80211 calls into crypto updates with the
ic lock held (not (just) the nt lock). We have to unlock that as
well and track the unlock like we do for the nt to avoid panics
when we later can sleep (on the wiphy [sx] lock).
Sponsored by: The FreeBSD Foundation
Reported by: rm
Tested by: rm
PR: 285729
Fixes: b8dfc3ecf703
Differential Revision: https://reviews.freebsd.org/D49791
(cherry picked from commit a6165709e3c8ba4a0bee18aead6ca8ea2b033933)
LinuxKPI: 802.11: deal with the error paths for lkpi_xmit()
Rename lkpi_ic_raw_xmit() to lkpi_xmit() as we need a wrapper to add
an extra argument as (*ic_raw_xmit) and (*ic_transmit) have different
invariants. Based on the caller free the mbuf in the error case or
not to satisfy the requirements of the caller. For more information
see the comment in the code.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 9a45c3ca850110c5871742fadbf7355c1085c725)
LinuxKPI: 802.11: enable fragmentation offload
Let the hardware handle fragmentation itself and tell net80211 to
save itself from it. We already call the (*set_frag_threshold)
mac80211 function.
This should be a NOP for all currently enabled LinuxKPI based WiFi
drivers.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 63578bf225df37944b78febfb177e8c1c81f54e4)
LinuxKPI: 802.11: deal with sta bw > channel width
Especially on 2.4Ghz everything may indicate that we can use HT40
but we are stuck on a 20Mhz channel. Adjust the logic in
lkpi_sta_sync_ht_from_ni() to also check the channel width before
setting the sta bandwidth to 40.
Further check that the sta bw is not larger than the channel width
after the 'sync from ni' for HT and VHT and if it is, then update
the chanctx accordingly.
Firmware crashes we have seen with
iwlwifi0: 0x00010000 | umac data1
iwlwifi0: 0x00000000 | umac data2
iwlwifi0: 0xDEADBEEF | umac data3
iwlwifi0: 0xXXXX050F | last host cmd
likely indicate this problem.
Sponsored by: The FreeBSD Foundation
[12 lines not shown]
LinuxKPI: 802.11: increase mbufq lengths
Increase the mbufq lengths we use in the RX and TX path to decouple
the lower and upper parts (currently using taskqs which likely need
to be replaced as well now -- was asked not to add more sophisticated
concepts 2-ish years ago).
The old values of IFQ_MAXLEN (50) are a tad too small so bump them
to 32 * NAPI_POLL_WEIGHT (32 * 64) which seems to be mostly enough
now not to drop mbufs anymore (by not overflowing the queues).
As a side effect TCP became a lot happier as well growing throughput
towards where UDP is already. There is more fish to fry but we
are also doing ~750 Mbits/sec TX and 400 Mbit/s RX TCP at VHT160 now.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 832b8e986c68a43ecf2d6b4af805aaf37087f7d9)
LinuxKPI: 802.11: adjust vif->bss_conf.chanctx_conf to rcu accessors
Adjust the init and lkpi_sta_scan_to_auth() chanctx_conf accesses to
use rcu functions as needed.
linuxkpi_ieee80211_iterate_chan_contexts() which is
ieee80211_iter_chan_contexts_atomic() needs further work to get rid
of the vif locks by keeping all chanctx_conf on a list in lhw.
This will be done in a follow-up commit.
Sponsored by: The FreeBSD Foundation
PR: 280546
Tested by: Oleksandr Kryvulia (shuriku shurik.kiev.ua)
Tested by: Oleg Nauman (oleg.nauman gmail.com) [rtw88]
Differential Revision: https://reviews.freebsd.org/D49734
(cherry picked from commit 560708cbb0468bf1fd1834f4894a1326e88ff10e)