FreeBSD/src 9dcb984usr.bin/chkey chkey.c, usr.bin/newkey update.c newkey.c

Remove publickey(5) stuff

This uses DES and it's likely that nobody uses that in 2025.
If somebody uses this we help them by deprecating and removing this.

Reviewed by:    bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D30683
DeltaFile
+0-753usr.sbin/keyserv/keyserv.c
+0-497usr.sbin/keyserv/setkey.c
+0-332usr.bin/newkey/update.c
+0-267usr.bin/chkey/chkey.c
+0-265usr.sbin/keyserv/crypt_server.c
+0-228usr.bin/newkey/newkey.c
+0-2,34225 files not shown
+13-3,10531 files

FreeBSD/src 723425fusr.bin/chkey chkey.1, usr.bin/keylogin keylogin.1

Deprecate publickey(5) stuff

This uses DES and it's likely that nobody uses that in 2025.
If somebody uses this we help them by deprecating and removing this.

Reviewed by:    bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D30682
DeltaFile
+5-0usr.bin/chkey/chkey.1
+5-0usr.sbin/keyserv/keyserv.8
+5-0usr.bin/keylogin/keylogin.1
+5-0usr.bin/newkey/newkey.8
+5-0usr.bin/keylogout/keylogout.1
+1-0usr.sbin/keyserv/keyserv.c
+26-04 files not shown
+30-010 files

FreeBSD/src 8384a19sys/cddl/dev/dtrace/aarch64 dtrace_subr.c

dtrace/arm64: Simplify variable declarations in the invop handler

Remove some unused variables and reduce the scope of some others.

No functional change intended.

MFC after:      1 week
Sponsored by:   Innovate UK
DeltaFile
+4-6sys/cddl/dev/dtrace/aarch64/dtrace_subr.c
+4-61 files

FreeBSD/src f0d036csys/amd64/amd64 fpu.c

amd64/fpu: Fix build for NODEBUG kernels

Fixes:  b995101
Reported by:    Michael Butler (imb at protected-networks.net)
DeltaFile
+4-0sys/amd64/amd64/fpu.c
+4-01 files

FreeBSD/src 61c4ac2cddl/contrib/opensolaris/lib/libdtrace/common dt_ident.c

libdtrace: Use C99 designated initializers for dt_idops_t

No functional change intended.

MFC after:      1 week
Sponsored by:   Innovate UK
DeltaFile
+24-24cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c
+24-241 files

FreeBSD/src 8ce6b4fsys/cddl/contrib/opensolaris/uts/common/sys dtrace_impl.h

dtrace: Fix the definition of pc_t

This type is used only to store PC values corresponding to a thread
stack trace, so a pointer type is not quite right.  Switch to
vm_offset_t, as in struct stack, to simplify a port of DTrace to CHERI.

No functional change intended.

MFC after:      1 week
Sponsored by:   Innovate UK
DeltaFile
+1-1sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
+1-11 files

FreeBSD/src 6e6a67ecddl/usr.sbin/dtrace/tests dtrace.test.mk

dtrace tests: Avoid hard-coding paths to required programs

MFC after:      1 week
Sponsored by:   Innovate UK
DeltaFile
+1-1cddl/usr.sbin/dtrace/tests/dtrace.test.mk
+1-11 files

FreeBSD/src b995101sys/amd64/amd64 fpu.c, sys/x86/include fpu.h

amd64/fpu: Track supervisor state XSAVE components

The amd64/fpu.c xsave_* routines track supported XSAVE components and
features. However, they only track supported user state components, and
there is currently no way for a consumer to check whether the CPU
supports a supervisor state component. Fix this by saving the supported
supervisor state components, enumerated by CPUID function 0DH,
sub-function 1, in a separate mask.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D48466
DeltaFile
+24-14sys/amd64/amd64/fpu.c
+3-2sys/x86/include/fpu.h
+27-162 files

FreeBSD/src f6631datests/sys/sound pcm_read_write.c

sound tests: Fix gcc build

