FreeBSD/src 6010b73usr.sbin/makefs msdos.c msdos.h

makefs: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.sbin/makefs/msdos.c
+2-0usr.sbin/makefs/msdos.h
+4-02 files

FreeBSD/src a31127esys/sys syscallsubr.h

sys/syscallsubr.h: assorted tidying

- gc unused struct kevent
- sort kern_frmdirat, kern_funlinkat, kern_kexec_load, and kern_kqueue
- put user_ functions in their own section

Effort:         CHERI upstreaming
Reviewed by:    kib
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D55309
DeltaFile
+15-15sys/sys/syscallsubr.h
+15-151 files

FreeBSD/src 1e18927.github/workflows cross-bootstrap-tools.yml

.github: support all stable branches

If this eventually poses a problem for unsupported branches we can fix
them directly.

Sponsored by:   Innovate UK

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D53838
DeltaFile
+1-1.github/workflows/cross-bootstrap-tools.yml
+1-11 files

FreeBSD/src 2adc3f0include stddef.h, sys/sys _offsetof.h stddef.h

stddef.h: centralize definition of offsetof()

Move to sys/_offsetof.h and use __builtin_offsetof() instead of
__offsetof to avoid reintroducing sys/cdefs.h polution in stddef.h.

This has the side effect of allowing sys/stddef.h to be included after
stddef.h which can happen in compatability headers.

Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL
Reviewed by:    imp, kib
Differential Revision:  https://reviews.freebsd.org/D55307
DeltaFile
+19-0sys/sys/_offsetof.h
+1-4include/stddef.h
+1-2sys/sys/stddef.h
+21-63 files

FreeBSD/src 89c3ae5tools/build stddef.h Makefile

build: add stddef.h to define ptraddr_t as required

Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Reviewed by:    kib
Co-authored-by: Alfredo Mazzinghi <am2419 at cl.cam.ac.uk>
Co-authored-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Differential Revision:  https://reviews.freebsd.org/D55308
DeltaFile
+49-0tools/build/stddef.h
+3-0tools/build/Makefile
+52-02 files

FreeBSD/src cb59eecinclude stddef.h

stddef.h: add ptraddr_t

I'd missed that stddef.h is standalone and isn't a copy of sys/stddef.h
in my initial merge.

Effort:         CHERI upstreaming
Reviewed by:    kib
Sponsored by:   Innovate UK
Fixes:          dca634d1544b ("new type: ptraddr_t")
Differential Revision:  https://reviews.freebsd.org/D55305
DeltaFile
+7-0include/stddef.h
+7-01 files

FreeBSD/src 6d5a428usr.sbin/virtual_oss/virtual_bt_speaker bt_speaker.c, usr.sbin/virtual_oss/virtual_equalizer equalizer.c

virtual_oss: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.sbin/virtual_oss/virtual_equalizer/equalizer.c
+2-0usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
+2-0usr.sbin/virtual_oss/virtual_oss/audio_delay.c
+2-0usr.sbin/virtual_oss/virtual_oss/backend.h
+2-0usr.sbin/virtual_oss/virtual_oss/compressor.c
+2-0usr.sbin/virtual_oss/virtual_oss/ctl.c
+12-010 files not shown
+32-016 files

FreeBSD/src d6bec77usr.sbin/yppush yppush_extern.h

yppush: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.sbin/yppush/yppush_extern.h
+2-01 files

FreeBSD/src ada4dc7sys/netinet6 icmp6.c

icmp6: clear csum_flags on mbuf reuse

When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
header. For a locally generated packet with checksum offloading, the
mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
has to be computed and inserted. Since this not the case anymore,
csum_flags need to be cleared.

PR:                     293227
Reviewed by:            kp, zlei, tuexen
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D55367
DeltaFile
+1-0sys/netinet6/icmp6.c
+1-01 files

FreeBSD/src ac8189eusr.sbin/ypserv/common yplib_host.c yplib_host.h

ypserv: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.sbin/ypserv/common/yplib_host.c
+2-0usr.sbin/ypserv/common/yplib_host.h
+4-02 files

FreeBSD/src 7e8284csys/dev/iommu iommu_gas.c

iommu_gas: Fix assertion.

placeholder entry end changed to 0 in f591287756368
("iommu_gas: make placeholder entry at the start of the GAS zero size")

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D55326
DeltaFile
+1-1sys/dev/iommu/iommu_gas.c
+1-11 files

FreeBSD/src 0e093f5tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add figpar to dialog section

MFC after:      3 days
Fixes:          15d781b53233 ("lib: Gate libfigpar under MK_DIALOG")
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D55330

(cherry picked from commit bc6c827078b7ab62271ce7ac1c4439b82fd2f98c)

OptionalObsoleteFiles: Add missing figpar MLINKS

MFC after:      3 days
Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")

(cherry picked from commit efcfba9b31ad11ec901085c38b79e40289b9e7bc)

