FreeBSD/src e8a3352stand/efi/loader efi_main.c

loader.efi: Fix a comment

Move a comment further up in the file. After the sethead() we need to
use efi_exit(), not after the performance measuring stuff.

Sponsored by:           Netflix
DeltaFile
+2-2stand/efi/loader/efi_main.c
+2-21 files

FreeBSD/src e985c62sys/contrib/edk2/Include/IndustryStandard Acpi61.h, sys/contrib/edk2/Include/Protocol AcpiSystemDescriptionTable.h AcpiTable.h

edk2: Bring in some more files from edk2-stable202502

These are needed for memdisk support, so import them separately.
These are from 202502, like all the other files here.

Sponsored by:           Netflix
DeltaFile
+2,442-0sys/contrib/edk2/Include/IndustryStandard/Acpi61.h
+263-0sys/contrib/edk2/Include/Protocol/AcpiSystemDescriptionTable.h
+121-0sys/contrib/edk2/Include/Protocol/AcpiTable.h
+100-0sys/contrib/edk2/Include/Protocol/RamDisk.h
+2,926-04 files

FreeBSD/src 7f5539dtools/qemu gen_sockopt.sh README.md

qemu: Add tools to generate useful tables from FreeBSD sources

This generates a table of all the socket options with fixed types
so that programs like qemu can use those tables rather than having
to free code thigs.

Sponsored by:           Netflix
DeltaFile
+108-0tools/qemu/gen_sockopt.sh
+6-0tools/qemu/README.md
+114-02 files

FreeBSD/src 198637ausr.bin/vgrind vfontedpr.c regexp.c

vgrind: Tear down vgrind support

vgrind has been disconnected from the build for a while.  Remove from
the build, and gc vgrid support in the few remaining places.

Reviewed by:            jhb
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57648
DeltaFile
+0-704usr.bin/vgrind/vfontedpr.c
+0-584usr.bin/vgrind/regexp.c
+0-239usr.bin/vgrind/vgrind.1
+0-167usr.bin/vgrind/vgrindefs.5
+0-153usr.bin/vgrind/vgrindefs.src
+0-128usr.bin/vgrind/vgrind.sh
+0-1,97515 files not shown
+5-2,21021 files

FreeBSD/src c7b1b95sys/contrib/edk2/Include/Guid ImageAuthentication.h, sys/contrib/edk2/Include/IndustryStandard Tpm12.h Tpm20.h

edk2: Fixup imported files line endings

Since these files were a direct commit, I don't have to fix the vendor
branch. Remove the DOS line endings. It doesn't matter one way or another,
but we should be consistent within the tree.

Sponsored by:           Netflix
DeltaFile
+2,165-2,165sys/contrib/edk2/Include/IndustryStandard/Tpm12.h
+1,813-1,813sys/contrib/edk2/Include/IndustryStandard/Tpm20.h
+1,220-1,220sys/contrib/edk2/Include/Pi/PiStatusCode.h
+722-722sys/contrib/edk2/Include/IndustryStandard/UefiTcgPlatform.h
+512-512sys/contrib/edk2/Include/Pi/PiHob.h
+385-385sys/contrib/edk2/Include/Guid/ImageAuthentication.h
+6,817-6,8179 files not shown
+7,921-7,92115 files

FreeBSD/src 2e6b22asys/netpfil/ipfw/nat64 nat64clat.c nat64stl.c

ipfw/nat64: Fix type confusion panic when using wrong NAT64 instance type

Add etlv type validation to ipfw_nat64clat() and ipfw_nat64stl() to
verify that the retrieved instance is actually a nat64clat instance
before use.

All NAT64 instance types share the same srvstate[] array but have
different struct layouts.
Without type validation, using the wrong instance type with
a handler causes type confusion and kernel panic.

Signed-off-by:  Teddy Engel <engel.teddy at gmail.com>
PR:             292023
Reviewed by:    pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2259
DeltaFile
+2-1sys/netpfil/ipfw/nat64/nat64clat.c
+2-1sys/netpfil/ipfw/nat64/nat64stl.c
+4-22 files

FreeBSD/src 635ad6flib/librpcsec_gss svc_rpcsec_gss.c

librpcsec_gss: Fix an off-by-one in rpc_gss_get_principal_name()

Include an extra byte for the nul-terminator, otherwise we may end up
with an out-of-bounds write.

The corresponding bug in the kernel implementation was fixed by commit
e3081f7e3e2d ("kgssapi(4): Fix string overrun in Kerberos principal construction").

Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57738
DeltaFile
+1-1lib/librpcsec_gss/svc_rpcsec_gss.c
+1-11 files

FreeBSD/src 95ff2acsys/dev/acpica acpi.c

acpi: Set 'acpi_sstate' closer to setting 'acpi_stype'

Makes on-going modifications for hibernate easier.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+4-6sys/dev/acpica/acpi.c
+4-61 files

FreeBSD/src 5ca875fsys/dev/acpica acpi.c acpi_lid.c

acpi: Export handler invoke helpers, use them in acpi_lid

