FreeBSD/src 3f5f522sys/kern kern_jail.c

kern_jail_set(): do not double-free opts

If vfs_buildopts() failed, vfs_freeopts() must not be called.

Reported and tested by: pho
Reviewed by:    jamie
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D53612
DeltaFile
+5-2sys/kern/kern_jail.c
+5-21 files

FreeBSD/src d4824d1usr.bin/find find.1

find.1: Correct HISTORY grammar typo

PR:             286292
MFC after:      3 days
Reviewed by:    ziaee

(cherry picked from commit b87dcd7004993417cf711f20a0924e3a768ae116)
DeltaFile
+1-1usr.bin/find/find.1
+1-11 files

FreeBSD/src b558ebbsys/cam/ata ata_da.c, sys/cam/scsi scsi_da.c

cam: Add a number of asserts to catch bad transactions

Ensure that we're in the right state / priority for each of the states
in the driver. These asserts assured that a prior patch that I committed
to fix a priority leak worked when a drive departed (and bounced back
too!). These have been running in our production since I committed the
change and haven't trigged.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D53259
DeltaFile
+72-0sys/cam/ata/ata_da.c
+21-0sys/cam/scsi/scsi_da.c
+93-02 files

FreeBSD/src 920c94busr.sbin/sysrc sysrc.8

sysrc.8: Rewrite examples for mdoc conformance

Tag SPDX while here. This is not a content change, so do not bump date.

PR:             274164
MFC after:      3 seconds

(cherry picked from commit 3f0dd7724658126dcfde488a994cf7698353a82c)
DeltaFile
+41-48usr.sbin/sysrc/sysrc.8
+41-481 files

FreeBSD/src 9a6e6e9usr.sbin/sysrc sysrc.8

sysrc.8: Rewrite examples for mdoc conformance

Tag SPDX while here. This is not a content change, so do not bump date.

PR:             274164
MFC after:      3 seconds

(cherry picked from commit 3f0dd7724658126dcfde488a994cf7698353a82c)
DeltaFile
+41-48usr.sbin/sysrc/sysrc.8
+41-481 files

FreeBSD/src 3f0dd77usr.sbin/sysrc sysrc.8

sysrc.8: Rewrite examples for mdoc conformance

Tag SPDX while here. This is not a content change, so do not bump date.

PR:             274164
MFC after:      3 seconds
DeltaFile
+41-48usr.sbin/sysrc/sysrc.8
+41-481 files

FreeBSD/src 396fac0sbin/dumpon dumpon.8

dumpon.8: use .Nm macro when refer to itself

Bump .Dd too while I am here.
DeltaFile
+2-2sbin/dumpon/dumpon.8
+2-21 files

FreeBSD/src fa168bbshare/man/man4 ciss.4

ciss.4: Add p440ar to HARDWARE

PR:             290425
MFC after:      3 seconds, this fixes the HW relnotes
Reported by:    jwb

(cherry picked from commit a41ffaa330f5dbfc6b10f32ea2879755e07ba932)
DeltaFile
+6-3share/man/man4/ciss.4
+6-31 files

FreeBSD/src 801f10bshare/man/man4 ciss.4

ciss.4: Add p440ar to HARDWARE

PR:             290425
MFC after:      3 seconds, this fixes the HW relnotes
Reported by:    jwb

(cherry picked from commit a41ffaa330f5dbfc6b10f32ea2879755e07ba932)
DeltaFile
+6-3share/man/man4/ciss.4
+6-31 files

FreeBSD/src a41ffaashare/man/man4 ciss.4

ciss.4: Add p440ar to HARDWARE

PR:             290425
MFC after:      3 seconds, this fixes the HW relnotes
Reported by:    jwb
DeltaFile
+6-3share/man/man4/ciss.4
+6-31 files

FreeBSD/src 7c87171sbin/dumpon dumpon.8

dumpon(8): Add a SYSCTL VARIABLES section

