FreeBSD/src 033587asbin/mount_nullfs mount_nullfs.8

mount_nullfs.8: document unixbypass and nounixbypass

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52983
DeltaFile
+27-1sbin/mount_nullfs/mount_nullfs.8
+27-11 files

FreeBSD/src 6fa205asys/fs/nullfs null_vfsops.c null_vnops.c

nullfs: add nounixbypass mount option

The option, when set, disables bypassing the unix socket vnode down
to the lower mp, effectively preventing connection to nullfs unix
socket from being acceptable from the lower mp (and vice versa).

This is done by providing a vop vector that stops bypass for unp-related
VOPs.  I believe that VFS_VOP_VECTOR_REGISTER() does the right thing
there regardless of the order of initialization.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52983
DeltaFile
+9-0sys/fs/nullfs/null_vfsops.c
+8-0sys/fs/nullfs/null_vnops.c
+3-1sys/fs/nullfs/null_subr.c
+2-1sys/fs/nullfs/null.h
+22-24 files

FreeBSD/src 8e6f6a5sys/fs/nullfs null_vfsops.c

nullfs_mount: use symbols instead of string literals for cache mount options

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52983
DeltaFile
+5-2sys/fs/nullfs/null_vfsops.c
+5-21 files

FreeBSD/src 419f2fesys/fs/nullfs null.h null_vfsops.c

nullfs: add a helper for testing if vnode belongs to a nullfs mount

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52983
DeltaFile
+10-0sys/fs/nullfs/null.h
+2-2sys/fs/nullfs/null_vfsops.c
+1-1sys/fs/nullfs/null_vnops.c
+13-33 files

FreeBSD/src 035f197sys/fs/nullfs null.h

fs/nullfs/null.h: put first definition after headers include

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52983
DeltaFile
+2-2sys/fs/nullfs/null.h
+2-21 files

FreeBSD/src de36d0dstand/lua cli.lua.8

cli.lua.8: Reflow literal comments

Reflow comments in literal text blocks
so this manual is legible at MANWIDTH 78.

MFC after:      1 day
DeltaFile
+10-8stand/lua/cli.lua.8
+10-81 files

FreeBSD/src d8a4843share/man/man4 umass.4

umass.4: Modernize driver loading instructions

+ consolidate kernel configuration in SYNOPSIS
+ explain driver autoloading in DESCRIPTION
+ s/port/interface/ because of internal USBs
+ fix flow of remaining example

MFC after:      1 day
DeltaFile
+23-33share/man/man4/umass.4
+23-331 files

FreeBSD/src 8f13891contrib/sendmail/src newaliases.1

MFC: Merge commit '1fdae2e33fdc751bc2ec74c81fcde14323e4e965'

Be explicit that newaliases for sendmail
(Upstream sendmail.org commit 3084151d898)

PR:     289259

(cherry picked from commit e9f7c3de111b9dda23e1763e030688d78a71d8ff)
DeltaFile
+1-1contrib/sendmail/src/newaliases.1
+1-11 files

FreeBSD/src e3df9a7contrib/sendmail/src newaliases.1

MFC: Merge commit '1fdae2e33fdc751bc2ec74c81fcde14323e4e965'

Be explicit that newaliases for sendmail
(Upstream sendmail.org commit 3084151d898)

PR:     289259
MFC after:      1 hour

(cherry picked from commit e9f7c3de111b9dda23e1763e030688d78a71d8ff)
DeltaFile
+1-1contrib/sendmail/src/newaliases.1
+1-11 files

FreeBSD/src e504946contrib/sendmail/src newaliases.1

MFC: Merge commit '1fdae2e33fdc751bc2ec74c81fcde14323e4e965'

Be explicit that newaliases for sendmail
(Upstream sendmail.org commit 3084151d898)

PR:     289259

(cherry picked from commit e9f7c3de111b9dda23e1763e030688d78a71d8ff)
DeltaFile
+1-1contrib/sendmail/src/newaliases.1
+1-11 files

FreeBSD/src 94f08f6usr.sbin/nfsuserd nfsuserd.c

nfsuserd: Fix OOB access on membership of too many groups, take 2

Forgot to reset 'ngroup' after one of the calls to getgrouplist() in the
previous commit with same title (referenced also below).

MFC after:      1 hour
Fixes:          e6c623c86ab4 ("Add support for the "-manage-gids" option to the nfsuserd daemon.")
Fixes:          bb339adfb2a2 ("nfsuserd: Fix OOB access on membership of too many groups")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 75eb6846269bb9bec1eaf4f0ad93d7525715b550)
DeltaFile
+1-0usr.sbin/nfsuserd/nfsuserd.c
+1-01 files

FreeBSD/src baf1210lib/libc/gen initgroups.3

initgroups.3: Clarify that ENOMEM is a possible value for 'errno'