OptionalObsoleteFiles: Add missing dpv MLINK

MFC after:      3 days

    [2 lines not shown]
DeltaFile
+14-1tools/build/mk/OptionalObsoleteFiles.inc
+14-11 files

FreeBSD/src 2c9398ctools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add figpar to dialog section

MFC after:      3 days
Fixes:          15d781b53233 ("lib: Gate libfigpar under MK_DIALOG")
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D55330

(cherry picked from commit bc6c827078b7ab62271ce7ac1c4439b82fd2f98c)

OptionalObsoleteFiles: Add missing figpar MLINKS

MFC after:      3 days
Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")

(cherry picked from commit efcfba9b31ad11ec901085c38b79e40289b9e7bc)

OptionalObsoleteFiles: Add missing dpv MLINK

MFC after:      3 days

    [2 lines not shown]
DeltaFile
+13-0tools/build/mk/OptionalObsoleteFiles.inc
+13-01 files

FreeBSD/src a160622tools/build/mk OptionalObsoleteFiles.inc

OptionalObsoleteFiles: Add figpar to dialog section

MFC after:      3 days
Fixes:          15d781b53233 ("lib: Gate libfigpar under MK_DIALOG")
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D55330

(cherry picked from commit bc6c827078b7ab62271ce7ac1c4439b82fd2f98c)

OptionalObsoleteFiles: Add missing figpar MLINKS

MFC after:      3 days
Fixes:          bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section")

(cherry picked from commit efcfba9b31ad11ec901085c38b79e40289b9e7bc)

OptionalObsoleteFiles: Add missing dpv MLINK

MFC after:      3 days

    [2 lines not shown]
DeltaFile
+12-0tools/build/mk/OptionalObsoleteFiles.inc
+12-01 files

FreeBSD/src 3522eac. ObsoleteFiles.inc, tools/build/mk OptionalObsoleteFiles.inc

ObsoleteFiles: Deduplicate

Since we dropped support for profile libraries, all optional entries for
them are now non-optional.  Most of them were already duplicated there,
a few were not.

MFC after:      3 days
Reviewed by:    jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D55329

(cherry picked from commit f9f4a022a8583763903771915eafcd064184766a)
DeltaFile
+0-41tools/build/mk/OptionalObsoleteFiles.inc
+3-0ObsoleteFiles.inc
+3-412 files

FreeBSD/src f12a0dcusr.bin/vtfontcvt vtfontcvt.c

vtfontcvt: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.bin/vtfontcvt/vtfontcvt.c
+2-01 files

FreeBSD/src c330768usr.bin/resizewin resizewin.c

resizewin: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.bin/resizewin/resizewin.c
+2-01 files

FreeBSD/src 2d1c5f4usr.bin/etdump etdump.c etdump.h

etdump: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.bin/etdump/etdump.c
+2-0usr.bin/etdump/etdump.h
+2-0usr.bin/etdump/output_shell.c
+2-0usr.bin/etdump/output_text.c
+8-04 files

FreeBSD/src 878cee8usr.bin/diff diff.h

diff: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.bin/diff/diff.h
+2-01 files

FreeBSD/src 971696busr.bin/mkimg vmdk.c vhdx.c

mkimg: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-0usr.bin/mkimg/vmdk.c
+2-0usr.bin/mkimg/vhdx.c
+2-0usr.bin/mkimg/vhd.c
+2-0usr.bin/mkimg/uuid.c
+2-0usr.bin/mkimg/scheme.h
+2-0usr.bin/mkimg/scheme.c
+12-014 files not shown
+40-020 files

FreeBSD/src 0db846asys/conf files.amd64 files.x86, sys/modules Makefile

asmc(4): Stop building it on i386, as it supports only 64-bit chipsets

Reported by:    ngie
Fixes:          fde9fe18219f ("i386: Fix kernel compilation after introduction of ASMC_DEBUG option")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 8342d9f7b5f13d0623861cb8b88caf10a15571f6)
DeltaFile
+1-1sys/modules/Makefile
+1-0sys/conf/files.amd64
+0-1sys/conf/files.x86
+2-23 files

FreeBSD/src 27b7641sys/kern kern_sysctl.c

sysctl(9): Booleans: Fix old value length discovery

When calling sysctl(3) with a null 'oldp', i.e., length discovery mode,
'oldix' can be equal to 'oldlen', and we should not fail.

More generally, let SYSCTL_OUT() and SYSCTL_IN() handle corner cases,
simply removing the comparisons between 'oldidx' and 'oldlen' and
'newidx' and 'newlen' done by hand as the test just after is an equality
that does not require to know if 'idx' is smaller than 'len'.

PR:             292917
Reported by:    cy
Fixes:          406da392ef8d ("sysctl(9): Booleans: Accept integers to ease knob conversion")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 895e1c6567d9561c86f8d20b47e924911bce989e)
DeltaFile
+0-4sys/kern/kern_sysctl.c
+0-41 files

