FreeBSD/src 6429199 — sys/powerpc/pseries phyp_llan.c

llan: byte swap the receive queue entries

The receive queue of a PAPR logical LAN is filled in by the hypervisor, so
its fields are big endian, but llan_intr() read the offset and the length of
each frame natively.  On a little endian kernel the length of a 134 byte
frame reads as 0x86000000, and ether_input() discards the mbuf because m_len
is not even large enough for an ethernet header.  No frame is ever received.

Reproduced on a POWER9 pseries guest with a spapr-vlan interface.  Before:

  llan0: discard frame w/o leading ethernet header (len -2046820352
      pkt len -2046820352)
  llan0 1500 <Link#1> 52:54:00:12:34:56  123  118  0  5838733312  7  0

that is 118 input errors out of 123 packets, dhclient(8) never completes and
ping(8) loses every packet, although transmit works because the transmit
path passes the lengths in hcall registers rather than through memory.
Afterwards the interface gets a DHCP lease and ping reports no loss.


    [3 lines not shown]
DeltaFile
+4-4sys/powerpc/pseries/phyp_llan.c
+4-41 files

FreeBSD/src 53edaad — sys/fs/cd9660 cd9660_vfsops.c, sys/fs/ext2fs ext2_vfsops.c

filesystems: use g_vfs_close_unlocked(9)

As result, we lock the devvp vnode around calls to VOP_FSYNC() on
unmount. For instance, the vn_fsync_buf() implementation of fsync()
needs exclusive lock on the vnode to guarantee that all dirty buffers
are indeed synced.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+3-12sys/fs/ext2fs/ext2_vfsops.c
+3-8sys/fs/udf/udf_vfsops.c
+3-8sys/fs/cd9660/cd9660_vfsops.c
+2-5sys/ufs/ffs/ffs_vfsops.c
+2-5sys/fs/msdosfs/msdosfs_vfsops.c
+13-385 files

FreeBSD/src e40c72c — sys/fs/nullfs null_vfsops.c, sys/kern vfs_subr.c vfs_mount.c

VFS: style

Wrap long lines, related to the nullfs mounts over regular files and
sockets type checks.  Also fix indent.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+6-3sys/kern/vfs_cache.c
+4-2sys/kern/vfs_mount.c
+2-1sys/fs/nullfs/null_vfsops.c
+1-1sys/kern/vfs_subr.c
+13-74 files

FreeBSD/src 30ad844 — sys/kern vnode_if.src vfs_subr.c

VFS: require locked vnode for fsync()

Stop exempting devfs nodes.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+8-12sys/kern/vfs_subr.c
+1-1sys/kern/vnode_if.src
+9-132 files

FreeBSD/src 87962e0 — sys/geom geom_vfs.h geom_vfs.c

g_vfs_close_unlocked(9): wrapper around g_vfs_close(9)

that locks both bo vnode and topology.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+13-0sys/geom/geom_vfs.c
+3-1sys/geom/geom_vfs.h
+16-12 files

FreeBSD/src fc544d3 — usr.sbin/makefs makefs.8, usr.sbin/makefs/cd9660 cd9660_eltorito.c

makefs: Remove unused "mac68k" support

Obtained from:  OpenBSD 4f3c7809d4013a2eb3e75fc5e7bd2d8ae1f41843
DeltaFile
+2-4usr.sbin/makefs/cd9660/cd9660_eltorito.c
+0-1usr.sbin/makefs/makefs.8
+2-52 files

FreeBSD/src dd16a5f — sys/kern kern_lockf.c

lockf: Do not block in vfs_busy()

A race is possible otherwise: vfs_busy() may return after an unmounted
filesystem has been removed from the global mount list.  That is,
vfs_busy() will block until vfs_mount_destroy() sets MNTK_REFEXPIRE, and
at that point the mountpoint has been removed from the mountlist, so
TAILQ_FOREACH can return an invalid value.

Simply do not block if the mountpoint is being unmounted.