The current phrasing could be interpreted as meaning that initgroups(3)
could return ENOMEM instead of -1, which it actually did until I fixed
it in commit 0b018cfd81d8 ("initgroups(3): Fix return value on
allocation failure").

While here, mention setgroups(2) as a system call rather than a library
function.

MFC with:       0b018cfd81d8 ("initgroups(3): Fix return value on allocation failure")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c36a44e1cdab1c67a98132676818f473cc4e5c03)
DeltaFile
+4-4lib/libc/gen/initgroups.3
+4-41 files

FreeBSD/src ef40e02usr.sbin/nfsuserd nfsuserd.c

nfsuserd: Fix OOB access on membership of too many groups

getgrouplist() sets the variable containing the allocated length in
input to the full effective group list length, not the number of slots
that were actually filled in case the passed array is too small to
contain it.

While here, on this condition, improve the error message by outputting
the corresponding user name.

MFC after:      1 hour
Fixes:          e6c623c86ab4 ("Add support for the "-manage-gids" option to the nfsuserd daemon.")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit bb339adfb2a26c5bb71cd4275dff80f615534ab6)
DeltaFile
+11-4usr.sbin/nfsuserd/nfsuserd.c
+11-41 files

FreeBSD/src 23494c4lib/libc/gen getgrouplist.3

getgrouplist.3: Insist on the value returned in 'ngroups'; Minor changes

Emphasize the peculiar treatment of 'ngroups', through which the
effective group list's size is returned, even if the passed allocated
size is not big enough, in which case the output 'groups' array is
completely filled with the effective group list's first elements.

Use the precise POSIX term for the group associated to the user in the
password database ("initial numerical group ID"), consistently with what
was done in initgroups.3.

Use "length" instead of "size" to refer to the number of elements of an
array (in contrast with its actual size in bytes).

Perform some minor simplifications on top of the last rework.

MFC after:      1 hour
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit f5544556754ec6b33c1d13c7648a354fef645b2f)
DeltaFile
+20-13lib/libc/gen/getgrouplist.3
+20-131 files

FreeBSD/src e474fdfusr.sbin/acpi/acpidump acpi.c

acpidump: quiet gcc -Wstrict-aliasing

Appease GCC.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D52941
DeltaFile
+6-3usr.sbin/acpi/acpidump/acpi.c
+6-31 files

FreeBSD/src 1435a9busr.sbin/ctld nvmf.cc nvmf.hh

ctld: Defer initialization of NVMeoF associations

Wait until all of the configuration has been parsed before creating
associations for NVMe portals.  This ensures that any options
specified in a transport group are honored when creating associations.

To enable this, add a new virtual method portal::prepare invoked when
applying a configuration prior to opening a socket (or reusing an
existing socket) for a portal.

Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D52844
DeltaFile
+34-43usr.sbin/ctld/nvmf.cc
+6-10usr.sbin/ctld/nvmf.hh
+5-0usr.sbin/ctld/ctld.cc
+1-0usr.sbin/ctld/ctld.hh
+46-534 files

FreeBSD/src 746eadeusr.bin/sockstat main.c sockstat.1

sockstat: show path state column only when useful

Showing the path state column is only useful, if there is at least one
SCTP endpoint shown, which is not in the state CLOSED or LISTEN.
Don't show it when it is not useful.

Reviewed by:            rrs
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52986
DeltaFile
+6-2usr.bin/sockstat/main.c
+2-1usr.bin/sockstat/sockstat.1
+8-32 files

FreeBSD/src 98b2a22usr.bin/sockstat main.c

sockstat: improve output formatting

Fix the format when the output for a socket spans multiple lines.

Reviewed by:            rrs
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D52984
DeltaFile
+15-3usr.bin/sockstat/main.c
+15-31 files

FreeBSD/src e9f7c3dcontrib/sendmail/src newaliases.1

Merge commit '1fdae2e33fdc751bc2ec74c81fcde14323e4e965'

Be explicit that newaliases for sendmail
(Upstream sendmail.org commit 3084151d898)

PR:     289259
MFC after:      1 hour
DeltaFile
+1-1contrib/sendmail/src/newaliases.1
+1-11 files

FreeBSD/src 349da4dlib/libcasper/services/cap_fileargs cap_fileargs.h

libcasper: explicit cast in cap_fileargs header

The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
Reviewed by: emaste, vexeduxr
Pull request: https://github.com/freebsd/freebsd-src/pull/1857
DeltaFile
+1-1lib/libcasper/services/cap_fileargs/cap_fileargs.h
+1-11 files

FreeBSD/src 1fdae2esrc newaliases.1

Be explicit that newaliases for sendmail
(Upstream sendmail.org commit 3084151d898)
PR:             289259
Differential Revision:  https://reviews.freebsd.org/D52384
DeltaFile
+1-1src/newaliases.1
+1-11 files

FreeBSD/src 049010bsys/x86/x86 mca.c

x86: Defer non-fatal MCA message output from the HW interrupt context

