FreeBSD/src 461da47 — sys/dev/iwm if_iwmvar.h if_iwm.c

iwm: mask closed_rb_num to the RX ring size

iwm_notif_intr() reads hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff and
loops while (sc->rxq.cur != hw) without masking hw to the ring size (512 entries
for 9000-series MQ RX, 256 for legacy). If the hardware reports a value at or
above the ring size, cur never equals hw: the loop walks stale ring entries
indefinitely and the write-pointer update uses a bogus index. Linux iwlwifi
masks the value (5eae443eb5e2) and OpenBSD has done the same since 9000-series
support was added (3287dca4fa10).

This was found while debugging an iwm crash on another BSD using the same
driver lineage (DragonFly, upstream bug 3449)

Locally tested:

* 7260, 9260, STA mode

PR: kern/299427
Submitted by: David Bidner <david at crap.solutions>

    [2 lines not shown]
DeltaFile
+2-0sys/dev/iwm/if_iwm.c
+1-0sys/dev/iwm/if_iwmvar.h
+3-02 files

FreeBSD/src 176fd23 — sys/dev/iwm if_iwm.c

iwm: ensure NIC is alive during txq enable

I broke this in a previous commit.  OpenBSD already has the NIC
nailed alive but FreeBSD's codebase currently does not.

Locally tested:

* 7260, 9260, STA mode

Fixes: 0a12ff65b9647a6e31471e5d27a8692b4adb6803

Differential Revision:  https://reviews.freebsd.org/D60823
DeltaFile
+10-3sys/dev/iwm/if_iwm.c
+10-31 files

FreeBSD/src 37337c4 — sys/dev/iwm if_iwm.c

iwm: fix incorrect mutex / crash use during error detach path

My previous commit (b3ef4013a4) added a couple of lock assertions.
However, the detach assertion is wrong - if the driver hasn't
attached then detach needs to be a no-op and this includes
not touching a deinit'ed mutex.

So, move the mutex check and use until after the attached check.

This fixes the driver crash I saw when another bit of in-flight
work caused attach to fail, and thus iwm_detach() -> iwm_detach_local()
ended up trying to use a deinit'ed mutex, leading to a crash.

Fixes: b3ef4013a4fa75063930d0221a0bc50f95af0527

Differential Revision:  https://reviews.freebsd.org/D60821
DeltaFile
+8-4sys/dev/iwm/if_iwm.c
+8-41 files

FreeBSD/src 454e8ff — usr.sbin/sysrc sysrc

sysrc: Be quiet when changing values

Make it easier for the rc group to facilitate having an option to fully
boot muted (à la OmniOS) without resorting to /dev/null redirections.

Reviewed by:    imp, dteske
Differential Revision:  https://reviews.freebsd.org/D46120
DeltaFile
+14-10usr.sbin/sysrc/sysrc
+14-101 files

FreeBSD/src fce354b — sys/compat/linuxkpi/common/include/linux uuid.h

linuxkpi: add uuid_t and helpers

linux/uuid.h has only the guid_t family. Add uuid_t, next to guid_t,
with uuid_equal(), uuid_copy(), import_uuid() and export_uuid(),
mirroring the guid_ versions.

Used by drm/virtio for dma-buf UUID export.

Signed-off-by:  Denis Borovikov <denis.borovikov at gmail.com>
Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D60199
DeltaFile
+30-0sys/compat/linuxkpi/common/include/linux/uuid.h
+30-01 files

FreeBSD/src 8558dd6 — sys/compat/linuxkpi/common/include/linux pci.h

linuxkpi: add pci_is_vga()

Returns true for a VGA-compatible display controller and for the
pre-PCI 2.0 VGA class (base 0x00, subclass 0x01), as Linux's
pci_is_vga() does. Used by drm/virtio to decide whether to remove
the firmware framebuffer on virtio-vga.

Signed-off-by:  Denis Borovikov <denis.borovikov at gmail.com>
Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D60200
DeltaFile
+11-0sys/compat/linuxkpi/common/include/linux/pci.h
+11-01 files

FreeBSD/src 59642e0 — sys/compat/linuxkpi/common/include/linux uaccess.h

linuxkpi: add strncpy_from_user()

Same semantics as Linux: returns the string length without the NUL,
count if the string was truncated, or -EFAULT. Implemented with
copyinstr(9). Unlike linux_copyin() it does not translate the remapped
ioctl argument window; its user, drm/virtio, passes a pointer taken
from the ioctl payload, so that is not needed.