Removes duplicated code.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+2-2sys/dev/acpica/acpi.c
+2-2sys/dev/acpica/acpi_lid.c
+3-0sys/dev/acpica/acpivar.h
+7-43 files

FreeBSD/src 660a491sys/dev/acpica acpi.c acpivar.h

acpi: Button sleep/wake callbacks: Expose true argument types

This makes the interface composed of the
acpi_event_{power,sleep}_button_{sleep,wake}() functions more accurate
and clears the risk of calling them with a wrong object (such as a wrong
softc).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+19-29sys/dev/acpica/acpi.c
+4-4sys/dev/acpica/acpivar.h
+23-332 files

FreeBSD/src 6cce86csys/dev/acpica acpi.c

acpi: Sleep/wake event handlers: Expose first argument's true type

This is for clarification and to slightly simplify code.

At present, the EVENTHANDLER(9) subsystem does not check that the first
argument to the event handler, registered via EVENTHANDLER_REGISTER(),
is of the right type with respect to the type declaration passed to
EVENTHANDLER_DECLARE(), so in that infrastructure no additional safety
is gained by this change.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+8-9sys/dev/acpica/acpi.c
+8-91 files

FreeBSD/src c08c52esys/dev/acpica acpi.c

acpi: Sleep event handler: Remove a wrong comment

No functional change.

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+1-2sys/dev/acpica/acpi.c
+1-21 files

FreeBSD/src 3b3911asys/dev/acpica acpi.c

acpi: Suffix acpi_sleep_enable() with '_locked'

For clarification.  This function assumes that the acpi mutex is held,
contrary to acpi_sleep_disable().

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+3-3sys/dev/acpica/acpi.c
+3-31 files

FreeBSD/src f7eff12sys/dev/acpica acpi.c, sys/sys power.h

power: Make POWER_STYPE_COUNT equal to POWER_STYPE_UNKNOWN

This avoids having to list POWER_STYPE_COUNT, which is semantically not
an allowed value, in 'switch' statements along with POWER_STYPE_UNKNOWN.

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+0-2sys/dev/acpica/acpi.c
+1-1sys/sys/power.h
+1-32 files

FreeBSD/src a12d069sys/dev/acpica acpi.c acpi_if.m

acpi: Constify thanks to AcpiGetHandle() taking a constant pathname

