FreeBSD/src ef9017asys/amd64/amd64 pmap.c, sys/arm/arm pmap-v6.c

pmap_growkernel(): do not panic immediately, optionally return the error

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D47935
DeltaFile
+32-8sys/amd64/amd64/pmap.c
+23-4sys/riscv/riscv/pmap.c
+21-4sys/arm64/arm64/pmap.c
+20-3sys/arm/arm/pmap-v6.c
+18-1sys/powerpc/powerpc/pmap_dispatch.c
+12-2sys/i386/i386/pmap_base.c
+126-226 files not shown
+148-3612 files

FreeBSD/src 47552b5share/man/man4 usbhid.4

usbhid.4: Add cross-references to "other USB HID drivers"

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50437

(cherry picked from commit 084046ad8f859d270a3cf900a82c5254153afcac)
DeltaFile
+5-1share/man/man4/usbhid.4
+5-11 files

FreeBSD/src 421d493sbin/mount_nfs mount_nfs.c

mount_nfs: make temporary DNS failure non-fatal with background mode

Typical problem with network mounts is remote equipment not being
available when our host boots up after a power failure.  Even if you
properly configure boot order of all local services and wait for link
coming up on your NIC, you still may boot faster than some intermediate
switch on the network or the DNS server itself.  Let's refer to this as a
"server room boot race".  For NFS mounts with hostname in hosts(5) the
race is addressed by a retry loop on NFS mount timeout.  However, a DNS
resolution timeout is treated differently to NFS mount timeout.  We fail
on the former and keep retrying on the latter.

With feedback received on current@, I see that the problem is so old, that
people got used to it and see it as a desired behavior rather than a
problem.  And for those who is affected by the problem, they suggest
hosts(5) as a solution.  Note that using hosts(5) isn't scalable, and
using bare IP addresses is neither scalable, nor compatible with
Kerberized mounts.


    [9 lines not shown]
DeltaFile
+34-25sbin/mount_nfs/mount_nfs.c
+34-251 files

FreeBSD/src 8d98d88lib/libc/net getaddrinfo.c

libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout

A nameserver timeout is a soft failure, future attempts may succeed.
Returning EAI_AGAIN is crucial for API users to tell a soft name
resolution failure from negative resolution result.

Before the change we would return EAI_ADDRFAMILY, which I believe, is a
regression from 144361386696, and before that revision we used to return
EAI_NONAME in most of the cases.

Reviewed by:            kib
Differential Revision:  https://reviews.freebsd.org/D49411

(cherry picked from commit d803854bccb9ea527c1769ac403e011ff0e121e5)
DeltaFile
+43-15lib/libc/net/getaddrinfo.c
+43-151 files

FreeBSD/src e3fd26ausr.sbin/bsdinstall/scripts bootconfig

bsdinstall: Fix grammatical issues.

PR:             263488

(cherry picked from commit dfa5a74357f3837b93b0cc90e5bee0a1d298ca3e)
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/bootconfig
+1-11 files

FreeBSD/src e094f90release/tools gce.conf

release/GCE: Remember whether we mounted /dev

Don't unmount /dev inside the image if we didn't mount it.  We might
end up unmounting a /dev which is still needed.

Fixes:  611c1457ff32 ("release: Add set -e to abort upon failure")
DeltaFile
+4-1release/tools/gce.conf
+4-11 files

FreeBSD/src 8d51f2asys/dev/iwx if_iwx.c

iwx: correct rx status reporting

We are currently not reporting any per-chain S:N values so remove
IEEE80211_R_C_RSSI and IEEE80211_R_RSSI along with it as it is set
already in the line above.

Sponsored by:   The FreeBSD Foundation
Reviewed by:    thj
Differential Revision: https://reviews.freebsd.org/D50927
DeltaFile
+0-1sys/dev/iwx/if_iwx.c
+0-11 files

FreeBSD/src be57603sys/dev/iwx if_iwx.c

iwx: correct chain number reporting

There is no point in assigning the channel index to the number of
chains for the RX status reporting.  The value was not tagged as
being used.  Rather than simply removing it try to fix it and
set the flag if we get a value.

