FreeBSD/src ee7a874sys/conf newvers.sh, usr.bin/yacc config.h

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
DeltaFile
+2-2sys/conf/newvers.sh
+1-1usr.bin/yacc/config.h
+3-32 files

FreeBSD/src 83dcc13share/misc committers-src.dot

share/misc/committers-src.dot: correct the date for ivy

Fixes:  1a169322d8 ("add myself to share/misc/committers-src.dot")
Reviewed by:    kevans, jlduran
Approved by:    kevans (mentor)
Differential Revision:  <https://reviews.freebsd.org/D49903>
DeltaFile
+1-1share/misc/committers-src.dot
+1-11 files

FreeBSD/src 1a16932share/misc committers-src.dot

add myself to share/misc/committers-src.dot

Approved by:    kevans (mentor)
Reviewed by:    kevans, imp
Differential Revision:  <https://reviews.freebsd.org/D49902>
DeltaFile
+3-0share/misc/committers-src.dot
+3-01 files

FreeBSD/src b3d89a0sys/vm vm_map.c

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
DeltaFile
+7-10sys/vm/vm_map.c
+7-101 files

FreeBSD/src 1b5e2d7sys/vm vm_swapout.c

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
DeltaFile
+4-1sys/vm/vm_swapout.c
+4-11 files

FreeBSD/src a3a88edsys/vm vm_page.c vm_page.h

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
DeltaFile
+0-40sys/vm/vm_page.c
+0-2sys/vm/vm_page.h
+0-422 files

FreeBSD/src a60615dlib/csu/common crtbegin.c crtend.c, lib/csu/tests init_test.c

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
DeltaFile
+0-33lib/csu/common/crtbegin.c
+0-30lib/csu/tests/init_test.c
+0-4lib/csu/common/crtend.c
+3-0share/man/man5/elf.5
+3-674 files

FreeBSD/src ea23147. Makefile.inc1

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
DeltaFile
+2-1Makefile.inc1
+2-11 files

FreeBSD/src d8b03c5sys/vm vm_pageout.c

vm_pageout: Disallow invalid values for act_scan_laundry_weight

PR:             234167
MFC after:      2 weeks
DeltaFile
+17-2sys/vm/vm_pageout.c
+17-21 files

FreeBSD/src 81bd0f4sys/x86/iommu intel_idpgtbl.c

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
DeltaFile
+7-3sys/x86/iommu/intel_idpgtbl.c
+7-31 files

FreeBSD/src fb909f7sys/vm vm_radix.h

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
DeltaFile
+4-4sys/vm/vm_radix.h
+4-41 files

FreeBSD/src b014555sys/x86/iommu amd_idpgtbl.c

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
DeltaFile
+4-1sys/x86/iommu/amd_idpgtbl.c
+4-11 files

FreeBSD/src 4568f5asys/kern kern_kcov.c

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
DeltaFile
+4-5sys/kern/kern_kcov.c
+4-51 files

FreeBSD/src 987ef15bin/pwait/tests pwait_test.sh

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
DeltaFile
+6-6bin/pwait/tests/pwait_test.sh
+6-61 files

FreeBSD/src b763187sys/vm vm_radix.h

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
DeltaFile
+26-0sys/vm/vm_radix.h
+26-01 files

FreeBSD/src ed080d9tests/sys/kern ptrace_test.c

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
DeltaFile
+61-0tests/sys/kern/ptrace_test.c
+61-01 files

FreeBSD/src fb2ea26sys/netinet/libalias alias.c alias_db.c

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
DeltaFile
+95-69sys/netinet/libalias/alias.c
+63-25sys/netinet/libalias/alias_db.c
+14-12sys/netinet/libalias/alias_local.h
+2-2sys/netinet/libalias/alias_smedia.c
+2-2sys/netinet/libalias/alias_irc.c
+2-2sys/netinet/libalias/alias_skinny.c
+178-1126 files

FreeBSD/src 0015baesys/netpfil/pf pf.c, tests/sys/netpfil/pf pflog.sh

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]
DeltaFile
+17-14sys/netpfil/pf/pf.c
+13-1tests/sys/netpfil/pf/pflog.sh
+30-152 files

FreeBSD/src f086accsys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

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)
DeltaFile
+22-0sys/compat/linuxkpi/common/src/linux_80211.c
+2-0sys/compat/linuxkpi/common/src/linux_80211.h
+24-02 files

FreeBSD/src e273079sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+14-2sys/compat/linuxkpi/common/src/linux_80211.c
+14-21 files

FreeBSD/src 1ec4032sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+16-13sys/compat/linuxkpi/common/src/linux_80211.c
+16-131 files

FreeBSD/src 42be605sys/contrib/dev/iwlwififw WHENCE LICENCE.iwlwifi_firmware, sys/modules/iwlwififw Makefile Makefile.inc

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]
DeltaFile
+0-483sys/contrib/dev/iwlwififw/WHENCE
+0-39sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware
+0-31sys/modules/iwlwififw/Makefile
+0-19sys/modules/iwlwififw/Makefile.inc
+0-7sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile
+0-7sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile
+0-58655 files not shown
+9-72161 files

FreeBSD/src 9996e4dsys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

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)
DeltaFile
+56-16sys/compat/linuxkpi/common/src/linux_80211.c
+2-0sys/compat/linuxkpi/common/src/linux_80211.h
+58-162 files

FreeBSD/src a3b2d8e. UPDATING, sys/sys param.h

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)
DeltaFile
+6-0UPDATING
+1-1sys/sys/param.h
+7-12 files

FreeBSD/src 9bd4391sys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

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)
DeltaFile
+34-17sys/compat/linuxkpi/common/src/linux_80211.c
+1-0sys/compat/linuxkpi/common/src/linux_80211.h
+35-172 files

FreeBSD/src 636bb42sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+35-9sys/compat/linuxkpi/common/src/linux_80211.c
+35-91 files

FreeBSD/src ded3d31sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+4-0sys/compat/linuxkpi/common/src/linux_80211.c
+4-01 files

FreeBSD/src 96a1ab4sys/compat/linuxkpi/common/src linux_80211.c

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]
DeltaFile
+95-9sys/compat/linuxkpi/common/src/linux_80211.c
+95-91 files

FreeBSD/src 6869d08sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+2-2sys/compat/linuxkpi/common/src/linux_80211.c
+2-21 files

FreeBSD/src becb074sys/compat/linuxkpi/common/src linux_80211.c

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)
DeltaFile
+8-7sys/compat/linuxkpi/common/src/linux_80211.c
+8-71 files