Reviewed by:    kib
Fixes:          eca39864f702 ("Add sysctl KERN_LOCKF")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59982
DeltaFile
+1-1sys/kern/kern_lockf.c
+1-11 files

FreeBSD/src c14281f — tests/sys/kern unix_connectat.c

tests/sys/kern: skip unix_connectat fdescfs cases when fdescfs is missing

unix_connectat's fdescfs cases call mount_fdescfs(), which skipped on ENODEV.
nmount(2) never returns ENODEV: vfs_donmount() remaps the ENODEV from a failed
fdescfs module load to EINVAL with errmsg "Invalid fstype", so the skip never
fired and the cases failed on kernels without fdescfs.

Approved by:    ngie, asomers
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D59227
DeltaFile
+1-3tests/sys/kern/unix_connectat.c
+1-31 files

FreeBSD/src 884b961 — usr.sbin/makefs makefs.h ffs.c

makefs: Make target filesystem inodes 64 bits

Obtained from:  NetBSD 2501d4dfda92, 7022656d8ab2
DeltaFile
+2-2usr.sbin/makefs/ffs.c
+1-1usr.sbin/makefs/makefs.h
+3-32 files

FreeBSD/src 742e58d — sys/vm vm_page.c

vm_page: Fix the error path in vm_page_alloc_contig_domain()

If we are inserting a run of pages into a VM object and fail at some
point due to a memory allocation failure, we have to free all of the
pages in the run.  We do that by resetting some fields and calling
vm_page_free_toq() on each page; this removes the page from the object
and frees it back to the buddy allocator.

If the page is supposed to be wired, we reset the reference count, but
this was done incorrectly: the VPRC_OBJREF flag must be retained as the
page still belongs to an object.  Resetting it to zero will cause a
panic in vm_page_free_prep(): vm_page_free_object_prep() will subtract
VPRC_OBJREF from the refcount, causing underflow, and
vm_page_free_prep() subsequently calls panic() if the refcount is
non-zero.

Reviewed by:    alc, kib
Fixes:          fee2a2fa3983 ("Change synchonization rules for vm_page reference counting.")
MFC after:      1 week

    [2 lines not shown]
DeltaFile
+1-1sys/vm/vm_page.c
+1-11 files

FreeBSD/src b9811d1 — usr.sbin/makefs cd9660.c

cd9660: merge level 1 and 2 filename conversion

Merge the nearly identical level 1 and level 2 filename conversion
functions and add output buffer bounds checking.

Always NUL-terminate the converted filename, allowing the redundant
memset() in cd9660_translate_node_common() to be removed.

Signed-off-by: Manuel Einfalt <einfalt1 at proton.me>
Reviewed by: emaste
Pull request: https://github.com/freebsd/freebsd-src/pull/2443
DeltaFile
+42-101usr.sbin/makefs/cd9660.c
+42-1011 files

FreeBSD/src d2cce99 — tools/build/options WITHOUT_GCC_BOOTSTRAP WITHOUT_GCC

build/options: Remove old, obolsete GCC options

These aren't referenced in the tree anymore, so remove them from
here. This doesn't chanage src.conf.5, so I didn't commit that file.

Sponsored by:           Netflix
DeltaFile
+0-3tools/build/options/WITH_GCC_BOOTSTRAP
+0-3tools/build/options/WITH_GCC
+0-1tools/build/options/WITHOUT_GCC_BOOTSTRAP
+0-1tools/build/options/WITHOUT_GCC
+0-84 files

FreeBSD/src b99595c — sys/dev/nvme nvme.h nvme_ctrlr.c

nvme: derive CC.CSS from CAP.CSS instead of hardcoding the NVM set

CC.CSS was always writting zero, which is a reserved encoding on a
controller that does not support the NVM command set.
Select 111b on admin-only controllers and 110b when the
I/O command set mechanism is available.

Reviewed by:    ngie, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59628
DeltaFile
+11-2sys/dev/nvme/nvme_ctrlr.c
+9-0sys/dev/nvme/nvme.h
+20-22 files