Signed-off-by:  Denis Borovikov <denis.borovikov at gmail.com>
Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D60198
DeltaFile
+17-0sys/compat/linuxkpi/common/include/linux/uaccess.h
+17-01 files

FreeBSD/src 4a059da — sys/dev/acpi_apple acpi_apple.h acpi_apple.c

acpi_apple: make the device mode a typed enum

The two mode values were spelled as bit flags, but a device is exactly
one of the two and the dispatch compared the field for equality.

Turned them into an enum, type the softc field with it, and dispatch with
a switch that lists every value

No functional change.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D60793
DeltaFile
+11-4sys/dev/acpi_apple/acpi_apple.c
+5-3sys/dev/acpi_apple/acpi_apple.h
+16-72 files

FreeBSD/src 44ceda0 — sys/dev/acpi_apple acpi_apple_platform.c acpi_apple.h, sys/dev/apple_acpi apple_platform.c apple_acpi.h

acpi_apple: rename source files to match the driver name

The driver, module, kernel option and manual page are all named
acpi_apple, but the sources lived in sys/dev/apple_acpi/ with an
apple_ prefix. Every other vendor ACPI driver in the tree uses the
acpi_<vendor> form for both the directory and the file names.

No functional change.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D60792
DeltaFile
+0-771sys/dev/apple_acpi/apple_backlight.c
+771-0sys/dev/acpi_apple/acpi_apple_bl.c
+0-149sys/dev/apple_acpi/apple_acpi.h
+149-0sys/dev/acpi_apple/acpi_apple.h
+0-123sys/dev/apple_acpi/apple_platform.c
+123-0sys/dev/acpi_apple/acpi_apple_platform.c
+1,043-1,0434 files not shown
+1,168-1,16810 files

FreeBSD/src 7668705 — sys/netinet/tcp_stacks rack.c

tcp/rack: reject wma_divisor values <= 0

The net.inet.tcp.rack.measure.wma_divisor sysctl is the divisor
of the goodput weighted moving average used when the dynamic
goodput multiplier is enabled.  Setting it to 0 panics the kernel.

Make the variable and the sysctl unsigned, reject 0 and values
above INT32_MAX.

MFC after:      1 month
Found with:     Claude Code Opus 5.5
Reviewed by:    tuexen, glebius, markj (early version)
Differential Revision:  https://reviews.freebsd.org/D60759
DeltaFile
+21-5sys/netinet/tcp_stacks/rack.c
+21-51 files

FreeBSD/src 7ccf9ae — . Makefile.inc1

Makefile.inc1: Adjust mkimg bootstrap versions

Stream-optimized VMDK support was merged to stable/15 with
__FreeBSD_version 1501504.

Sponsored by:   Amazon
DeltaFile
+3-2Makefile.inc1
+3-21 files

FreeBSD/src 3720eae — release Makefile.ec2

EC2: Pass --vmdk to bsdec2-image-upload if needed

Starting with version 1.5.0, bsdec2-image-upload supports uploading
stream-optimized VMDK files.  If we build images in that format, we
need to upload them appropriately.

MFC after:      2 weeks
Sponsored by:   Amazon

(cherry picked from commit 65840afc88553f89c051b96b081061a532cb7df3)
DeltaFile
+4-1release/Makefile.ec2
+4-11 files

FreeBSD/src bce513d — usr.bin/mkimg/tests img-63x255-4096-ebr.vmdks.hex img-63x255-4096-mbr.vmdks.hex

mkimg: Add tests for vmdks format

This is the 'stream-optimized' version of the VMDK format.

MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60154

(cherry picked from commit 65b872380ed7f7900fc581d482c5586eeca9e184)
DeltaFile
+617-0usr.bin/mkimg/tests/img-63x255-512-gpt.vmdks.hex
+617-0usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdks.hex
+617-0usr.bin/mkimg/tests/img-1x1-512-gpt.vmdks.hex
+617-0usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdks.hex
+596-0usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdks.hex
+596-0usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdks.hex
+3,660-015 files not shown
+11,963-121 files

FreeBSD/src aa59f16 — . Makefile.inc1, sys/sys param.h

__FreeBSD_version: Bump for mkimg -f vmdks

Also, adjust bootstrap tools code in Makefile.inc1 to reflect this; in
addition to rebuilding mkimg if it is out of date, we now need to build
libz, which was not previously needed by mkimg.

Reviewed by:    kevans
MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60153
X-Cherry-Pick:  Logic in Makefile.inc1 was adjusted for new __FreeBSD_version