Sposnored by:   The FreeBSD Foundation
Reviewed by:    thj
Differential Revision: https://reviews.freebsd.org/D50926
DeltaFile
+16-1sys/dev/iwx/if_iwx.c
+16-11 files

FreeBSD/src c7fe791sys/vm vm_page.c

vm_page: eliminate a stale KASSERT

With the elimination of VM_ALLOC_NOOBJ, it became illegal to pass
VM_ALLOC_WAITOK to vm_page_alloc_contig() (and its helpers).  So,
there is no point in asserting that the caller didn't pass both
VM_ALLOC_NORECLAIM and VM_ALLOC_WAITOK.
DeltaFile
+0-3sys/vm/vm_page.c
+0-31 files

FreeBSD/src 77613edsys/cam/scsi scsi_pass.c

pass: Update comments about scsi and devstat

scsi is the only transport to do tag_action, so is the only one that
needs that support in devstat. Make a note of that. nvme and ata do
support some ordering, but that's done in the [an]da driver for each of
these devices and not for passthru commands and not via these tags.

Sponsored by:           Netflix
DeltaFile
+8-3sys/cam/scsi/scsi_pass.c
+8-31 files

FreeBSD/src 5ecf955sys/cam/scsi scsi_pass.c

pass: Use pointer to ccb header rather than longer construct

Take a pointer to the ccb header in a few places where it's not
ambiguous (eg we have multiple ccbs in the routine). The code is a
little shorter this way. In places we had mulitple ccbs, I refrained
from doing this since that's more complex to manage. This also means
that we're making a stronger guarantee to the compiler we're only
accessing this part of the ccb, which reduces a few warnings from gcc
with picky settings we normally disable for CAM).

This makes the driver slightly less SCSI specific where csio was used to
do this needlessly.

There's no functional change.

Sponsored by:           Netflix
DeltaFile
+26-22sys/cam/scsi/scsi_pass.c
+26-221 files

FreeBSD/src a7ebd38sys/cam/scsi scsi_pass.c

pass: Remove unneeded include

Nothing from scsi_all.h is used here, so don't include it.

Sponsored by:           Netflix
DeltaFile
+0-1sys/cam/scsi/scsi_pass.c
+0-11 files

FreeBSD/src ee9895elib/libsys ptrace.2 wait.2, sys/kern sys_process.c kern_sig.c

kern: send parent a SIGCHLD when the debugger has detached

The practical scenario that leads to this is porch(1) spawning some
utility and sending it a SIGSTOP as a debugging aide.  The user then
attaches a debugger and walks through how some specific input is
processed, then detaches to allow the script to continue.  When ptrace
is detached, the process resumes execution but the parent is never
notified and may be stuck in wait(2) for it to continue or terminate.

Other platforms seem to re-suspend the process after the debugger is
detached, but neither behavior seems unreasonable.  Just notifying the
parent that the child has resumed is a relatively low-risk departure
from our current behavior and had apparently been considered in the
past, based on pre-existing comments.

Move p_flag and p_xsig handling into childproc_continued(), as just
sending the SIGCHLD here isn't really useful without P_CONTINUED set
and the other caller already sets these up as well.


    [2 lines not shown]
DeltaFile
+68-0tests/sys/kern/ptrace_test.c
+11-1lib/libsys/ptrace.2
+9-2sys/kern/sys_process.c
+6-2lib/libsys/wait.2
+3-2sys/kern/kern_sig.c
+97-75 files

FreeBSD/src 5110a74sys/kern kern_mib.c

sys: Correct osreldate descriptions

The kern.osreldate sysctl reports the kernel version, not a release
date.  Also correct a comment about /usr/include/osreldate.h.

Reviewed by:    kp, olce
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50938
DeltaFile
+2-3sys/kern/kern_mib.c
+2-31 files

FreeBSD/src b78b7falibexec/nuageinit nuageinit.7

nuageinit.7: language and grammar improvements

Reviewed by:    bapt
DeltaFile
+10-10libexec/nuageinit/nuageinit.7
+10-101 files

FreeBSD/src 19d0dd8sys/dev/usb/wlan if_mtw.c

mtw: fix display of the MAC revision

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D50542
DeltaFile
+6-1sys/dev/usb/wlan/if_mtw.c
+6-11 files

