FreeBSD/src f8517c2sbin/nvmecontrol power.c, sbin/nvmecontrol/modules/wdc wdc.c

nvmecontrol: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55275
DeltaFile
+2-0sbin/nvmecontrol/modules/wdc/wdc.c
+2-0sbin/nvmecontrol/power.c
+4-02 files

FreeBSD/src 904e0dcsbin/ipfw nptv6.c

ipfw: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55273
DeltaFile
+2-0sbin/ipfw/nptv6.c
+2-01 files

FreeBSD/src 299d3e9sbin/decryptcore decryptcore.c

decryptcore: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55270
DeltaFile
+2-0sbin/decryptcore/decryptcore.c
+2-01 files

FreeBSD/src 8ac9926sbin/newfs_msdos mkfs_msdos.c mkfs_msdos.h

newfs_msdos: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55274
DeltaFile
+2-0sbin/newfs_msdos/mkfs_msdos.c
+2-0sbin/newfs_msdos/mkfs_msdos.h
+4-02 files

FreeBSD/src 25ed5eesbin/camcontrol camcontrol.c

camcontrol: Add SPDX-License-Identifier tag

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55269
DeltaFile
+2-0sbin/camcontrol/camcontrol.c
+2-01 files

FreeBSD/src 32ec8e2tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add missing dpv MLINK

MFC after:      3 days
DeltaFile
+1-0tools/build/mk/OptionalObsoleteFiles.inc
+1-01 files

FreeBSD/src 4c66fafusr.sbin/pw pw.8

pw: make manual page more friendly for uid/gid search

pw.8 structure is quite different from usual manual page, especially in
describing -o option usage.  Specifically, these paragraphs do not
contain "uid/gid" terms, and have "user id"/"group id" instead,
making searching for "override duplicate safety belt" difficult.
Try to simplify such searches.

Also, clarify uid/gid space between 100 and 1000 as "somewhat special",
as it actually is.

Discussed on:   russian telegram FreeBSD group
Reviewed by:    eugen, novel
MFC after:      1 week

(cherry picked from commit e89454417b2bfecce9daee10dece2f49632640d3)
DeltaFile
+7-4usr.sbin/pw/pw.8
+7-41 files

FreeBSD/src 8a2d04cusr.sbin/pw pw.8

pw: make manual page more friendly for uid/gid search

pw.8 structure is quite different from usual manual page, especially in
describing -o option usage.  Specifically, these paragraphs do not
contain "uid/gid" terms, and have "user id"/"group id" instead,
making searching for "override duplicate safety belt" difficult.
Try to simplify such searches.

Also, clarify uid/gid space between 100 and 1000 as "somewhat special",
as it actually is.

Discussed on:   russian telegram FreeBSD group
Reviewed by:    eugen, novel
MFC after:      1 week

(cherry picked from commit e89454417b2bfecce9daee10dece2f49632640d3)
DeltaFile
+7-4usr.sbin/pw/pw.8
+7-41 files

FreeBSD/src 05305acusr.sbin/pw pw.8

pw: make manual page more friendly for uid/gid search

pw.8 structure is quite different from usual manual page, especially in
describing -o option usage.  Specifically, these paragraphs do not
contain "uid/gid" terms, and have "user id"/"group id" instead,
making searching for "override duplicate safety belt" difficult.
Try to simplify such searches.

Also, clarify uid/gid space between 100 and 1000 as "somewhat special",
as it actually is.

Discussed on:   russian telegram FreeBSD group
Reviewed by:    eugen, novel
MFC after:      1 week

(cherry picked from commit e89454417b2bfecce9daee10dece2f49632640d3)
DeltaFile
+7-4usr.sbin/pw/pw.8
+7-41 files

FreeBSD/src e387d94sys/kern subr_smp.c

smp: Use bitwise operation to count cpu number

Previously, we iterated over all CPUs using CPU_FOREACH and checked
individual bits to count valid CPUs. Refactor this to use a bitwise AND
and popcount to count the number of enabled bits directly.

Approved by:    markj (mentor)
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D54474
DeltaFile
+3-5sys/kern/subr_smp.c
+3-51 files

FreeBSD/src efcfba9tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add missing figpar MLINKS