When processing recoverable MCA events in a hardware interrupt context,
defer logging the messages to a task queue.

Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D12275

(cherry picked from commit 5e1611a37a02076180ccea1506713b8c9628779e)
DeltaFile
+34-7sys/x86/x86/mca.c
+34-71 files

FreeBSD/src 8b6bbdbsys/x86/x86 mca.c

x86: Close race condition on MCA task queues at startup

Currently, the CMCI handler checks the cold variable to determine
whether it can schedule a task. The task queue is setup as part of the
mca_startup() function, which is run well after the configure_final()
function sets the cold variable to 0. Therefore, if an MCA arrives
in the window between configure_final() and mca_startup() running,
the code could try to schedule a task on an unintitalized task queue.

Close the race by specifically checking whether the mca_startup()
function has run.

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

(cherry picked from commit 4a5d8670a7d58b04913fd90aae85a1e35236ca3d)
DeltaFile
+4-2sys/x86/x86/mca.c
+4-21 files

FreeBSD/src 1b00e2asys/x86/include mca.h, sys/x86/x86 mca.c

x86: Keep cumulative MCA statistics in the kernel

Keeping cumulative MCA statistics in the kernel provides a way for
users to get an accurate count of various kinds of errors reported
by the CPU.

After ca8929d2a3e9b9df31d2e487377f99d7c39aa01d, it is possible that
the kernel will drop the record of some MCA interrupts. Moreover, this
provides a cheaper interface to obtain statistics if that is the only
reason a user is processing MCA logs.

Reviewed by:    markj
Sponsored by:   Netflix
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52709

(cherry picked from commit 5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61)
DeltaFile
+40-3sys/x86/x86/mca.c
+25-0sys/x86/include/mca.h
+65-32 files

FreeBSD/src 3f0df55sys/x86/x86 mca.c

x86: Defer non-fatal MCA message output from the HW interrupt context

When processing recoverable MCA events in a hardware interrupt context,
defer logging the messages to a task queue.

Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D12275

(cherry picked from commit 5e1611a37a02076180ccea1506713b8c9628779e)
DeltaFile
+34-7sys/x86/x86/mca.c
+34-71 files

FreeBSD/src 8d0f269sys/x86/x86 mca.c

x86: Close race condition on MCA task queues at startup

Currently, the CMCI handler checks the cold variable to determine
whether it can schedule a task. The task queue is setup as part of the
mca_startup() function, which is run well after the configure_final()
function sets the cold variable to 0. Therefore, if an MCA arrives
in the window between configure_final() and mca_startup() running,
the code could try to schedule a task on an unintitalized task queue.

Close the race by specifically checking whether the mca_startup()
function has run.

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

(cherry picked from commit 4a5d8670a7d58b04913fd90aae85a1e35236ca3d)
DeltaFile
+4-2sys/x86/x86/mca.c
+4-21 files

FreeBSD/src be85c5dsys/x86/include mca.h, sys/x86/x86 mca.c

x86: Keep cumulative MCA statistics in the kernel

Keeping cumulative MCA statistics in the kernel provides a way for
users to get an accurate count of various kinds of errors reported
by the CPU.

After ca8929d2a3e9b9df31d2e487377f99d7c39aa01d, it is possible that
the kernel will drop the record of some MCA interrupts. Moreover, this
provides a cheaper interface to obtain statistics if that is the only
reason a user is processing MCA logs.

Reviewed by:    markj
Sponsored by:   Netflix
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52709

(cherry picked from commit 5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61)
DeltaFile
+40-3sys/x86/x86/mca.c
+25-0sys/x86/include/mca.h
+65-32 files

FreeBSD/src 75eb684usr.sbin/nfsuserd nfsuserd.c

nfsuserd: Fix OOB access on membership of too many groups, take 2

Forgot to reset 'ngroup' after one of the calls to getgrouplist() in the
previous commit with same title (referenced also below).

MFC after:      1 hour
Fixes:          e6c623c86ab4 ("Add support for the "-manage-gids" option to the nfsuserd daemon.")
Fixes:          bb339adfb2a2 ("nfsuserd: Fix OOB access on membership of too many groups")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0usr.sbin/nfsuserd/nfsuserd.c
+1-01 files

FreeBSD/src ddd5ff0sys/arm64/include armreg.h

arm64: Add Debug OS Lock fields

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52930

(cherry picked from commit fa975e2a5bb221e2e15305c4c54162f7b9ec062a)
DeltaFile
+5-0sys/arm64/include/armreg.h
+5-01 files

FreeBSD/src f579cc4sys/arm64/vmm vmm_reset.c

arm64/vmm: Add missing debug traps

These are features we don't support or advertise to the guest so can
safely be trapped.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D52806

(cherry picked from commit c67ea2707d2b5e6deb5986710f520ff69e4f78a3)
DeltaFile
+2-1sys/arm64/vmm/vmm_reset.c
+2-11 files