Skip to content

Conversation

@bsdjhb
Copy link
Collaborator

@bsdjhb bsdjhb commented Oct 29, 2025

PR for CI

cperciva and others added 30 commits November 17, 2024 16:18
For "release" builds (as opposed to "snapshot" builds -- in this
context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it
stuck into some ociimages filenames via a copy-and-paste error.

The final filenames on the download mirrors were not affected, so
this does not need to be merged to releng/14.2.

MFC after:	3 days
Sponsored by:	Amazon
USB_GET_REPORT ioctl is documented to update ugd_actlen on return with
the number of bytes copied.  It does not do this.

Reviewed by:	wulf
PR:		282790
MFC after:	1 week
HIDRAW_GET_REPORT ioctl is documented to update hgd_actlen on return
with the number of bytes copied.  It does not do this.

Reviewed by:	wulf
PR:		282790
MFC after:	1 week
pflow opens sockets in the kernel to transmit netflow information.
If this is done in a (vnet) jail these sockets end up preventing the removal of
the jail. The VNET_SYSUNINIT() vnet_pflowdetach() function doesn't get called,
but that's the function that would remove the sockets.

Install a callback on the PR_METHOD_REMOVE jail callback and close the sockets
there. This ensures that the jail can get cleaned up.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47545
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Signed-off-by:	Graham Percival <[email protected]>
Reviewed by:	mhorne, Alexander Ziaee <[email protected]>
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	freebsd/freebsd-src#1528
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Other atf components are guarded by WITH_TESTS_SUPPORT already.
WITH_TESTS is for actual tests.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47660
The rtsock_msg_buffer() can be called without walkarg, just to calculate
required length.  It can also be called with a degenerate walkarg, that
doesn't have a w_req.  The latter happens when the function is called from
update_rtm_from_info() for the second time.

Zero init walkarg in update_rtm_from_info() and don't pass random stack
garbage as w_req.

In rtsock_msg_buffer() initialize compat32 boolean only once and take of
possible empty w_req.  Simplify the rest of code once compat32 is already
set.

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D47662
Reported-by: [email protected]
Reported-by: [email protected]
Make sure an interface is back up before (re-)starting wpa_supplicant
in wlanconfig not relying on wpa to UP the interface (though we fixed
that).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste (in D47491)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D47491
Fix a typo that was missed probably because it was capitalized.
Mark up with .Pa and fix capitalization.

Specify that cuaUX and cuauX are for USB and UART attachments
respectively.

- Silence most lint warnings
- Update outdated links
- Minor style fixes
- Some igor(1) warnings were ignored on purpose

PR:		248359
Reviewed by:	imp, mhorne, Alexander Ziaee <[email protected]>
Approved by:	emaste (mentor)
Fixes:	839f11a ("A number of places in the source tree still reference cuad.* after sio(4) was deprecated by uart(4).")
MFC after:	1 week
Pull Request:	freebsd/freebsd-src#1515
This will be useful when fixing up the sequence number generation
and checks, as the rules around how sequence numbers are generated
have been clarified in 802.11-2016 and later.  QoS-NULL frames are
explicitly marked as "any sequence number".

But for now, just create a macro and use it in the one place
it's currently being used as a check - ath(4).

* Add IEEE80211_IS_QOS_NULL().
* Change the "will this frame go into the TX block-ack window" check
  in the ath(4) transmit path.  Note this changes the check to be
  more specific, but both paths already had previous checks to ensure
  they're QoS data frames.

Locally tested:

* ath(4), AR9380, STA mode w/ AMPDU TX/RX enabled and negotiated

Differential Revision: https://reviews.freebsd.org/D47645
Use the correct ID, as I have one of these NICs.
Add the previous one back in case it's out there in the wild.

@emaste did a bit of a dig into the product numbers.
@sam did change the ID from 0x0828 -> 082a in a commit
a long while back. It's worth reading the code review for
further details.

However, I do have one of these NICs and I verified that
it indeed has the given ID, and with some follow-up work
to fix some race conditions, it works fine in 2GHz 11bg
and 5GHz 11a operation.

Differential Revision:	https://reviews.freebsd.org/D47654

Obtained from:	Linux, drivers/net/wireless/ath/ar5523/ar5523.c
…tate

The driver wasn't stable - it would start fine, but during scan
it would eventually hang and no further command endpoint transfers
would complete.

After adding some debugging and looking at the logs I noticed that
things went sideways once a /data/ frame was sent.  The channel
change config happened between the data frame being sent and
being completed.

My guess is that the firmware doesn't like a channel change
and reset whilst there's pending data frames.  Checking the Linux
driver I found that it was doing a flush before a channel change,
and we're doing it afterwards.  This acts like a fence around
ensuring scheduled TX work has completed.  In net80211 the
transmit path and the control path aren't serialised, so it's
very often the case that ioctls, state changes, etc occur
whilst in parallel there are frame transmits being scheduled.

This seems to happen more frequently on a more recent, high core
(8) machine with XHCI.  I remember testing this driver years ago
on single and dual core CPU laptops with no problems.

So, add some flushes - before a channel change, and during
a transition to AUTH when the BSS config is being programmed into
the firmware.  These two fences seem enough to reliably
associate as a 2GHz and 5GHz STA.

Note that this isn't entirely blocking all newly queued
transmit work from occuring until after the NIC has finished
configuration.  That will need some further investigation.

Locally tested:

  * Wistron NuWeb AR5523 dual-band NIC, STA mode, 2/5GHz

Differential Revision:	https://reviews.freebsd.org/D47655
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47568
Sponsored by:	Klara, Inc.
Reviewed by:	asomers, markj
Differential Revision:	https://reviews.freebsd.org/D47569
Sponsored by:	Klara, Inc.
Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D47582
The pkg-bootstrap binary depends on fetch.

Reviewed by:	cperciva, emaste, bapt
Differential Revision:	https://reviews.freebsd.org/D47661
MFC after:	1 day
These use amoor and amoand rather than a loop.

Also define atomic_testandset_acq_(64|long) using amoor.aq.

Reviewed by:	mhorne, kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47627
Use a memory barrier after calling the existing atomic_testandset_long
rather than using the fcmpset-based fallback version from
<sys/_atomic_subword.h>.

Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47628
All architectures implement a MD version

Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47629
For current architectures, these are just aliases for the existing
operation on the relevant scalar integer.

Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47631
Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D47632
PR:			282800
Reported by:		phk
Tested by:		bz
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D47666
When multiple IRQs are specified in a single resource then we only
check the first. Change this to check all interrupts for the value
we expect to find.

Without this we may still enable the interrupt, but it can have the
wrong polatiry or trigger. This can cause an interrupt storm if the
interrupt was configured with a level trigger when it should have
been an edge.

PR:		282241
Reported by:	trasz
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47487
kev009 and others added 28 commits October 29, 2025 15:34
Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment,
and tso_tcp_flags_mask_last_segment sysctl-variables to control the
handling of TCP flags during TSO.

This allows to change the masks appropriate for classical ECN and to
configure appropriate masks for accurate ECN.

MFC after:	3 days
Sponsored by:	Netflix
On some platforms (e.g. powerpc) we don't have packages, so we can't
install them onto the ISOs.  Proceed with building the images anyway.

Reported by:	Weekly snapshot builds
Fixes:	7e2996c ("release: install wireless firmware onto disc1 and dvd")
MFC after:	1 minute
Reviewed by:	concussious.bugzilla_runbox.com, markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D47669
The function pf_src_node_copy() copies struct pf_ksrc_node to its ioctl
counterpart. It was missing copying of the conn_rate field, even though
the code for adjusting the output for pfctl was in place.

Add copying of conn_rate.

Reviewed by:		kp
Approved by:		kp (mentor)
MFC after:		2 weeks
Sponsored by:		InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D47679
When copying struct pf_ksrc_node into a netlink message some fields
change their meaning. In kernel creation and expire fields are storing
number of seconds since boot.

Add conversion to number of seconds relative to moment of exporting the
source node via netlink, as this is what pfctl expects. Add conversion
of connection rate count.

Reviewed by:		kp
Approved by:		kp (mentor)
Sponsored by:		InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D47321
sysctl(8) prints a newline after the description; the description should
not end with one itself.

Sponsored by:	The FreeBSD Foundation
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e,
a.k.a. 19.1.4 release.

PR:		280562
MFC after:	1 month
embedfs.S needs the right aarch64 features for BTI and/or PAC.

Obtained from:	CheriBSD
Fixes:		c2e0d56 ("arm64: Support BTI checking in most of the kernel")
Sponsored by:	AFRL, DARPA
These tests assume exclusive use of one or more FIBs and so can't be run
in parallel.  Running them in a VNET jail sidesteps this problem.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
The loop doesn't check for overflow of the event buffer, which can
easily happen if other tests are running in parallel (the bectl tests in
particular trigger devd events).

When that overflow occurs, a funny thing can happen: the loop ends up
trying to read 0 bytes from the socket, succeeds, and then prints its
buffer to stdout.  It does this as fast as possible, eventually timing
out.  Then, because kyua wants to log the test's output, it slurps the
output file into memory so that it can insert it into the test db.  This
output file is quite large, usually around 8GB when I see it happen, and
is large enough to trigger an OOM kill in my test suite runner VM.

Fix the test: use a larger buffer and fail the test if we fill it before
both events are observed.  Also don't print the output buffer on every
loop iteration, since unlike the seqpacket test that will just print the
same output over and over.

Reviewed by:	imp, asomers
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D47625
In general, in the direct dispatch case netgraph only enters the net
epoch to send data messages, but this was inconsistent with the netgraph
thread, which also entered the net epoch to send fn and fn2 messages to
nodes.  Some handlers, e.g., ng_bridge_newhook(), may sleep, and so
cannot be called in epoch context; the netgraph tests occasionally panic
due to this problem.

Make ngthread() consistent with the direct dispatch path.

Discussed with:	afedorov (in D44615)
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
All the other libutil section 3 manpages document this, and although
it's heavily implied by the libutil.h header in the synopsis, we should
still be explicit and consistent.

PR:		280078
Reviewed by:	jrtc27
MFC after:	1 week
This is an interim robustness improvement; further improvements as
described in the PR and/or Phabricator review are still needed.

PR:		267334
Reported by:	Robert Morris <[email protected]>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37229
Change cdev_mgtdev_page_free_page to take an iterator, rather than an
object and page, so that removing the page from the object radix tree
can take advantage of locality with iterators. Define a
general-purpose function to free all pages, which can be used in
several places.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D47692
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47694
PR:	282860
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47694
Mask off the bits we'll be setting, rather than retaining only those
bits.

Sponsored by: Netflix
The ioctl DIOCRCLRASTATS provides the functionality of clearing stats
not only for the whole table for for addresses stored in that table. The
functionality was missing from pfctl, though. Add it now.

PR:		282877
Obtained from:	OpenBSD, kirill <[email protected]>, e496dff3a7
MFC after:	3 weeks
Fixes: 3750cce ("Retire MK_PROFILE infrastructure")
Sponsored by: The FreeBSD Foundation
wbit was not being initialized in a couple of cases.

Reported by:	asomers
MFC after:	2 weeks
- Use a fresh context when entering dtrace_invop() via a breakpoint
  exception.
- Mark the #BP trapframe as initialized.

MFC after:	2 weeks
This function is registered as a ifnet_link_event and so should have the
corresponding argument list.

PR:		282870
Reported by:	[email protected]
MFC after:	1 week
No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47696
We were previously allocating MAXCPU structures for several purposes,
but this is generally unnecessary and is quite excessive, especially
after MAXCPU was bumped to 1024 on amd64 and arm64.  We already are
careful to allocate only as many per-CPU tracing buffers as are needed;
extend this to other allocations.

For example, in a 2-vCPU VM, the size of a consumer state structure
drops from 64KB to 128B.  The size of the per-consumer `dts_buffer` and
`dts_aggbuffer` arrays shrink similarly.  Ditto for pre-allocations of
local and global D variable storage space.

MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47667
Fixes:	a03957a ("efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag")
It is needed for SSP support.

Reported by: netchild, Shawn Webb
Fixes: 62dab3d ("getentropy: Remove fallback code")
Sponsored by: The FreeBSD Foundation
@bsdjhb bsdjhb merged commit 6692194 into CTSRD-CHERI:dev Oct 29, 2025
29 checks passed
@bsdjhb bsdjhb deleted the merge-freebsd-20241122 branch October 29, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.