MFC after:      3 days
Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")
DeltaFile
+7-0tools/build/mk/OptionalObsoleteFiles.inc
+7-01 files

FreeBSD/src 48aeff4lib/libsys open.2

open.2: grammar improvements

(cherry picked from commit f1f142c01db43c7dc8d0d172fc1726da2ee01972)
DeltaFile
+2-2lib/libsys/open.2
+2-21 files

FreeBSD/src 532c8d3sys/amd64/amd64 initcpu.c pmap.c, sys/amd64/include md_var.h

amd64: add LASS support

(cherry picked from commit 89589b6d3fbac43eb7c6b3cdbdd6f077888b2142)
DeltaFile
+13-0sys/amd64/amd64/initcpu.c
+9-0sys/amd64/amd64/pmap.c
+4-0sys/amd64/amd64/efirt_machdep.c
+1-0sys/amd64/amd64/machdep.c
+1-0sys/amd64/include/md_var.h
+28-05 files

FreeBSD/src 4338c43lib/libsys open.2

open.2: stop making impression that fd must be directory

(cherry picked from commit 5bcccc702b29a0e173a5916b001771dd7b280c7c)
DeltaFile
+20-3lib/libsys/open.2
+20-31 files

FreeBSD/src a03f285lib/libc/gen uexterr_gettext.3 Makefile.inc, share/man/man9 exterror.9

libc: add man page for uexterr_gettext(3)

Reviewed by:    mckusick
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55336
DeltaFile
+71-0lib/libc/gen/uexterr_gettext.3
+2-1share/man/man9/exterror.9
+1-0lib/libc/gen/Makefile.inc
+74-13 files

FreeBSD/src 1443a45include exterr.h, lib/libc/gen uexterr_format.c

libc: improve include usage for exterror sources

Include sys/types.h by exterr.h, since size_t is used.
Drop include of sys/exterr_cat.h, it is useless for the only prototype
provided.

Reviewed by:    mckusick
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55337
DeltaFile
+1-2include/exterr.h
+1-0lib/libc/gen/uexterr_format.c
+2-22 files

FreeBSD/src f16fc39usr.sbin/ngctl config.c

ngctl: Fix buffer overflow in config command

Keep track of our buffer length when assembling the argument list.

PR:             293075
MFC after:      1 week
Reviewed by:    zlei, markj
Differential Revision:  https://reviews.freebsd.org/D55259

(cherry picked from commit 59906a163e474c8d00bdebe226c4d47332b91bad)
(cherry picked from commit e5bf728058da2b9cdc056e49bd82b57310588b3e)
DeltaFile
+14-8usr.sbin/ngctl/config.c
+14-81 files

FreeBSD/src 6316ab6usr.sbin/ngctl write.c

ngctl: Check hook name length

Check the length of the hook name when copying it into the sockaddr.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55258

(cherry picked from commit 585190dff436eeea3be97300e36c82559028d3dd)
(cherry picked from commit 71c0f48ab19fbac3d93e29d8964db2f215ddf722)
DeltaFile
+14-4usr.sbin/ngctl/write.c
+14-41 files

FreeBSD/src 71ed9aesys/compat/linux linux_file.c, sys/kern vfs_mount.c

kern/vfs_unmount.c: promote flags to uint64_t

(cherry picked from commit 8066b8923ebfd438dc8cb840d2f57066f4daa45d)
(cherry picked from commit 00095a089604aba93ef265fb0a52e170bcb77da7)
DeltaFile
+2-2sys/kern/vfs_mount.c
+1-1sys/sys/syscallsubr.h
+1-1sys/compat/linux/linux_file.c
+4-43 files

FreeBSD/src 0235e9esys/kern vfs_mount.c

unmount(2): do not allow MNT_DEFERRED or MNT_RECURSE flags from userspace

(cherry picked from commit cd8d44173adc375b59a24b1363476c086a7c86b4)
(cherry picked from commit a893e8463ab2741204debd17901539708ec3a970)
DeltaFile
+2-0sys/kern/vfs_mount.c
+2-01 files

FreeBSD/src 37fa2e7sys/kern kern_event.c

filt_timerexpire_l(): re-insert restarted timer into head instead of tail

PR:     293141