FreeBSD/src 2c41f7d — sbin/nvmecontrol identify.c format.c, sys/dev/nvme nvme_ns.c nvme.h

nvme: honor FLBAS Format Index Upper when selecting the LBA format

Added nvme_ns_data_format_index() in the nvme, nda, and nvmf
host paths as well as nvmecontrol and camdd.

Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59627
DeltaFile
+18-0sys/dev/nvme/nvme.h
+2-2sys/dev/nvmf/host/nvmf_ns.c
+2-2sys/dev/nvme/nvme_ns.c
+1-1sbin/nvmecontrol/identify.c
+1-1sbin/nvmecontrol/format.c
+1-1sbin/nvmecontrol/devlist.c
+25-72 files not shown
+27-98 files

FreeBSD/src 2300044 — usr.bin/gh-bc/tests dc_tests.sh bc_tests.sh

gh-bc/tests: run tests in parallel

Helps to mitigate failures due to timeout in CI on emulated architectures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16565/testReport/usr.bin.gh-bc/

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59547

(cherry picked from commit 1b9aea382e31f1c72bdfefbe01db51dc7bd60952)
DeltaFile
+1-1usr.bin/gh-bc/tests/dc_tests.sh
+1-1usr.bin/gh-bc/tests/bc_tests.sh
+2-22 files

FreeBSD/src 7564bb7 — usr.bin/gh-bc/tests dc_tests.sh bc_tests.sh

gh-bc/tests: run tests in parallel

Helps to mitigate failures due to timeout in CI on emulated architectures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16565/testReport/usr.bin.gh-bc/

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59547

(cherry picked from commit 1b9aea382e31f1c72bdfefbe01db51dc7bd60952)
DeltaFile
+1-1usr.bin/gh-bc/tests/dc_tests.sh
+1-1usr.bin/gh-bc/tests/bc_tests.sh
+2-22 files

FreeBSD/src c528a15 — tests/sys/fs/tarfs tarfs_test.sh

tarfs_test: split large file test into independent cases

This avoids globally set timeouts for the group of
tarfs_large tests on slower emulated architectures.

While here, lower each testcase's timeout to reflect
the reduction of work. On QEMU aarch64, the largest case
runs in ~500s on a modern desktop, so double that for a
conservative estimate.

Discussed with:         des
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59033

(cherry picked from commit 34c40126fd10abac06cd628c0563c57e777c9eef)
DeltaFile
+78-19tests/sys/fs/tarfs/tarfs_test.sh
+78-191 files

FreeBSD/src b5d1e0c — lib/clang/include/llvm/Config AsmParsers.def Targets.h, lib/clang/libllvm Makefile

llvm: remove Mips target support

The Mips architecture has been removed from all supported branches now.

MFC after:      1 week
DeltaFile
+6-83lib/clang/libllvm/Makefile
+1-6share/man/man5/src.conf.5
+0-4tools/build/options/WITH_LLVM_TARGET_MIPS
+0-4tools/build/options/WITHOUT_LLVM_TARGET_MIPS
+0-4lib/clang/include/llvm/Config/Targets.h
+0-3lib/clang/include/llvm/Config/AsmParsers.def
+7-1045 files not shown
+8-11711 files

FreeBSD/src b5f0e7f — stand/efi/loader framebuffer.c

loader.efi: Be cautious about using GOPs

When we're searching for the EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID (GOPs) to
use, skip any whose Mode or Mode->Info pointers are NULL. The spec
requires these to be non-null, however, some firmwares seem to fail to
populate the Info when, for example, a monitor is not present. Work
around these bugs by skipping any GOPs with bad pointers.

PR: 288900
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59830
DeltaFile
+8-1stand/efi/loader/framebuffer.c
+8-11 files

FreeBSD/src 85fb40b — stand/efi/loader decompress.c

loader.efi: Use EfiLoaderData memory type for ram disks

For the images we read into the memory, use EfiLoaderData memory type
instead of EfiReservedMemoryType. The kernel handles the former properly
and won't reallocate it. While the latter isn't necessarily mapped,
which can cause ram disks to fault when loaded. memdisk_uefi.efi
used the latter type, but also registered the device as an ACPI
RAM disk, which we don't do.