Document debug.minidump and machdep.dump_retry_count sysctl variables.

PR:                     259393
MFC after:              3 seconds
Reviewed by:            gbe (previous), markj, ziaee
Differential Revision:  https://reviews.freebsd.org/D32618

(cherry picked from commit 850841edf6c0867a170d2637f3dacfda33d5f3dd)
DeltaFile
+15-0sbin/dumpon/dumpon.8
+15-01 files

FreeBSD/src 2608020sbin/dumpon dumpon.8

dumpon(8): Add a SYSCTL VARIABLES section

Document debug.minidump and machdep.dump_retry_count sysctl variables.

PR:                     259393
MFC after:              3 seconds
Reviewed by:            gbe (previous), markj, ziaee
Differential Revision:  https://reviews.freebsd.org/D32618

(cherry picked from commit 850841edf6c0867a170d2637f3dacfda33d5f3dd)
DeltaFile
+15-0sbin/dumpon/dumpon.8
+15-01 files

FreeBSD/src 850841esbin/dumpon dumpon.8

dumpon(8): Add a SYSCTL VARIABLES section

Document debug.minidump and machdep.dump_retry_count sysctl variables.

PR:                     259393
MFC after:              3 seconds
Reviewed by:            gbe (previous), markj, ziaee
Differential Revision:  https://reviews.freebsd.org/D32618
DeltaFile
+15-0sbin/dumpon/dumpon.8
+15-01 files

FreeBSD/src 6453523usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: Swap pkg(8) flags in check_pkgbase()

Unbootstrapped pkg will ignore -N if -r is specified first.  Flip the
order.

Prior to commit 66c75fa63aff this worked by accident.

PR:             290393
Reported by:    olgeni
MFC after:      3 days
Fixes:          66c75fa63aff ("freebsd-update: Fix the pkgbase check")
DeltaFile
+1-1usr.sbin/freebsd-update/freebsd-update.sh
+1-11 files

FreeBSD/src 4d6801astand/libsa/zfs zfsimpl.c, sys/cddl/boot/zfs zfsimpl.h

stand: Teach the zfs loader about dynamic gang headers

There is a pool feature, dynamic_gang_header, that is enabled by default
in new pools.  When this feature is active, gang headers may be larger
than 512 bytes.  The loader needs to be taught to cope with that.

Try using the vdev ashift to pick the gang block header size.  If the
checksum fails, fall back to the old gang block header size.

This is based on a patch by Paul Dagnelie, with testing, bug-fixing and
some simplifications from me.

PR:             289690
Co-authored by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53578
DeltaFile
+54-13stand/libsa/zfs/zfsimpl.c
+2-13sys/cddl/boot/zfs/zfsimpl.h
+56-262 files

FreeBSD/src c55f179lib/ofed Makefile.inc

lib/ofed: Move to the rdma package

We have an existing rdma package for IB/rdma-related files, but most
of ofed isn't in that package, making it rather useless.  Move all of
lib/ofed to the rdma package.

Add a separate rdma-lib package using LIB_PACKAGE, since utilities
depends on the rdma libraries and we don't want that to pull in all
of rdma.

This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.

PR:     263227
MFC after:      never
Reviewed by:    manu
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53604
DeltaFile
+3-0lib/ofed/Makefile.inc
+3-01 files

FreeBSD/src 0c90c9alib/googletest Makefile.inc, lib/googletest/tests Makefile Makefile.inc

lib/googletest: Move to a new googletest package

gtest/gmock are not normally used by users unless running the tests,
so they shouldn't be in the utilities package.  Move them to a new
googletest package, to match what we did with ATF/Kyua.

While here, move tests dependencies from tests-all.ucl to tests.ucl,
which is the canonical place for that.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:      never
Reported by:    emaste
Reviewed by:    manu
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53607
DeltaFile
+33-0release/packages/ucl/googletest-all.ucl
+21-2release/packages/ucl/tests.ucl
+0-18release/packages/ucl/tests-all.ucl
+3-0lib/googletest/tests/Makefile
+2-0lib/googletest/tests/Makefile.inc
+2-0lib/googletest/Makefile.inc
+61-206 files

