FreeBSD/src 85e63d9sys/fs/nfs nfs_var.h, sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdserv.c

nfsd: Fix Link conformance with RFC8881 for delegations

RFC8881 specifies that, when a Link operation occurs on an
NFSv4, that file delegations issued to other clients must
be recalled.  Discovered during a recent discussion on nfsv4 at ietf.org.

Although I have not observed a problem caused by not doing
the required delegation recall, it is definitely required
by the RFC, so this patch makes the server do the recall.

Tested during a recent NFSv4 IETF Bakeathon event.

(cherry picked from commit 3f65000b6b1460a7a23cd83014bb41a68d1a8a19)
DeltaFile
+7-5sys/fs/nfsserver/nfs_nfsdport.c
+9-2sys/fs/nfsserver/nfs_nfsdserv.c
+1-1sys/fs/nfs/nfs_var.h
+17-83 files

FreeBSD/src 3c414a8sys/fs/nfs nfs_var.h, sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdserv.c

nfsd: Fix Link conformance with RFC8881 for delegations

RFC8881 specifies that, when a Link operation occurs on an
NFSv4, that file delegations issued to other clients must
be recalled.  Discovered during a recent discussion on nfsv4 at ietf.org.

Although I have not observed a problem caused by not doing
the required delegation recall, it is definitely required
by the RFC, so this patch makes the server do the recall.

Tested during a recent NFSv4 IETF Bakeathon event.

(cherry picked from commit 3f65000b6b1460a7a23cd83014bb41a68d1a8a19)
DeltaFile
+7-5sys/fs/nfsserver/nfs_nfsdport.c
+9-2sys/fs/nfsserver/nfs_nfsdserv.c
+1-1sys/fs/nfs/nfs_var.h
+17-83 files

FreeBSD/src a2409f1sys/kern kern_intr.c

intr: Document how to get the interrupt frame

Document that the only way to get the interrupt thread is to use
curthread->td_intr_frame, rather than the old-style of having a NULL
pointer for the interrupt thread. As of 38c35248fe3b, support for that
has been removed. I neglected to update that commit message with these
details.

Suggested by: mhorne
DeltaFile
+4-1sys/kern/kern_intr.c
+4-11 files

FreeBSD/src 38c3524sys/kern kern_intr.c

kern/intr: remove support for passing trap frame as argument

While otherwise a handy potential approach, getting the trap frame via
the argument isn't documented and isn't supposed to be used.  With all
uses removed, now remove support to end the mixed calling conventions.

Differential Revision: https://reviews.freebsd.org/D37688

Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/1225
DeltaFile
+4-11sys/kern/kern_intr.c
+4-111 files

FreeBSD/src 335c7cdcontrib/unbound configure~ configure, contrib/unbound/doc unbound.doxygen

unbound: Vendor import 1.20.0

Release notes at
        https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:       The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main
DeltaFile
+26,616-0contrib/unbound/configure~
+7,476-5,132contrib/unbound/configure
+3,827-3,706contrib/unbound/util/configlexer.c
+2,339-2,199contrib/unbound/util/configparser.c
+2,007-886contrib/unbound/doc/unbound.doxygen
+859-0contrib/unbound/testdata/val_dnameqtype_qmin.rpl
+43,124-11,923102 files not shown
+52,634-13,120108 files

FreeBSD/src 4d09eb8libexec/tftpd tftpd.c tftp-io.c

tftpd: Satisfy clang-analyzer.

* Replace `random()` with `arc4random()`.
* Change some variable types.
* Drop some unused assignments.

MFC after:      3 days
Sponsored by:   Klara, Inc.
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D45132
DeltaFile
+6-7libexec/tftpd/tftpd.c
+4-7libexec/tftpd/tftp-io.c
+1-1libexec/tftpd/tftp-utils.c
+1-1libexec/tftpd/tftp-utils.h
+12-164 files

FreeBSD/src 816c4d3libexec/tftpd tftpd.8

tftpd: Add missing `-S` option to synopsis.

MFC after:      3 days
Sponsored by:   Klara, Inc.
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D45129
DeltaFile
+3-3libexec/tftpd/tftpd.8
+3-31 files

FreeBSD/src 1111da6libexec/tftpd tftp-utils.h tftp-io.h

tftpd: Drop unneeded includes.

MFC after:      3 days
Sponsored by:   Klara, Inc.
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D45130
DeltaFile
+0-1libexec/tftpd/tftp-utils.h
+0-1libexec/tftpd/tftp-io.h
+0-1libexec/tftpd/tftp-file.h
+0-1libexec/tftpd/tftp-options.h
+0-1libexec/tftpd/tftp-transfer.h
+0-55 files

FreeBSD/src 25945aflibexec/tftpd tftpd.c

tftpd: silence gcc overflow warnings

GCC 13 complains that we might be writing too much to an on-stack buffer
when createing a filename.