(cherry picked from commit 75a30ea09f4e75480743fae5c2369d50a6d8526c)
(cherry picked from commit 119af90d483aee79bf549b3d63e1093bb59e1092)
DeltaFile
+6-1sys/kern/kern_event.c
+6-11 files

FreeBSD/src 39dd0d8sys/kern kern_event.c

kqtimer_proc_continue(): correct calculation of 'now'

PR:     293141

(cherry picked from commit e7f86f8b1383d278fff1d973230972325072ead6)
(cherry picked from commit cf941029dd0291c8b685aa3f6d7872371e6136b9)
DeltaFile
+1-4sys/kern/kern_event.c
+1-41 files

FreeBSD/src b9a6888usr.bin/diff/tests diff_test.sh

diff: Tweak recursion tests

The -r flag is not required to compare two directories; it is only
required to compare them recursively, i.e. descend into their common
subdirectories.  Adjust tests that use -r needlessly, and adjust the
dirloop test to verify that these two cases remain distinct.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55262

(cherry picked from commit b2532432971fbd9339a9a49eca1b532978bb6d48)
DeltaFile
+9-7usr.bin/diff/tests/diff_test.sh
+9-71 files

FreeBSD/src c603843usr.bin/diff diff.c, usr.bin/diff/tests diff_test.sh

diff: Tweak range of -C and -U arguments

POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans

    [3 lines not shown]
DeltaFile
+32-20usr.bin/diff/tests/diff_test.sh
+19-14usr.bin/diff/diff.c
+51-342 files

FreeBSD/src f10da15usr.bin/diff/tests diff_test.sh

diff: Tweak recursion tests

The -r flag is not required to compare two directories; it is only
required to compare them recursively, i.e. descend into their common
subdirectories.  Adjust tests that use -r needlessly, and adjust the
dirloop test to verify that these two cases remain distinct.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55262

(cherry picked from commit b2532432971fbd9339a9a49eca1b532978bb6d48)
DeltaFile
+16-14usr.bin/diff/tests/diff_test.sh
+16-141 files

FreeBSD/src ce4f512usr.bin/diff diff.c, usr.bin/diff/tests diff_test.sh

diff: Tweak range of -C and -U arguments

POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans

    [3 lines not shown]
DeltaFile
+32-20usr.bin/diff/tests/diff_test.sh
+29-17usr.bin/diff/diff.c
+61-372 files

FreeBSD/src 6458b1asys/dev/nvme nvme_qpair.c

nvme: Use __diagused instead of __unused

Reviewed by:    imp
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.

(cherry picked from commit 1c09ae2be059da0b945a2543ac7dd0bd5198d0e3)
DeltaFile
+1-1sys/dev/nvme/nvme_qpair.c
+1-11 files

FreeBSD/src 3bfe51cbin/timeout timeout.c timeout.1

timeout: Clean up

* Annotate logv() and fix format string bug.

* Don't reinvent str2sig(3).

* Reorganize kill_self() so we unblock signals as late as possible, and
  use raise(2) instead of kill(2).

* Explicitly close unused pipe descriptors.

* Use correct type to collect result of read(2) and write(2).

* Compare return values to 0, not -1.

* Sort local variables according to style(9).

* Reduce unnecessary nesting.


    [10 lines not shown]
DeltaFile
+73-85bin/timeout/timeout.c
+1-1bin/timeout/timeout.1
+74-862 files

FreeBSD/src 608d3c7usr.bin/diff/tests diff_test.sh

diff: Tweak recursion tests

The -r flag is not required to compare two directories; it is only
required to compare them recursively, i.e. descend into their common
subdirectories.  Adjust tests that use -r needlessly, and adjust the
dirloop test to verify that these two cases remain distinct.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55262

(cherry picked from commit b2532432971fbd9339a9a49eca1b532978bb6d48)
DeltaFile
+16-14usr.bin/diff/tests/diff_test.sh
+16-141 files

FreeBSD/src 23a8479usr.bin/diff diff.c, usr.bin/diff/tests diff_test.sh

diff: Tweak range of -C and -U arguments

POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans

    [3 lines not shown]
DeltaFile
+38-24usr.bin/diff/tests/diff_test.sh
+26-18usr.bin/diff/diff.c
+64-422 files