FreeBSD/src 8712174libexec/makewhatis.local Makefile, usr.sbin/periodic/etc/weekly Makefile

periodic: Move 320.whatis to the mandoc package

This periodic script only makes sense if mandoc is installed, so move
it to the mandoc package like other periodic scripts.

/usr/libexec/makewhatis.local only exists for the enjoyment of this
script, and doesn't work without mandoc installed, so move that as
well.

This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.

MFC after:      never
Reviewed by:    ziaee, manu
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53609
DeltaFile
+5-6usr.sbin/periodic/etc/weekly/Makefile
+1-0libexec/makewhatis.local/Makefile
+6-62 files

FreeBSD/src 6a12f58etc/mtree BSD.usr.dist, share/doc/llvm Makefile Makefile.inc

share/doc/llvm: Move to the clang package

This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.

MFC after:      never
Reviewed by:    manu, dim
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53608
DeltaFile
+2-2etc/mtree/BSD.usr.dist
+2-0share/doc/llvm/Makefile
+1-0share/doc/llvm/Makefile.inc
+5-23 files

FreeBSD/src 8a8f2ebetc/mtree BSD.usr.dist, etc/termcap Makefile

ncurses: Move termcap and tabset to ncurses-lib

termcap and tabset are currently in runtime, but since ncurses is the
only thing which uses them, they belong in the ncurses package.

curses without termcap is not very useful, so put them in the -lib
subpackage rather than ncurses itself, so that installing ncurses-lib
provides a working curses.

This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.

MFC after:      never
Discussed with: kevans
Reviewed by:    manu, kevans
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53610
DeltaFile
+7-4share/termcap/Makefile
+3-1etc/termcap/Makefile
+2-0share/tabset/Makefile
+1-1etc/mtree/BSD.usr.dist
+13-64 files

FreeBSD/src d7a1382sys/kern kern_prot.c kern_jail.c

Revert "kern: RACCT: Keep process credentials alive via references"

The change causes a panic on boot with INVARIANTS kernels.  Revert for
now.

This reverts commit a5d1a0c9bfcca38528b861c5afb51ea9b1696b65.

Reported by:    syzbot+74624c6fcbb384ea0113 at syzkaller.appspotmail.com
DeltaFile
+15-39sys/kern/kern_prot.c
+2-7sys/kern/kern_jail.c
+1-6sys/kern/kern_loginclass.c
+2-4sys/kern/kern_racct.c
+20-564 files

FreeBSD/src 71bd17bshare/man/man4 ice.4

ice.4: Add ToC and E835 and editorial pass

This manual is large enough and well structured enough that we can have
a clickable table of contents. Use that to move some subsections which
should not appear in Hardware Release Note to the description section.
Adjust subsection names so this will work, preserving parentheticals
for search by moving them to the bodies just below.

Strip unnecessary copyright symbols and escaped hyphens. Copyright
symbols never appear in the content of manual pages, including other
Intel manual pages, and appear to break the Hardware Release Notes.
Escaped hyphens were necessary decades ago for manual pages written
in man(7), but this page is written in mdoc(7). Also misc touchups.

Add the recently added E835 devices to the supported HARDWARE list.
Add the speed ranges to description like the other ethernet drivers.

PR:             290778
MFC after:      1 day

    [7 lines not shown]
DeltaFile
+224-148share/man/man4/ice.4
+224-1481 files

FreeBSD/src 0ee1546share/man/man4 ice.4

ice.4: Avoid first person language

Approved by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52896

(cherry picked from commit 85531add28443e4202632fedcb3ae6038d4acb0c)
DeltaFile
+45-47share/man/man4/ice.4
+45-471 files