Fixes: afee781523e45
Sponsored by: Netflix
DeltaFile
+8-1stand/efi/loader/decompress.c
+8-11 files

FreeBSD/src e960cb4 — sys/contrib/edk2/Include/Protocol LoadFile2.h TcgService.h

edk2: Import Loadfile2.h and TcgService.h from edk2-stable202502

Verbatim import of these files, with unix line endings.

Sponsored by:           Netflix
DeltaFile
+195-0sys/contrib/edk2/Include/Protocol/TcgService.h
+78-0sys/contrib/edk2/Include/Protocol/LoadFile2.h
+273-02 files

FreeBSD/src 47275d8 — . Makefile.in configure, admin ltmain.sh config.guess

kyua: import kyua-0.15.0-rc2

This change adds kyua kyua-0.15.0-rc2 from [upstream][1].

The kyua-0.15.0-rc2 artifact was been verified by [SHA256 checksum][3].

This contains a removal for umount(8) support as all supported OSes have
access to the u(n)?mount syscall.

More information about the release (from a high level) can be found in
the [release notes][4].

Updated via [`update_kyua.sh`][4] `update_kyua.sh 0.15.0-rc2 kyua-0.15.0`.

1: https://github.com/freebsd/kyua/releases/download/kyua-0.15.0-rc2/kyua-0.15.0-rc2.tar.gz
2: https://github.com/freebsd/kyua/releases/download/kyua-0.15.0-rc2/kyua-0.15.0-rc2.tar.gz.sha256
3: https://github.com/freebsd/kyua/blob/kyua-0.15.0-rc2/NEWS.md
4: https://codeberg.org/ngie/freebsd-powertools:shell/update_kyua.sh@10a04edb
DeltaFile
+1,490-927admin/config.sub
+947-604admin/config.guess
+601-159m4/libtool.m4
+450-280configure
+245-80admin/ltmain.sh
+93-38Makefile.in
+3,826-2,08812 files not shown
+3,977-2,27618 files

FreeBSD/src 8d94a93 — contrib/atf/atf-sh integration_test.sh

integration_test: backport fix from freebsd/atf

See the related merge commit for more details.

MFC after:      28 days
Obtained from:  [freebsd/atf at 2690b04c][upstream]
Fixes:          95223108 ("contrib/atf: upgrade to 0.26")

Merge commit '8fd09407c8e64fd26d095c9b00990c545577db5a'

[upstream]: https://github.com/freebsd/atf/commit/2690b04cbc608af165a58426b7275c063b779f03
DeltaFile
+1-1contrib/atf/atf-sh/integration_test.sh
+1-11 files

FreeBSD/src 8fd0940 — atf-sh integration_test.sh

atf-sh/integration_test: fix hang when invoked via kyua

The code in `create_test_program` called cat on top of the calling
function, resulting in code that would hang waiting for an EOF to be
sent. This was wrong. Pass the heredoc output directly to
`create_test_program` so the content is output to the test program once.

Closes: #201
Signed-off-by: Enji Cooper <ngie at FreeBSD.org>
DeltaFile
+1-1atf-sh/integration_test.sh
+1-11 files

FreeBSD/src bcc27cf — sys/netinet raw_ip.c

raw ip: clear sin_port on bind(2)

Application may set sin_port to some value.  Although this value is not
used by SOCK_RAW, it breaks a check that the address is available.  A
perfect fix would be not use sockaddrs for ifaddrs, but that would be a
bigger change.

PR:                     298366
Reviewed by:            pouria, bnovkov, adrian
Differential Revision:  https://reviews.freebsd.org/D59570
Fixes:                  948ad32ae1e0811f45e1d38f26636fefed5051f0

(cherry picked from commit 465942e8cc8160b21e1a3d5e45fa3ddbb852f6db)
DeltaFile
+1-1sys/netinet/raw_ip.c
+1-11 files