FreeBSD/src f51c794sys/net80211 ieee80211_node.c

net80211: in ieee80211_sta_join() only do_ht if HT is avail

In ieee80211_sta_join() there are currently two ways to set
"do_ht": (1) after checking HT IEs are avail, and (2) after
checking VHT IEs are avail and we are not on 2GHz.

In the latter case no one checks that HT IEs are available and
when we hit ieee80211_ht_updateparams_final() htinfo may be NULL
and we panic.

Avoid this by only checking for VHT if do_ht was set.
No VHT without HT IEs.

While here switch do_ht to be a bool.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
PR:             287625
Fixes:          51172f62a753f

    [2 lines not shown]
DeltaFile
+4-4sys/net80211/ieee80211_node.c
+4-41 files

FreeBSD/src 4c6c1ddsys/vm vm_page.c

vm_page: Fix nofree page accounting

In commit ae10431c9833 ("vm_page: Allow PG_NOFREE pages to be freed"), I
changed the v_nofree_count counter to instead count the size of the
nofree queue, on the basis that with the ability to free nofree pages,
the size of the queue is unbounded.

The use of a counter(9) for this purpose is not really correct, as early
initialization of per-CPU counters interferes with precise accounting
that we want here.  Instead, add a global tracker for this purpose,
expose it elsewhere in the sysctl tree, and restore v_free_nofree's
original use as a counter of allocated nofree pages.

Reviewed by:    bnovkov, alc, kib
Reported by:    alc
Fixes:          ae10431c9833 ("vm_page: Allow PG_NOFREE pages to be freed")
Differential Revision:  https://reviews.freebsd.org/D50877
DeltaFile
+10-3sys/vm/vm_page.c
+10-31 files

FreeBSD/src f1f71ccusr.sbin/fwget/pci pci_video_intel

fwget: pci_intel_video: do no log on no match

We should never "log" a statement on no match for a given device we
do not know about.  We do not control the PCI ID assignments and thus
cannot predict if we would even support such a device.

This also triggers an invalid output in the installer.

Leave it as log_verbose for now.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
PR:             287639
Reviewed by:    manu, emaste
Differential Revision: https://reviews.freebsd.org/D50916
DeltaFile
+1-1usr.sbin/fwget/pci/pci_video_intel
+1-11 files

FreeBSD/src deddedesys/arm64/arm64 pmap.c

arm64 pmap: use the counter(9) KPI for L2 superpages

Use the counter(9) KPI instead of atomics to maintain the L2 superpage
mapping counts.  (A similar change was made to the amd64 pmap in 2021.)
While here, update the SYSCTL descriptions to reflect the possibility
that the base page size is 16KB.
DeltaFile
+20-20sys/arm64/arm64/pmap.c
+20-201 files

FreeBSD/src c29459fshare/man/man7 tracing.7 Makefile

tracing.7: Add a single reference point for tracing facilities in FreeBSD

FreeBSD has a fair number of tracing facilities. The new tracing(7)
manual page aims to provide a starting point for users to learn about
what is available.

Reviewed by:    christos, bnovkov, markj, ziaee
Approved by:    christos (mentor), bnovkov (mentor), markj (mentor)
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D50854
DeltaFile
+97-0share/man/man7/tracing.7
+1-0share/man/man7/Makefile
+98-02 files

FreeBSD/src 22c7815lib/libc/gen Makefile.inc

exec(3): add missing execvpe(3) to MLINKS

Reviewed by:    glebius
DeltaFile
+2-1lib/libc/gen/Makefile.inc
+2-11 files

FreeBSD/src c329931sys/cam/scsi scsi_pass.c

pass: Make the name of the driver a #define

"pass" is in several places, but should be a #define. Make it one. This
also lets folks with particular needs that copy this driver to reduce
diffs.

Sponsored by:           Netflix
DeltaFile
+6-4sys/cam/scsi/scsi_pass.c
+6-41 files

FreeBSD/src ca5be69sys/fs/nfsserver nfs_nfsdserv.c

nfsd: Fix the build for 1749465947a8

Fixes:  1749465947a8 ("nfsd: Fix accumulating nfslockfile structures")