FreeBSD/src e30db53usr.bin/cut cut.1

cut.1: Align option list and tag spdx

MFC after:      3 days

(cherry picked from commit 16f37d97b9500a4fe2d0719161025515d477a5cd)
DeltaFile
+4-1usr.bin/cut/cut.1
+4-11 files

FreeBSD/src 26e7e9ausr.sbin/mixer mixer.8

mixer(8): Update FILES section

While here, change "N" to "X" to match sndctl.8's notation.

Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D53503
DeltaFile
+18-26usr.sbin/mixer/mixer.8
+18-261 files

FreeBSD/src ccd9488etc/mtree BSD.include.dist

etc/mtree/BSD.include.dist: Remove libipt-dev

This package only exists on amd64, which means on other platforms we
produce an empty package containing nothing but this directory, and
without a base package (libipt) that package fails to install due to
a missing dependency.

For now, fix this by removing the libipt-dev package tag, which moves
this directory to clibs.

Fixes: 436618a427b4 ("etc/mtree: Add package tags for /usr/include")
Reported by:    cperciva
MFC after:      3 seconds

(cherry picked from commit 2a8a6179eb6cef8ba1a417a4c8a1f7063c704533)
DeltaFile
+1-1etc/mtree/BSD.include.dist
+1-11 files

FreeBSD/src 2a8a617etc/mtree BSD.include.dist

etc/mtree/BSD.include.dist: Remove libipt-dev

This package only exists on amd64, which means on other platforms we
produce an empty package containing nothing but this directory, and
without a base package (libipt) that package fails to install due to
a missing dependency.

For now, fix this by removing the libipt-dev package tag, which moves
this directory to clibs.

Fixes: 436618a427b4 ("etc/mtree: Add package tags for /usr/include")
Reported by:    cperciva
MFC after:      3 seconds
DeltaFile
+1-1etc/mtree/BSD.include.dist
+1-11 files

FreeBSD/src c23a589usr.sbin/cron/lib env.c

cron: Use reallocarray() to prevent integer overflow

Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size
calculations with reallocarray() to prevent possible integer
overflow.

(cherry picked from commit 40d21618382108fefa84f8576b14302f65452718)
DeltaFile
+2-3usr.sbin/cron/lib/env.c
+2-31 files

FreeBSD/src ab0a116usr.sbin/cron/lib env.c

cron: Use reallocarray() to prevent integer overflow

Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size
calculations with reallocarray() to prevent possible integer
overflow.

(cherry picked from commit 40d21618382108fefa84f8576b14302f65452718)
DeltaFile
+2-3usr.sbin/cron/lib/env.c
+2-31 files

FreeBSD/src a5d1a0csys/kern kern_prot.c kern_jail.c

kern: RACCT: Keep process credentials alive via references

In system calls changing process credentials, on RACCT, calls to
racct_proc_ucred_changed() must be issued on the new credentials.
Currently, this is done after the new credentials have been installed on
the process via proc_set_cred() or proc_set_cred_enforce_proc_lim(),
which modifies 'p_ucred'.  Only the process lock guarantees that the new
credentials pointed to by 'p_ucred' cannot themselves be concurrently
modified, which would cause their 'struct ucred' to potentially lose its
last reference from the process before the call to
racct_proc_ucred_changed(), which needs one.

For better code understandability and to avoid errors in future
modifications, stop relying on proc_set_cred*() storing the passed
'struct ucred' in the process 'p_ucred' and on the process lock to avoid
the reference taken by proc_set_cred*() to vanish.  Instead, ensure that
a reference is held when racct_proc_ucred_changed() is called.

As racct_proc_ucred_changed() is actually passed explicit pointers to

    [24 lines not shown]
DeltaFile
+39-15sys/kern/kern_prot.c
+7-2sys/kern/kern_jail.c
+6-1sys/kern/kern_loginclass.c
+4-2sys/kern/kern_racct.c
+56-204 files