Make the ACPI interface's functions evaluate_object() and get_property()
take a constant pathname (by substituting ACPI_STRING with 'const char
*').

This allows to remove some __DECONST().

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8
DeltaFile
+9-15sys/dev/acpica/acpi.c
+4-4sys/dev/acpica/acpi_if.m
+3-3sys/dev/acpica/acpivar.h
+16-223 files

FreeBSD/src 4fd518fbin/kenv kenv.1, lib/libsys kenv.2

kern: add a security knob to disable unprivileged access to kenv

We sometimes store sensitive things in the kenv that get zapped, but we
really shouldn't rely on that zapping to actually happen.  Most
unprivileged processes don't really need to read from the kernel
environment in the first place, so add a knob that allows it to be
disabled.

Note that we consider jailed root to be unprivileged from this
perspective; they have their own meta/env concepts and we should
encourage users to take advantage of those for passing information to
jails.

"Hey we should do something about that":        dch
Reviewed by:    imp, ziaee, zlei (all slightly previous version)
Differential Revision:  https://reviews.freebsd.org/D57697
DeltaFile
+40-6sys/kern/kern_environment.c
+9-1bin/kenv/kenv.1
+6-1lib/libsys/kenv.2
+3-1share/man/man7/security.7
+1-0sys/sys/priv.h
+59-95 files

FreeBSD/src 88deb1cusr.sbin/makefs/zfs dsl.c

makefs/zfs: Explicitly include sys/param.h for nitems()

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0usr.sbin/makefs/zfs/dsl.c
+1-01 files

FreeBSD/src ca89b0fusr.bin/xinstall xinstall.c

install: Explicitly include sys/param.h for MAXPATHLEN

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0usr.bin/xinstall/xinstall.c
+1-01 files

FreeBSD/src 5bec087sys/dev/acpica acpi_spmc.c, sys/dev/amdsmu amdsmu.c

amdsmu(4), acpi_spmc(4): Fix ordering of calls

The AMD SMU is supposed to be notified of suspension the SPMC has been,
and conversely on resume, as expressed in comments.

Fix the EVENTHANDLER(9) priorities used so that they match the
comments. Lower values indeed indicate higher priority in this
subsystem.

Reviewed by:    obiwac
Fixes:          2c60fce365f4 ("amdsmu: Sleep entry/exit hints for PMFW")
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-2sys/dev/amdsmu/amdsmu.c
+2-2sys/dev/acpica/acpi_spmc.c
+4-42 files

FreeBSD/src df8ca3flib/libsys kqueue.2

kqueue.2: knote is activated as the first action of tdsendsignal()

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-1lib/libsys/kqueue.2
+1-11 files

FreeBSD/src 1ca439ausr.sbin/etcupdate etcupdate.8

etcupdate: Recommend building when bootstrapping

Since building is no longer the default, add -b to the bootstrapping
examples as they are likely to be run with a tree that hasn't been
built.

MFC after:      1 week
Fixes:          ddf6fad0295a ("etcupdate: Make nobuild the default")
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D57643
DeltaFile
+3-3usr.sbin/etcupdate/etcupdate.8
+3-31 files

FreeBSD/src 53a3d47usr.sbin/etcupdate etcupdate.sh

etcupdate: Warn if the tree hasn't been built

Warn the user before trying `make installetc` if etcupdate was invoked
without -b (or with -B) and it appears that `make buildetc` hasn't
already been run (which usually happens as part of `make buildworld`).

MFC after:      1 week
Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D57504
DeltaFile
+14-1usr.sbin/etcupdate/etcupdate.sh
+14-11 files

FreeBSD/src e4c4c6esys/ofed/drivers/infiniband/core ib_umem.c, sys/ofed/include/rdma ib_verbs.h

RDMA: dma-mapping: use unsigned long for dma_attrs

Tested by:      Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 00085f1efa387a8ce100e3734920f7639c80caa3
Sponsored by:   Chelsio Communications
DeltaFile
+10-10sys/ofed/include/rdma/ib_verbs.h
+3-3sys/ofed/drivers/infiniband/core/ib_umem.c
+13-132 files

FreeBSD/src 49ee94bsys/ofed/drivers/infiniband/ulp/ipoib ipoib_ib.c ipoib_multicast.c

IB/ipoib: Prevent hung task or softlockup processing multicast response

Tested by:      Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 3874397c0bdec3c21ce071711cd105165179b8eb
Sponsored by:   Chelsio Communications
DeltaFile
+8-5sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+5-2sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+1-1sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
+14-83 files

FreeBSD/src 259a763sys/ofed/drivers/infiniband/core ib_cq.c, sys/ofed/include/rdma ib_verbs.h

OFED: Implement ib_process_cq_direct

This is largely pulled from the original Linux commit to add cq.c.
Note that irq_poll is still not supported, but polling should now be
possible whereas it wasn't really before.

Tested by:      Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from:  Linux commit 14d3a3b2498edadec344cb11e60e66091f5daf63
Sponsored by:   Chelsio Communications
DeltaFile
+68-30sys/ofed/drivers/infiniband/core/ib_cq.c
+3-0sys/ofed/include/rdma/ib_verbs.h
+71-302 files

FreeBSD/src fbe76easys/ofed/drivers/infiniband/ulp/ipoib ipoib_cm.c ipoib_main.c

OFED: Use vmalloc() and vzalloc() in various places

This contains changes from the following Linux commits:

10313cbb9220 IPoIB: Allocate priv->tx_ring with vmalloc()
b1404069f644 IPoIB/cm: Use vmalloc() to allocate rx_rings
948579cd8c6e RDMA: Use vzalloc() to replace vmalloc()+memset(0)

Tested by:      Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
DeltaFile
+7-10sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+3-4sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
+10-142 files

FreeBSD/src 1a9ef1asys/ofed/drivers/infiniband/core ib_cma.c

OFED: Use prandom_u32() to reduce diff with upstream

Tested by:      Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by:      John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by:   Chelsio Communications
DeltaFile
+1-3sys/ofed/drivers/infiniband/core/ib_cma.c
+1-31 files

FreeBSD/src 45a0cb5libexec/rtld-elf rtld.c

rtld: Check for -1 as an-end-of-section marker

rtld calls functions in the .init_array section one at a time, until
it finds a distinguished sentinel value. The C runtime does the same
thing (in crtend.c). However, that checks for the sentinel -1 and not
1. If one is using a linker that unifies .ctors and .init_array, then
rtld will miss the sentinel value. I believe the author of this code
intended to write -1 instead of 1. Indeed, changing the code to also
check for -1 prevents rtld from attempting to call a non-existent
function. The same is true of .dtors and .fini_array.

Signed-off-by:  Daniel Levin <daniellevin2607 at gmail.com>
Reviewed by:    kib
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2270
DeltaFile
+4-2libexec/rtld-elf/rtld.c
+4-21 files

FreeBSD/src 9cd0d62sys/fs/cd9660 cd9660_rrip.c iso_rrip.h

cd9660: Add various length checks when parsing RRIP extensions

Pass the length of a RockRidge attribute to the handler functions and
validate that length in each handler.  If a parsing error is detected,
abort the entire parsing pass.

Reviewed by:    des
Differential Revision:  https://reviews.freebsd.org/D57136
DeltaFile
+135-51sys/fs/cd9660/cd9660_rrip.c
+1-0sys/fs/cd9660/iso_rrip.h
+136-512 files

FreeBSD/src 17c391csys/conf kern.post.mk, sys/i386/i386 genassym.c

i386: Fix build (of 'genassym.o')

(cherry picked from commit ce243df20aa8ba94918cafdca2537c8cd18887c8)
DeltaFile
+4-1sys/conf/kern.post.mk
+1-0sys/i386/i386/genassym.c
+5-12 files