In practice there is a check that filename isn't too long given the
time format and other static characters so GCC is incorrect, but GCC
isn't wrong that we're potentially trying to put a MAXPATHLEN length
string + some other characters into a MAXPATHLEN buffer (if you ignore
the check GCC can't realistically evaluate at compile time).

Switch to snprintf to populate filename to ensure that future logic
errors don't result in a stack overflow.

Shorten the questionably named yyyymmdd buffer enough to slience the
warning (checking the snprintf return value isn't sufficent) while
preserving maximum flexibility for admins who use the -F option.

MFC after:      3 days

    [3 lines not shown]
DeltaFile
+30-15libexec/tftpd/tftpd.c
+30-151 files

FreeBSD/src ae285a8libexec/tftpd/tests functional.c

tftpd: Add missing include.

This went unnoticed due to namespace pollution in our headers.

MFC after:      3 days
Sponsored by:   Klara, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D45131
DeltaFile
+1-0libexec/tftpd/tests/functional.c
+1-01 files

FreeBSD/src 467e3e2. CONTRIBUTING.md

CONTRIBUTING.md/style: spring cleaning

+ move Lua to alphabetize subsections
+ word manpages like other subsections
+ man PR's shouldn't bump document date

MFC after: (maybe MFC to BETA3 along w/ e7ff917057ea ?)
DeltaFile
+9-7CONTRIBUTING.md
+9-71 files

FreeBSD/src a7cc56bsys/compat/linux linux_misc.c

linux: Adjust rlimit SIGPENDING & MSGQUEUE behaviour to match linprocfs

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1227
DeltaFile
+23-6sys/compat/linux/linux_misc.c
+23-61 files

FreeBSD/src c2a8005. configure~ configure, doc unbound.doxygen

unbound: Vendor import 1.20.0

Release notes at
        https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:       The DNSBomb vulnerability CVE-2024-33655
DeltaFile
+26,616-0configure~
+7,476-5,132configure
+3,827-3,706util/configlexer.c
+2,339-2,199util/configparser.c
+2,007-886doc/unbound.doxygen
+859-0testdata/val_dnameqtype_qmin.rpl
+43,124-11,923123 files not shown
+53,243-13,135129 files

FreeBSD/src 9e01640sys/vm vm_glue.c vm_extern.h

vm: Change the return types of kernacc and useracc to bool

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D45156
DeltaFile
+4-4sys/vm/vm_glue.c
+2-2sys/vm/vm_extern.h
+6-62 files

FreeBSD/src 473c90asys/arm/arm uio_machdep.c, sys/arm64/arm64 uio_machdep.c

uio: Use switch statements when handling UIO_READ vs UIO_WRITE

This is mostly to reduce the diff with CheriBSD which adds additional
constants to enum uio_rw, but also matches the normal style used for
uio_segflg.

Reviewed by:    kib, emaste
Obtained from:  CheriBSD
Differential Revision:  https://reviews.freebsd.org/D45142
DeltaFile
+20-11sys/compat/lindebugfs/lindebugfs.c
+12-4sys/arm/arm/uio_machdep.c
+12-4sys/arm64/arm64/uio_machdep.c
+11-5sys/dev/iicbus/iic.c
+12-4sys/powerpc/powerpc/uio_machdep.c
+12-4sys/riscv/riscv/uio_machdep.c
+79-3210 files not shown
+173-6016 files

FreeBSD/src f75764fsys/dev/md md.c

md: Merge two switch statements in mdstart_vnode

While here, use bp->bio_cmd instead of auio.uio_rw to drive read vs
write behavior.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D45155
DeltaFile
+20-24sys/dev/md/md.c
+20-241 files

FreeBSD/src 88cbbbbusr.bin/grdc grdc.c grdc.6

Revert "grdc: Add copyright"

It turns out this wasn't in 4.4BSD. I had a false positive for gdc.c
(which is in 4.4BSD, but part of gated, not this). gdc.c comes from the
ncurses tests, so it shouldn't have this copyright. This version is
mostly Amos Shapir and John Lupien's code. It comes from ncurses test
directory. ncurses has made dozens of improvements to this file since
we imported it in 1997 (which pre-dates their online history), so it's
not clear if their new copyright applies (which doesn't mention Amos
or John) or if some other copyright applies. In any case, it wasn't
4.4BSD, so revert this.

This reverts commit 6ed7d0e3ac9c34fa9deeb73f2322b9f25b708788.

Sponsored by:           Netflix
DeltaFile
+0-7usr.bin/grdc/grdc.c
+0-5usr.bin/grdc/grdc.6
+0-122 files

FreeBSD/src 4e32868sys/x86/include apicvar.h

Increase IOAPIC_MAX_ID to 255 (from 254)

A test system provided by AMD panicked with "madt_parse_apics:
I/O APIC ID 255 too high".  I/O APIC ID 255 is acceptable, so increase
the limit.

Reviewed by:    jhb, kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45157
DeltaFile
+6-1sys/x86/include/apicvar.h
+6-11 files

FreeBSD/src 0b272e0sys/x86/acpica madt.c

madt: print CPU APIC ID as signed int

Instead of printing something like "MADT: Found CPU APIC ID 4294967295
ACPI ID 512: disabled" print the APIC ID as a singed int for a more
user-friendly -1.

Reviewed by:    jhb
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45158
DeltaFile
+2-2sys/x86/acpica/madt.c
+2-21 files

FreeBSD/src dd4d206sys/conf kmod.mk

kmod.mk use ${XARGS}

Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D45146
DeltaFile
+4-2sys/conf/kmod.mk
+4-21 files

FreeBSD/src 5120ea0sys/netinet sctputil.c

sctp: improve heartbeat timer computation
PR:             278666
Reviewed by:    Albin Hellqvist
MFC after:      3 days
Pull Request:   https://reviews.freebsd.org/D45107
DeltaFile
+10-10sys/netinet/sctputil.c
+10-101 files

FreeBSD/src b67716dsys/netinet sctp_header.h sctp_output.c

sctp: store heartbeat creation time as time_t
Reported by:    Coverity Scan
CID:            1493087
MFC after:      3 days
DeltaFile
+1-1sys/netinet/sctp_header.h
+1-1sys/netinet/sctp_output.c
+2-22 files

FreeBSD/src de1ac94sys/conf files

conf: Generate fdt_static_dtb.h in OBJDIR

Though the kernel build expects ${.OBJDIR} to be equal to ${.CURDIR}
that may not always be the case.  Correctly generate fdt_static_dtb.h in
${.OBJDIR}, which is conceptually more correct anyway.

Obtained from:  Juniper Networks, Inc.
DeltaFile
+1-1sys/conf/files
+1-11 files

FreeBSD/src 10eea8dsys/dev/tpm tpm20.c tpm20.h

tpm20: Support partial reads

Summary:
In some cases the TPM utilities may read only a partial block, instead
of a full block.  If a new command starts while in the middle of a read
it may cause the TPM to go catatonic and no longer respond to SPI.

Reviewed by:    kd
Obtained from:  Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45140
DeltaFile
+7-3sys/dev/tpm/tpm20.c
+1-0sys/dev/tpm/tpm20.h
+1-0sys/dev/tpm/tpm_crb.c
+1-0sys/dev/tpm/tpm_tis_core.c
+10-34 files

FreeBSD/src 42aeb8dsys/netinet sctp_pcb.c sctp_pcb.h

sctp: store vtag expire time as time_t
Reported by:    Coverity Scan
CID:            1492525
CID:            1493239
MFC after:      3 days
DeltaFile
+6-6sys/netinet/sctp_pcb.c
+1-1sys/netinet/sctp_pcb.h
+7-72 files

FreeBSD/src 9d8a371sys/netinet sctp_input.c sctp_pcb.h

sctp: store cookie secret change time as time_t
Reported by:    Coverity Scan
CID:            1492349
CID:            1493281
MFC after:      3 days
DeltaFile
+2-2sys/netinet/sctp_input.c
+2-2sys/netinet/sctp_pcb.h
+1-1sys/netinet/sctp_pcb.c
+1-1sys/netinet/sctputil.c
+6-64 files

FreeBSD/src ff99bfesys/netinet6 in6.c

inet6: protect address manipulation with a lock

This is a total hack/bare minimum which follows inet4.

Otherwise 2 threads removing the same address can easily crash.

Reviewed by:    kp
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D39317

(cherry picked from commit f5a365e51feea75d1e5ebc86c53808d8cae7b6d7)
DeltaFile
+9-0sys/netinet6/in6.c
+9-01 files

FreeBSD/src 1662e47sbin/nvmecontrol fabrics.c

nvmecontrol: Free the addrinfo list when failing to open a TCP socket

Reported by:    Coverity Scan
CID:            1545048
Sponsored by:   Chelsio Communications
DeltaFile
+1-0sbin/nvmecontrol/fabrics.c
+1-01 files

FreeBSD/src 50884a0sys/dev/nvmf nvmf_transport.c

nvmf_transport: Remove invalid assertion

This is leftover from an earlier iteration of the code where 'nt' was
not dynamically allocated but was the passed in 'ops' pointer so was
always alive.

Reported by:    Coverity Scan
CID:            1545042
Sponsored by:   Chelsio Communications
DeltaFile
+0-2sys/dev/nvmf/nvmf_transport.c
+0-21 files

FreeBSD/src 1f83483sys/cam/ctl ctl_backend_block.c

ctl_backend_block: Correct value of NVME nsdata nuse field

Reported by:    Coverity Scan
CID:            1545043
Sponsored by:   Chelsio Communications
DeltaFile
+1-1sys/cam/ctl/ctl_backend_block.c
+1-11 files