FreeBSD/src 13f0aa2sys/kern kern_sysctl.c

sysctl(9): Booleans: Accept integers to ease knob conversion

In sysctl_handle_bool(), if the output buffer (for the old value) has
room for exactly 4 bytes (sizeof(int)), then output the current boolean
value as an integer rather than a 'uint8_t'.  Conversely, if 4 bytes
exactly remain in the input buffer (for the new value), treat them as an
integer and derive the new boolean value from it.

Doing so allows to convert existing integer syscstl knobs that are
interpreted as a boolean into true boolean ones while staying
backwards-compatible.

That brings no drawback as no code currently uses sysctl_handle_bool()
as part of a series of calls to sysctl_handle_*() functions for
(de)serialization of some compound structure.  If that case ever
materializes, it can be easily solved, e.g., by creating
a sysctl_handle_bool_strict() variant.

In the future, we might want to go further and generally be more liberal

    [12 lines not shown]
DeltaFile
+33-5sys/kern/kern_sysctl.c
+33-51 files

FreeBSD/src 9f48e72sys/x86/include x86_var.h, sys/x86/x86 cpu_machdep.c

x86: x86_msr_op(): MSR_OP_LOCAL: Disable interrupts on atomic ops

On MSR_OP_LOCAL and non-naturally-atomic operations (MSR_OP_ANDNOT and
MSR_OP_OR), there is no guarantee that we are not interrupted between
reading and writing the MSR, and that interruption could actually
perform some operation on that MSR, which would be lost.

Prevent that problem by temporarily disabling interrupts around MSR
manipulation.

Reviewed by:    kib
Discussed with: markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996

(cherry picked from commit e5f8cbb86d58f25b5ff168506b78d09dca266fb6)
DeltaFile
+3-0sys/x86/x86/cpu_machdep.c
+2-0sys/x86/include/x86_var.h
+5-02 files

FreeBSD/src 314aeeasys/x86/x86 cpu_machdep.c

x86: x86_msr_op(): Simplify assertions

Simplify them by moving them into more natural places, i.e., default
cases of 'switch' statements.

No functional change (intended).

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996

(cherry picked from commit a1a8bcdfde2e616cffeb4bf4e1968ba55cf409e9)
DeltaFile
+4-6sys/x86/x86/cpu_machdep.c
+4-61 files

FreeBSD/src 6bc5a7csys/amd64/amd64 machdep.c

amd64: parse_memmap(): Move comment about size at proper place

While here, declare 'size' only in the relevant block.

No functional change (intended).

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 53bb02015fce72c79498842b898faefc2da3b0fb)
DeltaFile
+9-10sys/amd64/amd64/machdep.c
+9-101 files

FreeBSD/src 30f803fsys/x86/x86 cpu_machdep.c

x86: x86_msr_op(): Move setting mode up, delineate logical blocks

No functional changes (intended).

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54996

(cherry picked from commit 7acd7ac6385c783699a64216198d7f2e244cc3b4)
DeltaFile
+5-3sys/x86/x86/cpu_machdep.c
+5-31 files

FreeBSD/src 97490a7sys/dev/aic7xxx ahc_pci.c

ahc(4): Fix a warning on i386 compilation

Fixes:          cd036e891a35 ("ahc_pci.c: If bus_dma...")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit a9f7074e858fd7c8e07c164fc365afc0d0077735)
DeltaFile
+1-1sys/dev/aic7xxx/ahc_pci.c
+1-11 files

FreeBSD/src 1d9cd70sys/dev/acpica acpi.c

acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE

This has been possible since ACPICA 20240827, and is actually
a requirement to get out of S3 on ACPI_REDUCED_HARDWARE (that said, we
don't implement S3 on arm64 yet).

Relevant ACPICA commit:
https://github.com/acpica/acpica/commit/79cd933e7b370e8d3fb490bf36ca5d111a12f96a.

Reviewed by:    obiwac
MFC after:      2 weeks
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54625

(cherry picked from commit 0cca6277499febef57149e8999ecd1a42ef1dfd3)
DeltaFile
+0-2sys/dev/acpica/acpi.c
+0-21 files

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

acpi: Use only AcpiGetSleepTypeData() to determine Sx support

Previously, we would first call AcpiEvaluateObject() to execute \_Sx
before calling AcpiGetSleepTypeData().  This was unnecessary, as
AcpiGetSleepTypeData() performs the same call itself.  While doing so,
the latter function logs any other error than AE_NOT_FOUND (which
indicates that a particular sleep state is not supported), which most
probably is an added benefit of this change.

Reviewed by:    obiwac
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54624

(cherry picked from commit 526c09a489295c96662d6c3d428f69672968ab80)
DeltaFile
+5-5sys/dev/acpica/acpi.c
+5-51 files