HardenedBSD/src 3fbe28csys/contrib/openzfs/cmd/zinject zinject.c, tests/sys/netinet so_reuseport_lb_test.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+58-0tests/sys/netinet/so_reuseport_lb_test.c
+10-7sys/contrib/openzfs/cmd/zinject/zinject.c
+3-0usr.sbin/etcupdate/etcupdate.sh
+71-73 files

HardenedBSD/src 90f9ff0sys/contrib/openzfs/cmd/zinject zinject.c, tests/sys/netinet so_reuseport_lb_test.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+58-0tests/sys/netinet/so_reuseport_lb_test.c
+10-7sys/contrib/openzfs/cmd/zinject/zinject.c
+3-0usr.sbin/etcupdate/etcupdate.sh
+71-73 files

HardenedBSD/src 14262aasys/dev/sound/pcm sound.h channel.h, sys/net if_vxlan.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+515-0tests/sys/sound/pcm_read_write.c
+64-64sys/dev/sound/pcm/sound.h
+13-11sys/dev/sound/pcm/channel.h
+6-6usr.sbin/rtsold/rtsold.c
+4-4usr.sbin/bsdinstall/scripts/zfsboot
+6-2sys/net/if_vxlan.c
+608-875 files not shown
+621-9011 files

HardenedBSD/src 93836ffusr.sbin/etcupdate etcupdate.sh

etcupdate: Restrict access to the conflicts directory

In the window during conflict resolution, copies of installed files with
conflicts are added here with the default mode.  Restrict access.

PR:             277470
Reviewed by:    philip, jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D48576

(cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1)
DeltaFile
+3-0usr.sbin/etcupdate/etcupdate.sh
+3-01 files

HardenedBSD/src cd1f435usr.sbin/rtsold rtsold.c

rtsold: Further usage message updates

Add -u, remove -p from the rtsol(8) usage message.

PR:             266634
MFC after:      1 week

(cherry picked from commit 5db50a3167ac7a4f18088a5cfdaac64aa925c32e)
DeltaFile
+6-6usr.sbin/rtsold/rtsold.c
+6-61 files

HardenedBSD/src 66ff030bin/ls ls.c

ls: Release resources before returning from traverse()

PR:             278476
MFC after:      2 weeks
Reported by:    valgrind

(cherry picked from commit e6c9c463384d11a44af3e5f2cc947fb69f3a1968)
DeltaFile
+4-1bin/ls/ls.c
+4-11 files

HardenedBSD/src 3ba946ausr.sbin/rtsold rtsold.c

rtsold: Add -i to the usage message

PR:             266634
Fixes:          231bac4ccc43 ("rtsol/rtsold: Add option to skip random delay")
MFC after:      1 week

(cherry picked from commit 9e9e64b693ab1e08cca46e26e468160542c33f3a)
(cherry picked from commit c4380d5b9383e2a062840573b36ab643b65b2610)
DeltaFile
+4-4usr.sbin/rtsold/rtsold.c
+4-41 files

HardenedBSD/src be53f73usr.sbin/bsdinstall/scripts zfsboot

bsdinstall: hook up help line and prompt for ZFS disk selection

Previously we were passing the wrong variable names for the prompt and
help line, so the intended action wasn't clear to the user.

Reviewed by:    jhb, markj
MFC after:      3 days
See also:       https://github.com/opnsense/installer/issues/22
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1579

(cherry picked from commit d726bc286325dd7093b83c6ebcbaa768c687d825)
DeltaFile
+4-4usr.sbin/bsdinstall/scripts/zfsboot
+4-41 files

HardenedBSD/src aa79996sys/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

(cherry picked from commit 960c5bb0f6bf44aeb09fa14fd0f82c2e82ebe2e2)
DeltaFile
+6-2sys/net/if_vxlan.c
+6-21 files

HardenedBSD/src 719fb5asys/kern kern_sysctl.c

kern_sysctl: Fix printing function name in the re-use sysctl leaf warning

The helper function sysctl_warn_reuse() is intended to print the name of
the caller rather than that of itself.

PR:     221853
Fixes:  4ae2ade11426 Enhance debugibility of sysctl leaf re-use warnings
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D48645

(cherry picked from commit faa845aab6113190ba8c75a171b2cca8673a6214)
DeltaFile
+1-1sys/kern/kern_sysctl.c
+1-11 files