(cherry picked from commit 4be12de1d630383ab5e0c0f3ff48aa9f2f192ab6)
DeltaFile
+1-1sys/fs/nfsserver/nfs_nfsdserv.c
+1-11 files

FreeBSD/src a2408c4sys/fs/nfsserver nfs_nfsdserv.c

nfsd: Fix accumulating nfslockfile structures

If a NFSv4 client does an exclusive open where the file
already exists, the server returns EEXIST.  However,
without this patch, a partially filled in nfslockfile
structure is allocated, but is not referenced by any open
and, as such, never gets freed.

This patch fixes the bug by checking for EEXIST before
calling nfsvno_open().

(cherry picked from commit 1749465947a807caa53ce09b90a30b820eaab62e)
DeltaFile
+16-12sys/fs/nfsserver/nfs_nfsdserv.c
+16-121 files

FreeBSD/src 26f6f73sys/net if_bridge.c, tests/sys/net if_bridge_test.sh

bridge: fix vlan(4) on a bridge member

If an interface is a bridge member, and a vlan(4) is also created on
that interface, and net.link.bridge.member_ifaddrs=0, then vlan(4)
will never see any incoming frames because bridge doesn't pass them
to the host for processing.

Work around this by checking for locally-addressed frames using the
MAC address of the interface we received the frame on, but only if
the frame has a .1q tag and there's a vlan trunk on the interface.

This behaviour is almost certainly "wrong" and it's not clear if we
really want to support this, but it did work in the past and the
member_ifaddrs change was not supposed to break it, so this restores
the previous behaviour.

PR:     287150
MFC after:      1 week
Reviewed by:    kevans, des

    [4 lines not shown]
DeltaFile
+51-0tests/sys/net/if_bridge_test.sh
+10-13sys/net/if_bridge.c
+61-132 files

FreeBSD/src eca5637stand/userboot/userboot Makefile main.c

stand: userboot: allow building on !x86

We can still get plenty of use out of a userboot that doesn't know
anything about how to load or boot a kernel; notably, the test harness
in tools/boot can still be used to test lua changes.

Hack out the necessary bits to simply build on other platforms, and add
a small warning with ample time to view the warning on other platforms.
We still won't build userboot by default on these platforms, since the
build product isn't useful for most people.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D41529
DeltaFile
+16-0stand/userboot/userboot/Makefile
+5-0stand/userboot/userboot/main.c
+4-0stand/userboot/userboot/conf.c
+25-03 files

FreeBSD/src 0452f5fsys/security/audit audit.c

audit: move the wait from the queue length from the commit to alloc

AUDIT_SYSCALL_EXIT() and indirectly audit_commit() is intended to be
called from arbitrary top-level context.  This means that any sleepable
locks can be owned by the caller, and which makes the sleeping in
audit_commit() forbidden.

Since we need to sleep for the record in audit_alloc() anyway, move the
sleep for the queue limit there.  At worst, if the audit is suspended is
disabled when we actually reach the commit location, this means that we
lost time uselessly.

PR:     287566
Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50879
DeltaFile
+11-16sys/security/audit/audit.c
+11-161 files

FreeBSD/src fa9ac74usr.bin/truss truss.1

truss.1: Reference sysdecode(3)

MFC after:      1 week
DeltaFile
+3-2usr.bin/truss/truss.1
+3-21 files

FreeBSD/src 013c58csys/kern sched_ule.c

sched_ule: 32-bit platforms: Fix runq_print() after runq changes

The compiler would report a mismatch between the format and the actual
type of the runqueue status word because the latter is now
unconditionally defined as an 'unsigned long' (which has the "natural"
platform size) and the format expects a 'size_t', which expands to an
'unsigned int' on 32-bit platforms (although they are both of the same
actual size).

This worked before as the C type used depended on the architecture and
was set to 'uint32_t' aka 'unsigned int' on these 32-bit platforms.

Just fix the format (use 'l').  While here, remove outputting '0x' by
hand, instead relying on '#' (only difference is for 0, and is fine).

runq_print() should be moved out of 'sched_ule.c' in a subsequent
commit.

Reported by:    Jenkins

    [4 lines not shown]
DeltaFile
+1-1sys/kern/sched_ule.c
+1-11 files