/workspace/src/tests/sys/sound/pcm_read_write.c:36:1: error: 'static' is not
at beginning of declaration [-Werror=old-style-declaration]
   36 | } static const afmt_tests[] = {
      | ^

Reported by:    CI
Fixes:          27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-2tests/sys/sound/pcm_read_write.c
+2-21 files

FreeBSD/src 6ba2f08bin/ls ls.c

ls: --group-directories requires stat information

Fixes:  8b92977857f8
DeltaFile
+4-4bin/ls/ls.c
+4-41 files

FreeBSD/src 6f0c293sys/powerpc/powerpc cpu.c

Fix latency spikes on return from stop on POWER9+

On POWER9 and higher platforms, cpu_idle_power9() directly control the external
interrupt enable lines when entering / exiting stop states.  This does not
provide needed information to the rest of the kernel regarding the core going
into a stop state, and results in random, significant latency spikes (>200ms)
due to the stopped core not receiving wakeup interrupts in a deterministic
manner.

Bring cpu_idle_power9() in line with cpu_idle_powerx() by using spinlock
entry / exit to control the interrupt state vs. direct MSR read / write.

Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
DeltaFile
+19-10sys/powerpc/powerpc/cpu.c
+19-101 files

FreeBSD/src 58f7730sys/powerpc/powerpc cpu.c

Add machdep.cpu_idle_max_stop_state tunable

Multiple idle and deep sleep states are supported on Power7+ platforms, with
each state having a characteristic latency and effect on system real-time
performance.

Add a tunable to allow a maximum sleep state (maximum theoretical sleep-related
latency) to be set, in order to better support specific latency-sensitive
applications / real time workloads.

Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
DeltaFile
+39-1sys/powerpc/powerpc/cpu.c
+39-11 files

FreeBSD/src c669b08sys/vm vm_phys.c vm_page.c

vm_phys: reduce touching of page->pool fields

Change the usage of the pool field in vm_page structs.

Currently, every page belongs to a pool, and the pool field identifies
that pool, whether the page is allocated or free.

With this change, the pool field of the first page of a free block is
used by the buddy allocator to identify its pool, but the buddy
allocator makes no guarantees about the pool field value for allocated
pages. The buddy allocator requires that a pool parameter be passed as
part of freeing memory. A function that allocates memory may use the
pool field of a page to record what pool to pass as that parameter
when the memory is freed, but might not need to do so for every
allocated page.

Suggested by:   alc
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D45409
DeltaFile
+66-57sys/vm/vm_phys.c
+50-47sys/vm/vm_page.c
+20-15sys/vm/vm_reserv.c
+3-3sys/vm/vm_phys.h
+1-1sys/vm/vm_kern.c
+140-1235 files

FreeBSD/src 6d48eaftools/build checkstyle9.pl

checkstyle9.pl: don't require Signed-off-by for committers

Silence the warning about Signed-off-by: lines if the Author: is using a
FreeBSD.org address.  We don't require the lines in direct FreeBSD
commits so the warning is just noise in this case.

Reviwed by:     imp, emaste
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1577
DeltaFile
+6-1tools/build/checkstyle9.pl
+6-11 files

FreeBSD/src 81b076etests/sys/netinet fibs_test.sh

fibs tests: Fix test failures and simplify

The tests previously expected the invoker to pass a list of FIBs to use.
However, they now run in separate VNET jails, so we can simply expand
the FIB array as needed in each test.  Modify each test to simply set
net.fibs as needed and grab FIB numbers starting at 1.

A number of tests were also broken by commit 9206c7996198
("usr.bin/netstat: -n should not print symbolic names"), so fix those.

Reviewed by:    asomers
Fixes:          9206c7996198 ("usr.bin/netstat: -n should not print symbolic names")
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D48585
DeltaFile
+12-31tests/sys/netinet/fibs_test.sh
+12-311 files

FreeBSD/src 0fb33e0share/mk bsd.cpu.mk

bsd.cpu.mk: Add _CPUFLAGS to CXXFLAGS as well

PR: 180365
Reviewed by: imp
Sponsored by: Netflix
DeltaFile
+1-0share/mk/bsd.cpu.mk
+1-01 files

FreeBSD/src cc6d72cshare/mk bsd.cpu.mk

bsd.cpu.mk: Remove xscale reference

We've retired all the armv5te support, so we don't need this here anymore.

Sponsored by:           Netflix
DeltaFile
+1-5share/mk/bsd.cpu.mk
+1-51 files

FreeBSD/src c8b89c1usr.sbin/periodic periodic.sh periodic.conf

periodic: set _localbase for periodic scripts from within periodic.conf

Set _localbase variable from within /etc/defaults/periodic.conf
for use by periodic scripts.

This fixes e5d7100c09, no other functional changes intended.

Reported by:            gahr, otis
Reviewed by:            markj, gahr
MFC after:              2 weeks
Differential Revision:  https://reviews.freebsd.org/D47486
DeltaFile
+4-8usr.sbin/periodic/periodic.sh
+9-0usr.sbin/periodic/periodic.conf
+13-82 files

FreeBSD/src 8d5d973sbin/kldstat kldstat.8

kldstat.8: Polish options

+ Align and alphabetize options
+ -q: s/Only/Quietly/ for search
+ Tag SPDX

MFC after:              3 days
Reviewed by:            gbe, carlavilla, mhorne
Approved by:            carlavilla, mhorne (mentors)
Differential Revision:  https://reviews.freebsd.org/D48325
DeltaFile
+11-9sbin/kldstat/kldstat.8
+11-91 files

FreeBSD/src 347eb42usr.sbin/bsdinstall/scripts zfsboot

bsdinstall/zfsboot: Remove unused global variable

In an AMA session on the FreeBSD Discord, it was revealed that no
logic remains calling GPART_BOOTCODE_PARTONLY. It was removed in
aa2a0e0fc311 for FreeBSD 12. git grep shows no other references.
No functional change intended.

MFC after:              2 weeks
Fixes:                  aa2a0e0fc311 (Enable new UEFI+GELI support)
Reported by:            Antranig Vartanian <antranigv at freebsd.am>
Reviewed by:            emaste, mhorne
Approved by:            emaste, mhorne (src)
Approved by:            mhorne, carlavilla (mentors)
Differential Revision:  https://reviews.freebsd.org/D48086
DeltaFile
+0-1usr.sbin/bsdinstall/scripts/zfsboot
+0-11 files

FreeBSD/src c19f1adsys/dev/pci pci_host_generic.c

pci_host_generic: Use SYS_RES_MEMORY for the parent of I/O resource ranges

When a SYS_RES_IOPORT resource crosses a pci_host_generic bridge, it
is translated into a memory access for an associated range, so use
SYS_RES_MEMORY for the resource allocated from the parent.

Tested by:      markj
Differential Revision:  https://reviews.freebsd.org/D44207
DeltaFile
+8-13sys/dev/pci/pci_host_generic.c
+8-131 files

FreeBSD/src 010ee82lib/libsys setfib.2

setfib.2: Note that the number of FIBs can be adjusted after boot

Reviewed by:    zlei, imp
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D48545
DeltaFile
+9-4lib/libsys/setfib.2
+9-41 files

FreeBSD/src 960c5bbsys/net if_vxlan.c

if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured

It is harmless but pointless to invoke vxlan_stop event handler when the
interface was not previously configured. This change will also prevent
an assert panic from t4_vxlan_stop_handler().

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D48494
DeltaFile
+6-2sys/net/if_vxlan.c
+6-21 files

FreeBSD/src 0ec9398usr.sbin/makefs/tests makefs_zfs_tests.sh, usr.sbin/makefs/zfs fs.c

makefs: Handle special file types when creating a zpool

Previously, anything other than a regular file, directory or symlink
would cause makefs to exit with an assertion failure.  Make it a bit
more resilient to user error: print a warning and skip the file.  Add a
regression test wherein we create an image from a devfs mount.

PR:             283583
MFC after:      2 weeks

(cherry picked from commit ce878284318e71217d8d8f43f7d590b6c338d3aa)
DeltaFile
+32-7usr.sbin/makefs/zfs/fs.c
+22-0usr.sbin/makefs/tests/makefs_zfs_tests.sh
+54-72 files

FreeBSD/src 4b04f5dusr.bin/xinstall xinstall.c

install: Fix METALOG ouptut for numeric -o and -g args

install's -o and -g flags both accept a name or a numeric argument.
In -U -M (non-root METALOG) mode it always emitted uname= and gname= in
the METALOG, but these are not appropriate for numeric IDs.

If the -o and/or -u arguments parse as an ID, emit uid= and/or gid=
respectively.

Note that if an argument is valid as both a name and numeric ID we will
prefer the name in normal (non -U -M) mode and the ID in -U -M mode.  We
don't want to require a passwd db in non-root mode, and entirely-numeric
user or group names are a terrible idea so just accept this discrepancy.

PR:             284119
Reviewed by:    jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48504
DeltaFile
+16-4usr.bin/xinstall/xinstall.c
+16-41 files

FreeBSD/src ecf605dsys/dev/hid hid.c hid.h

hid: Correctly handle signed/unsigned quantities in kernel HID parser.

Wrong signedness of usage value results in inverted range check in hmt(4)
driver that allows out of bound array access leading to panic.

Reported by:    many
Sponsored by:   Future Crew, LLC
Obtained from:  NetBSD
NetBSD PR:      kern/53605
PR:             274014, 282592

(cherry picked from commit 38b67578fb4bbf568f7012ca3921a4d15cfe7c5d)
(cherry picked from commit 1dda3a6ed9c51adc908fee4db5917b1232fa932c)
DeltaFile
+48-43sys/dev/hid/hid.c
+16-16sys/dev/hid/hid.h
+64-592 files

FreeBSD/src 1dda3a6sys/dev/hid hid.c hid.h

hid: Correctly handle signed/unsigned quantities in kernel HID parser.

Wrong signedness of usage value results in inverted range check in hmt(4)
driver that allows out of bound array access leading to panic.

Reported by:    many
Sponsored by:   Future Crew, LLC
Obtained from:  NetBSD
NetBSD PR:      kern/53605
PR:             274014, 282592

(cherry picked from commit 38b67578fb4bbf568f7012ca3921a4d15cfe7c5d)
DeltaFile
+48-43sys/dev/hid/hid.c
+16-16sys/dev/hid/hid.h
+64-592 files

FreeBSD/src ffcefe5sys/dev/sound/pcm channel.h channel.c

sound: Make CHN_REMOVE_SAFE() the default

Commit 27b932e32fab ("sound: Safely remove channel from list in one
pass") optimized CHN_REMOVE_SAFE() to perform almost equally to
CHN_REMOVE(), so we can turn CHN_REMOVE_SAFE() into CHN_REMOVE() without
fears of performance regressions, while also being more robust.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    dev_submerge.ch
Differential Revision:  https://reviews.freebsd.org/D48249
DeltaFile
+1-4sys/dev/sound/pcm/channel.h
+1-1sys/dev/sound/pcm/channel.c
+2-52 files

FreeBSD/src 27b932esys/dev/sound/pcm channel.h

sound: Safely remove channel from list in one pass

The CHN_REMOVE_SAFE() macro did two traversals of the channel list to
remove a channel, one to check whether the channel is an element of the
list, and a second traversal through SLIST_REMOVE(). Reduce this to one
traversal, while still preventing a NULL dereference in case the channel
in question is not present in the list.

While here, rename the macro arguments to something more descriptive.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D48207
DeltaFile
+15-10sys/dev/sound/pcm/channel.h
+15-101 files

FreeBSD/src 27ef5d4sys/dev/sound/pcm sound.h, tests/sys/sound pcm_read_write.c Makefile

sound: Unit test the pcm sample read and write macros

Main goal is to have a unit test, with sample test data that is verified
against the current macro implementation of pcm sample read and write
functions. With a test in place, we can proceed on a planned refactoring
of the sample read and write code, and confidently check the new code
for regressions.

Implementation of the unit test itself has to avoid any cast or
conversion affected by endianness, to make the tests compatible with all
machine architectures.

MFC after:      1 week
Reviewed by:    christos, markj
Differential Revision:  https://reviews.freebsd.org/D48330
DeltaFile
+509-0tests/sys/sound/pcm_read_write.c
+64-64sys/dev/sound/pcm/sound.h
+4-0tests/sys/sound/Makefile
+577-643 files