(cherry picked from commit a68ba2d2ce55f7c76174239c1f678379caec5348)
DeltaFile
+5-3Makefile.inc1
+1-1sys/sys/param.h
+6-42 files

FreeBSD/src 207d505 — usr.bin/mkimg image.h image.c

mkimg: Add image_buffer_region

This is like image_copyout_region, but copies into a buffer rather than
writing out to a file; it will be used by future support for compressed
images (and potentially other circumstances where image data must be
manipulated before being written out to disk).

Reviewed by:    jrm
No objection from:      Christos Komis (author)
MFC after:      2 weeks
Sponsored by:   Google LLC (GSoC 2025)
Differential Revision:  https://reviews.freebsd.org/D60149

(cherry picked from commit 84a3e29c72030dab16b4dc82d601d0af5da6a18c)
DeltaFile
+68-0usr.bin/mkimg/image.c
+1-0usr.bin/mkimg/image.h
+69-02 files

FreeBSD/src dad0a37 — usr.bin/mkimg mkimg.1

mkimg.1: Document new vmdks format

Reviewed by:    ziaee
Co-authored-by: Claude Opus 5.5
MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60152

(cherry picked from commit 88017d32745ef24d662db826fe475d8a20d290a6)
DeltaFile
+12-2usr.bin/mkimg/mkimg.1
+12-21 files

FreeBSD/src 4e9d2e7 — usr.bin/mkimg vmdk.c

mkimg: Check for realloc failure

If realloc fails, clean up and return ENOMEM; don't just copy data
into NULL.

Reviewed by:    emaste
Reported by:    Claude Opus 5.5
MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60147

(cherry picked from commit 1a0523197c5c16ce7bcb79d16c6bf8945258b428)
DeltaFile
+6-1usr.bin/mkimg/vmdk.c
+6-11 files

FreeBSD/src 646efd6 — usr.bin/mkimg vmdk.c

mkimg: Make vmdk's desc_fmt slightly more generic

This will allow it to be reused in upcoming work.

Suggested by:   Claude Opus 5.5
MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60150

(cherry picked from commit 498276b487c838afa2b3e4df322c43141788ba20)
DeltaFile
+6-3usr.bin/mkimg/vmdk.c
+6-31 files

FreeBSD/src 2c085d5 — usr.bin/mkimg image.c

mkimg: Avoid leaking a page of mmap

The image_file_map function adjusts the provided file offset to be
page-aligned, with a resulting increase in the size of the mapped
region; the increased size needs to be used when unmapping as well.

Reported by:    Claude Opus 5.5
Fixes:  baf4abfc39b2 ("Allow building mkimg as cross-tool")
MFC after:      2 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60148

(cherry picked from commit 434819b4fec5e508bdfe72f91e73402e9c2fca22)
DeltaFile
+5-4usr.bin/mkimg/image.c
+5-41 files

FreeBSD/src 94deb9c — usr.bin/mkimg Makefile vmdk.c

mkimg: Add support for stream-optimized VMDK

FreeBSD VM/cloud images tend to be highly compressible: The generic VM
images compress roughly 3.5:1, and cloud images typically even more
since they have significant unused space in their virtual disks.  This
generally doesn't matter for users who can download compressed release
images and extract them locally, but for EC2 in particular relying on
uncompressed image formats is painful: We now upload over 500 GB/week
to AWS.

This commit adds the "stream-optimized" version of the VMDK format,
which compresses each 64 kB "grain" individually (and omits grains
which are all zeroes).  Compared to uncompressed formats, this can
produce much smaller images; experiments indicate that using this
format for EC2 image uploads will reduce the weekly traffic to under
100 GB/week.

Co-authored-by: Claude Opus 5.5
MFC after:      2 weeks

    [4 lines not shown]
DeltaFile
+309-0usr.bin/mkimg/vmdk.c
+1-1usr.bin/mkimg/Makefile
+310-12 files

FreeBSD/src a8be899 — . Makefile.inc1, release Makefile Makefile.inc1

build: Support got

Add code for using got(1), matching how git(1) is currently used:
1. Determining the git branch,
2. Determining the checked-out hash,
3. Determining the commit count,
4. Determining the timestamp of the most recent commit,
5. Determining if the tree is "dirty",
6. Generating lists of files for the src and src-sys packages, and
7. Excluding .got directories from src.txz and ports.txz.