FreeBSD/src 7b4bc01 — sys/netinet tcp_subr.c tcp_usrreq.c

tcp: fix TCPS_CLOSED state underleak in syncache_socket()

The syncache entry holds one TCPS_SYN_RECEIVED count that normally is
transferred to the the newborn tp.  Upon failure syncache_socket() shall
not use TCPSTATES_INC/TCPSTATES_DEC (see 5050df3f4aa4 why).  But when
syncache_socket() fails in_pcbconnect(), it calls tcp_discardcb() to free
resources that were just allocated by tcp_newtcpcb() and this
tcp_discardcb() would do TCPSTATES_DEC(tp->t_state).  The t_state is
TCPS_CLOSED at this point.

Make tcp_discardcb() symmetrical to tcp_newtcpcb() - not responsible for
the TCPSTATES.  Make the caller responsible for state count book keeping.

Reviewed by:            tuexen
Fixes:                  3703e1a73e0e0367c04f47f793e46495e46e647b
Differential Revision:  https://reviews.freebsd.org/D59325

(cherry picked from commit b712bb84a7a7dc229324a95170b8a77e0d9c5bec)
DeltaFile
+0-1sys/netinet/tcp_subr.c
+1-0sys/netinet/tcp_usrreq.c
+1-12 files

FreeBSD/src 7b0bd7e — lib/libsys recv.2

recv(2): update description of MSG_WAITALL

Remove a note about "data of a different type".  This was a bug that was
fixed in FreeBSD 15.  Instead put an exact quote from SUS that lists
allowed cases of a short read with MSG_WAITALL.  See discussion in D57511.

(cherry picked from commit e5bcf988398924568015202bf853b3a9abd3845e)
DeltaFile
+5-3lib/libsys/recv.2
+5-31 files

FreeBSD/src 8359e00 — sys/netgraph ng_ipfw.c

ng_ipfw: provide a tree for faster hook lookup

This should assist setups that connect a lot of nodes to ipfw: and then
distribute traffic with ipfw(4) tablearg feature.

Reviewed by:            pouria
Differential Revision:  https://reviews.freebsd.org/D58547

(cherry picked from commit d3a0bf0a79efb0a28d85d48c88d14bc5d89ab00a)
DeltaFile
+36-11sys/netgraph/ng_ipfw.c
+36-111 files

FreeBSD/src 508b182 — sys/dev/ichiic ig4_pci.c

ichiic: Add PCI id for Arrow Lake.

Add PCI id for Arrow Lake to attach iic driver

Reviewed by: wulf, mav
Differential Revision: https://reviews.freebsd.org/D51107

(cherry picked from commit 87994467966806ffbd1f500b510858909c736b88)
DeltaFile
+12-0sys/dev/ichiic/ig4_pci.c
+12-01 files

FreeBSD/src 5a19be1 — sys/dev/ichiic ig4_pci.c

ig4: Add Lunar Lake-M I2C controllers 4 and 5

Commit 851dffef532a added the Lunar Lake-M I2C controllers 0 through 3
(0xa878-0xa87b), which sit on PCI device 0x15.  The platform exposes two
further controllers at 0xa850 and 0xa851 on PCI device 0x19, reported by
Intel as I2C #4 and #5.  This mirrors the layout already handled for
Arrow Lake-U, where both the 0x777x and 0x775x ranges are listed.

On an HP OmniBook X Flip 16-as0xxx (Core Ultra 9 288V) the firmware
enables only four of the six controllers, and both HID devices sit on
the two that were missing: an ELAN2514 touchscreen on controller 4 and
a SYNA3503 touchpad on controller 5.  Neither attaches without this
change, so the machine has no working pointing device.

Like the other four, these use the Tiger Lake revision of the I2C IP;
Linux treats 0xa850/0xa851 identically to 0xa878-0xa87b in
intel-lpss-pci.c.

Tested on:      HP OmniBook X Flip 16-as0xxx (Intel Core Ultra 9 288V)

    [6 lines not shown]
DeltaFile
+4-0sys/dev/ichiic/ig4_pci.c
+4-01 files