HardenedBSD/src 5289625sys/contrib/openzfs/cmd/zinject zinject.c

zinject: Fix format string errors on 32-bit platforms

Fixes:  c6767dc1f236 ("zfs: merge openzfs/zfs at 34205715e")
DeltaFile
+10-7sys/contrib/openzfs/cmd/zinject/zinject.c
+10-71 files

HardenedBSD/src c43ae7ausr.sbin/etcupdate etcupdate.sh

etcupdate: Restrict access to the conflicts directory

In the window during conflict resolution, copies of installed files with
conflicts are added here with the default mode.  Restrict access.

PR:             277470
Reviewed by:    philip, jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D48576
DeltaFile
+3-0usr.sbin/etcupdate/etcupdate.sh
+3-01 files

HardenedBSD/src 63efd7ftests/sys/netinet so_reuseport_lb_test.c

socket tests: Add a test which calls listen() twice on an lb socket

This exercises commit 06bf119f265c ("sockets/tcp: quick fix for
regression with SO_REUSEPORT_LB")

Reviewed by:    glebius
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D48702
DeltaFile
+58-0tests/sys/netinet/so_reuseport_lb_test.c
+58-01 files

HardenedBSD/src afa1ba3tests/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

(cherry picked from commit f6631da0b581b28c2bfeea1199b52013bb46aa41)
DeltaFile
+2-2tests/sys/sound/pcm_read_write.c
+2-21 files

HardenedBSD/src e4458d4sys/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

(cherry picked from commit ffcefe5310e084415a2f292a00f4637d4059c40f)
DeltaFile
+1-4sys/dev/sound/pcm/channel.h
+1-1sys/dev/sound/pcm/channel.c
+2-52 files

HardenedBSD/src e922268tests/sys/sound pcm_read_write.c

sound tests: Fix 32bit calculation detection in pcm_read_write

Fix a mistake in the pcm_read_write test that would result in not
properly detecting 32bit calculation on 32bit architectures like i386.
As a consequence, the wrong values would be checked, thus failing the
test.

Reported by:    CI
Fixes:          27ef5d48c729 ("sound: Unit test the pcm sample read and write macros")
MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D48617

(cherry picked from commit e02b579b537998495b06d02be6aa07f03db3a42a)
DeltaFile
+9-3tests/sys/sound/pcm_read_write.c
+9-31 files

HardenedBSD/src 6819621sys/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

(cherry picked from commit 27b932e32faba1137ff307d05b787d837ccadda8)
DeltaFile
+15-10sys/dev/sound/pcm/channel.h
+15-101 files

HardenedBSD/src 5edda24sys/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

(cherry picked from commit 27ef5d48c729defb83a8822143dc71ab17f9d68b)
DeltaFile
+509-0tests/sys/sound/pcm_read_write.c
+64-64sys/dev/sound/pcm/sound.h
+4-0tests/sys/sound/Makefile
+577-643 files

HardenedBSD/src 059418esbin/fsck_ffs inode.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-6sbin/fsck_ffs/inode.c
+0-61 files

HardenedBSD/src 2ae9e9bsbin/fsck_ffs inode.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-6sbin/fsck_ffs/inode.c
+0-61 files

HardenedBSD/src 256389esbin/fsck_ffs inode.c

Fix build from aa90fbed151de5 by eliminating an unused variable.
DeltaFile
+0-6sbin/fsck_ffs/inode.c
+0-61 files

HardenedBSD/src d496dccsbin/fsck_ffs inode.c, stand/libsa ufs.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+38-43usr.sbin/makefs/ffs/ufs_inode.h
+11-11usr.sbin/makefs/ffs.c
+17-3sys/ufs/ufs/dinode.h
+10-2sys/netinet/tcp_usrreq.c
+9-3sbin/fsck_ffs/inode.c
+4-7stand/libsa/ufs.c
+89-697 files not shown
+92-10313 files

HardenedBSD/src ed7c895sbin/fsck_ffs inode.c, stand/libsa ufs.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+38-43usr.sbin/makefs/ffs/ufs_inode.h
+11-11usr.sbin/makefs/ffs.c
+17-3sys/ufs/ufs/dinode.h
+9-3sbin/fsck_ffs/inode.c
+10-2sys/netinet/tcp_usrreq.c
+4-7stand/libsa/ufs.c
+89-697 files not shown
+92-10313 files

HardenedBSD/src 06bf119sys/netinet tcp_usrreq.c

sockets/tcp: quick fix for regression with SO_REUSEPORT_LB

There was a long living problem that pr_listen is called every time on
consecutive listen(2) syscalls.  Up until today it produces spurious TCP
state change events in tracing software and other harmless problems.  But
with 7cbb6b6e28db we started to call LIST_REMOVE() twice on the same
entry.

This is quite ugly, but quick and robust fix against regression, that we
decided to put in the scope of the January stabilization week.  A better
refactoring will happen later.

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D48703
Fixes:                  7cbb6b6e28db33095a1cf7a8887921a5ec969824
DeltaFile
+10-2sys/netinet/tcp_usrreq.c
+10-21 files

HardenedBSD/src aa90fbesbin/fsck_ffs inode.c, stand/libsa ufs.c

Standardize the definition of a UFS dinode.

Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.

No functional change intended.

MFC-after: 1 week
DeltaFile
+38-43usr.sbin/makefs/ffs/ufs_inode.h
+11-11usr.sbin/makefs/ffs.c
+17-3sys/ufs/ufs/dinode.h
+9-3sbin/fsck_ffs/inode.c
+4-7stand/libsa/ufs.c
+3-6sys/ufs/ufs/inode.h
+82-736 files not shown
+82-10112 files

HardenedBSD/src 7be72af. UPDATING, share/man/man5 motd.5

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+511-0sys/arm/allwinner/aw_timer.c
+0-480sys/arm/allwinner/a10_timer.c
+7-5share/man/man5/motd.5
+7-1UPDATING
+4-1usr.bin/seq/seq.1
+2-2usr.sbin/autofs/autofs/special_media
+531-48915 files not shown
+546-50221 files

HardenedBSD/src c98f796. UPDATING, share/man/man5 motd.5

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+511-0sys/arm/allwinner/aw_timer.c
+0-480sys/arm/allwinner/a10_timer.c
+7-5share/man/man5/motd.5
+7-1UPDATING
+4-1usr.bin/seq/seq.1
+2-2usr.sbin/autofs/autofs/special_media
+531-48915 files not shown
+546-50221 files

HardenedBSD/src 9257fe1sys/arm/allwinner aw_timer.c, sys/riscv/allwinner files.allwinner

riscv: aw_timer enablement for D1

The SBI timer functionality is partially broken on the Allwinner D1, so
we require this driver to provide an eventtimer/system timer interrupts.

The timecounter interface, on the other hand, is not required. The
generic RISC-V timer driver uses the native rdtime instruction, and
implements vdso, so this should be preferred.

Reviewed by:    manu, ganbold
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48672
DeltaFile
+29-10sys/arm/allwinner/aw_timer.c
+1-0sys/riscv/allwinner/files.allwinner
+1-0sys/riscv/conf/std.allwinner
+31-103 files

HardenedBSD/src c4530df. UPDATING, sys/arm/allwinner aw_timer.c a10_timer.c

aw_timer: rename driver from a10_timer

This reflects its expanded support for platforms other than the A10.

Functions specific to A10/A13 retain the a10 prefix, but the majority of
names in the driver are changed, e.g. a10_timer_softc becomes
aw_timer_softc.

Reviewed by:    manu, ganbold
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48671
DeltaFile
+492-0sys/arm/allwinner/aw_timer.c
+0-492sys/arm/allwinner/a10_timer.c
+6-0UPDATING
+1-1sys/arm64/conf/std.allwinner
+1-1sys/arm/allwinner/files.allwinner_up
+1-1sys/conf/files.arm64
+501-4951 files not shown
+502-4967 files

HardenedBSD/src 449e6a9sys/arm/allwinner a10_timer.c

a10_timer: some tidying/re-organization

In preparation for enabling the driver on the D1 platform (riscv).

 - Better isolate armv7-only portions of the driver
 - Move a10 timecounter setup into a helper function
 - Small style tweaks

Reviewed by:    manu, ganbold
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48670
DeltaFile
+51-39sys/arm/allwinner/a10_timer.c
+51-391 files