The release engineer hopes to use this functionality in release builds,
since got's minimalism makes it a far more manageable build tool than
git.

Reviewed by:    naddy
MFC after:      1 week
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60606
DeltaFile
+33-2sys/conf/newvers.sh
+31-0Makefile.inc1
+27-1release/Makefile.inc1
+2-2release/Makefile
+93-54 files

FreeBSD/src 61bc5cc — .github/workflows cross-bootstrap-tools.yml

.github: Update to use llvm 15

This is the latest supported version in Ubuntu 22.04

Reviewed by:    vexeduxr, imp, emaste
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1862

(cherry picked from commit cf583997282f962d9e8bf478667d5087f7c1f2da)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src 913ef60 — .github/workflows cross-bootstrap-tools.yml

.github: Use make.py's --cross-toolchain option on macOS

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D51749

(cherry picked from commit ad43e7f4721080caedd29a21de9210f9b763ee4d)
DeltaFile
+4-1.github/workflows/cross-bootstrap-tools.yml
+4-11 files

FreeBSD/src efdd4c2 — .github/workflows cross-bootstrap-tools.yml

.github: Update the clang release used for macos

Reviewed by:    emaste, jhb
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1399

(cherry picked from commit edc692b9052ab0594248104d002f32c657e36057)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src c30ae77 — .github/workflows cross-bootstrap-tools.yml

.github: Use the two most recent LTS releases

Ubuntu 24.04 is the most recent LTS release. Use it and the previous
22.04 LTS for cross build testing.

Reported by:    emaste, jhb
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1399

(cherry picked from commit 386e2dc442f46d2c4b43dc9e767eaa93facdbb42)
DeltaFile
+5-5.github/workflows/cross-bootstrap-tools.yml
+5-51 files

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

.github: Enable manually running github actions

Sponsored by:   Arm Ltd

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/878

(cherry picked from commit 78cc45712350d81d848706a77f28f90cc51ebfaf)
DeltaFile
+1-0.github/workflows/cross-bootstrap-tools.yml
+1-01 files

FreeBSD/src c54ffb0 — .github/workflows cross-bootstrap-tools.yml

.github: Update to use llvm 15

This is the latest supported version in Ubuntu 22.04

Reviewed by:    vexeduxr, imp, emaste
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1862

(cherry picked from commit cf583997282f962d9e8bf478667d5087f7c1f2da)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src 19a5023 — .github/workflows checklist.yml

github: Only run the checklist checker for PRs against main

Currently this check is run on every push to stable branches which all
fail since they fail to fetch the non-existent .github/path-rules.txt
from the just-updated branches.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D60709
DeltaFile
+1-0.github/workflows/checklist.yml
+1-01 files

FreeBSD/src 025393b — contrib/llvm-project/compiler-rt/lib/asan asan_allocator.h asan_allocator.cpp, contrib/llvm-project/compiler-rt/lib/hwasan hwasan_allocation_functions.cpp

Merge commit a5fa4dba6e2e from llvm-project (by PiJoules):

  [compiler-rt] Add interceptors for free_[aligned_]sized for asan+hwasan (#189109)

This avoids a jemalloc assertion when running sanitized applications
against glib, which uses free_sized(3).

PR:             298943
MFC after:      1 week

(cherry picked from commit a3fbf20c0558ee3c2b88adc0c944e66d074cab7b)
DeltaFile
+32-0contrib/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
+22-0contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+13-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+3-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+70-04 files

FreeBSD/src 1abf88d — contrib/llvm-project/compiler-rt/lib/asan asan_malloc_mac.cpp asan_malloc_linux.cpp

Merge commit 681c2ee4dfbf from llvm-project (by Justin King):

  asan: refactor interceptor allocation/deallocation functions (#145087)

  Do some refactoring to allocation/deallocation interceptors. Expose
  explicit per-alloc_type functions and stop accepting explicit AllocType.
  This ensures we do not accidentally mix.

  NOTE: This change rejects attempts to call `operator new(<some_size>,
  static_cast<std::align_val_t>(0))`.

  For https://github.com/llvm/llvm-project/issues/144435

  Signed-off-by: Justin King <jcking at google.com>

This a prerequisite for adding sanitizer interceptors for free_sized(3)
and free_aligned_sized(3).

PR:             298943

    [3 lines not shown]
DeltaFile
+97-10contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+32-32contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp
+19-5contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+5-5contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_win.cpp
+4-4contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+3-3contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_mac.cpp
+160-591 files not shown
+161-607 files