FreeBSD/src f6de0a7sys/dev/ice if_ice_iflib.c virtchnl_inline_ipsec.h

ice(4): Update to 1.39.13-k

- Adds mirror interface functionality
- Remove unused virtchnl headers

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

Sponsored by:   Intel Corporation
Tested by:      jeffrey.e.pieper at intel.com
Differential Revision:  https://reviews.freebsd.org/D44004

(cherry picked from commit 9e54973fc33aa44b77d1c851cb36fcd82dc44cda)
DeltaFile
+1,251-15sys/dev/ice/if_ice_iflib.c
+0-594sys/dev/ice/virtchnl_inline_ipsec.h
+321-39sys/dev/ice/ice_lib.c
+322-30sys/dev/ice/ice_iflib_txrx.c
+35-36sys/dev/ice/ice_flow.c
+30-13sys/dev/ice/ice_common.c
+1,959-72721 files not shown
+2,134-78427 files

FreeBSD/src ff28ca0sys/net iflib.c iflib.h

iflib: Add sysctl to request extra MSIX vectors on driver load

Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need to have
spare MSI-X interrupts already allocated for them on driver load.

This sysctl is marked as a tunable since it will need to be set before
the driver is loaded since MSI-X interrupt allocation and setup is
done during the attach process.

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D41326

(cherry picked from commit 3c7da27a473e339392121404e06c506df040c16f)
DeltaFile
+14-0sys/net/iflib.c
+1-0sys/net/iflib.h
+15-02 files

FreeBSD/src eafd6c2sys/conf files.amd64 files.arm64, sys/contrib/dev/ice ice-1.3.36.0.pkg ice-1.3.35.0.pkg

ice_ddp: Update package to 1.3.36.0

This is intended to be used with the upcoming ice 1.39.13-k
driver update, but is still backwards compatible with
previous versions of the driver.

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

Sponsored by:   Intel Corporation

(cherry picked from commit 768329961dc0c041f7647f1c4549944a2ca168aa)
DeltaFile
+3-3sys/conf/files.amd64
+3-3sys/conf/files.arm64
+3-3sys/conf/files.powerpc
+1-1sys/modules/ice_ddp/Makefile
+0-0sys/contrib/dev/ice/ice-1.3.36.0.pkg
+0-0sys/contrib/dev/ice/ice-1.3.35.0.pkg
+10-106 files

FreeBSD/src 59d1c38sys/net iflib.c iflib.h

iflib: Add subinterface interrupt allocation function

The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method for the subinterface to request hardware interrupt resources
from the base interface.

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D39930

(cherry picked from commit ed34a6b6eab9ea39759ccd3f12876a815d271929)
DeltaFile
+77-2sys/net/iflib.c
+12-0sys/net/iflib.h
+89-22 files

FreeBSD/src 988dd5asys/dev/ice ice_iflib_recovery_txrx.c ice_iflib_sysctls.h

ice(4): Update copyright year to 2024

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D44003

(cherry picked from commit 015f8cc5b0c10336a048f37a7071ea03516de242)
DeltaFile
+1-1sys/dev/ice/ice_iflib_recovery_txrx.c
+1-1sys/dev/ice/ice_iflib_sysctls.h
+1-1sys/dev/ice/ice_iflib_txrx.c
+1-1sys/dev/ice/ice_lan_tx_rx.h
+1-1sys/dev/ice/ice_lib.c
+1-1sys/dev/ice/ice_lib.h
+6-652 files not shown
+58-5858 files

FreeBSD/src 9f3032bshare/man/man5 pf.conf.5, sys/netpfil/pf pf_norm.c

pf tests: Add option to send fragmented packets

Add option to send fragmented packets and to properly sniff them by
reassembling them by the sniffer itself.

Reviewed by:    kp
Sponsored by:   InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D42354

(cherry picked from commit d7c9de2d68ca81c557e069c2b431529cf597886c)

pf: Fix packet reassembly

Don't drop fragmented packets when reassembly is disabled, they can be
matched by rules with "fragment" keyword. Ensure that presence of scrub
rules forces old behaviour.

Reviewed by:    kp
Sponsored by:   InnoGames GmbH

    [22 lines not shown]
DeltaFile
+101-44share/man/man5/pf.conf.5
+130-0tests/sys/netpfil/pf/fragmentation_no_reassembly.sh
+31-20sys/netpfil/pf/pf_norm.c
+30-9tests/sys/netpfil/common/pft_ping.py
+14-4tests/sys/netpfil/common/sniffer.py
+0-11tests/sys/netpfil/pf/fragmentation_compat.sh
+306-881 files not shown
+307-887 files

FreeBSD/src 7607204bin/cp utils.c cp.c

cp: Clarify an obscure comment.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D44805

(cherry picked from commit 64d6925d1901637125f9f739282e72c992657dc8)

cp: Additional sanity check.

Once we've successfully opened the file we've been asked to copy, check
that it's of the same type as FTS told us it was.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude, markj
Differential Revision:  https://reviews.freebsd.org/D44806


    [8 lines not shown]
DeltaFile
+21-8bin/cp/utils.c
+9-4bin/cp/cp.c
+30-122 files

FreeBSD/src 9f1d450usr.bin/xinstall xinstall.c

install: Fix a compiler warning when bootstrapping

Fixes:          4336161cc9c6 ("install: Don't skip syncing in the common case.")
Reviewed by:    imp, des
Differential Revision:  https://reviews.freebsd.org/D44866

(cherry picked from commit 2f44f86575f9cba5da28b762c359f7a806400744)
DeltaFile
+2-0usr.bin/xinstall/xinstall.c
+2-01 files

FreeBSD/src 34ee703usr.bin/xinstall xinstall.c install.1, usr.bin/xinstall/tests install_test.sh

install: Always use a temporary file.

Previously, we would only use a temporary file if explicitly asked to
with the `-S` option, and even then, only if the target file already
existed.  This meant that an outside observer looking for the target
file might see a partial file, and might see the file disappear and
then reappear.

With this patch, we always use a temporary file, ensuring atomicity.
The downside is slightly increased disk usage.  The upside is never
having to worry about, for instance, cron jobs randomly failing if
they happen to run simultaneously with `make installworld`.

The `-S` option is retained, partly for compatibility, and partly
to control the use of `fsync(2)`, which has a non-negligible cost
(approximately 10% increase in wall time for `make installworld`).

MFC after:      1 week
Sponsored by:   Klara, Inc.

    [68 lines not shown]
DeltaFile
+128-294usr.bin/xinstall/xinstall.c
+12-19usr.bin/xinstall/install.1
+8-0usr.bin/xinstall/tests/install_test.sh
+148-3133 files

FreeBSD/src 15dfc47crypto/heimdal/lib/asn1 gen.c

heimdal: asn1: Use unsigned bitfields for named bitsets

Import upstream 6747e1628:

  asn1: Use unsigned bitfields for named bitsets

  Signed 1-bit bitfields are undefined in C.

This should fix the following warnings, which for unknown reasons are
errors in CI:

  /usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1020 |         ku.digitalSignature = 1;
        |                             ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1021 |         ku.keyEncipherment = 1;
        |                            ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1028 |         ku.keyCertSign = 1;

    [10 lines not shown]
DeltaFile
+2-2crypto/heimdal/lib/asn1/gen.c
+2-21 files

FreeBSD/src 689dbdecrypto/heimdal/lib/asn1 gen.c

heimdal: asn1: Use unsigned bitfields for named bitsets

Import upstream 6747e1628:

  asn1: Use unsigned bitfields for named bitsets

  Signed 1-bit bitfields are undefined in C.

This should fix the following warnings, which for unknown reasons are
errors in CI:

  /usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1020 |         ku.digitalSignature = 1;
        |                             ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1021 |         ku.keyEncipherment = 1;
        |                            ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1028 |         ku.keyCertSign = 1;

    [10 lines not shown]
DeltaFile
+2-2crypto/heimdal/lib/asn1/gen.c
+2-21 files

FreeBSD/src 164f125crypto/heimdal/lib/asn1 check-gen.c der_put.c

heimdal: Add 64-bit integer support to ASN.1 compiler

Import upstream 19d378f44:

  ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
  on whether the constraint ranges include numbers that cannot be
  represented in 32-bit ints and whether they include negative
  numbers.

  Template backend support included.  check-template is now built with
  --template, so we know we're testing it.

  Tests included.

Also adjusts the generated files:
* asn1parse.c, asn1parse.h (not strictly necessary, but nice to have)
* der-protos.h, which needs a bunch of new prototypes. I copied these
  from a der-protos.h generated by the upstream build system, which
  uses a perl script for this.

    [33 lines not shown]
DeltaFile
+120-0crypto/heimdal/lib/asn1/check-gen.c
+72-0crypto/heimdal/lib/asn1/der_put.c
+57-0crypto/heimdal/lib/asn1/der_length.c
+50-0crypto/heimdal/lib/asn1/der-protos.h
+42-3crypto/heimdal/lib/asn1/der_get.c
+13-9crypto/heimdal/lib/asn1/gen_template.c
+354-1215 files not shown
+446-5221 files

FreeBSD/src 2efe307crypto/heimdal/lib/asn1 check-gen.c der_put.c

heimdal: Add 64-bit integer support to ASN.1 compiler

Import upstream 19d378f44:

  ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
  on whether the constraint ranges include numbers that cannot be
  represented in 32-bit ints and whether they include negative
  numbers.

  Template backend support included.  check-template is now built with
  --template, so we know we're testing it.

  Tests included.

Also adjusts the generated files:
* asn1parse.c, asn1parse.h (not strictly necessary, but nice to have)
* der-protos.h, which needs a bunch of new prototypes. I copied these
  from a der-protos.h generated by the upstream build system, which
  uses a perl script for this.

    [33 lines not shown]
DeltaFile
+120-0crypto/heimdal/lib/asn1/check-gen.c
+72-0crypto/heimdal/lib/asn1/der_put.c
+57-0crypto/heimdal/lib/asn1/der_length.c
+50-0crypto/heimdal/lib/asn1/der-protos.h
+42-3crypto/heimdal/lib/asn1/der_get.c
+13-9crypto/heimdal/lib/asn1/gen_template.c
+354-1215 files not shown
+446-5221 files

FreeBSD/src 8b4cf10. ObsoleteFiles.inc

Add a few missed libclang_rt files to ObsoleteFiles.inc

PR:             276104
Reported by:    Mark Millard <marklmi at yahoo.com>
MFC after:      3 days

(cherry picked from commit 0ab121e9f9a33dde06b292df02ec2eee03033e1f)
DeltaFile
+2-0ObsoleteFiles.inc
+2-01 files

FreeBSD/src feb6e27. ObsoleteFiles.inc

Add a few missed libclang_rt files to ObsoleteFiles.inc

PR:             276104
Reported by:    Mark Millard <marklmi at yahoo.com>
MFC after:      3 days

(cherry picked from commit 0ab121e9f9a33dde06b292df02ec2eee03033e1f)
DeltaFile
+2-0ObsoleteFiles.inc
+2-01 files

FreeBSD/src 7fdef9csys/kern subr_trap.c, sys/netinet tcp_hpts.c

Optimize HPTS so that little work is done until we have a hpts thread that is over the connection threshold

HPTS inserts a softclock for system call return that optimizes performance. However when
no HPTS threads need the help (i.e. when they have less than 100 or so connections) then
there should be little work done i.e. check the counter and return instead of running through
all the threads getting locks etc.ptimize HPTS so that little work is done until we have a hpts
thread that is over the connection threshold.

Reported by:    eduardo
Reviewed by:    gallatin, glebius, tuexen
Tested by:      gallatin
Differential Revision: https://reviews.freebsd.org/D44420

(cherry picked from commit b7b78c1c169dd2213b4cb3e14e19c045b2c5e5af)
DeltaFile
+9-1sys/netinet/tcp_hpts.c
+3-1sys/sys/systm.h
+2-0sys/kern/subr_trap.c
+14-23 files

FreeBSD/src 917b543sys/netinet tcp_hpts.h tcp_hpts.c

HTPS has actually three states not two so the macro needs to account for that.

Ok lets fix up the tcp_in_hpts() so that it also says yes if you
are in the race state moving and you are scheduled to be put in.
This also requires changing the MPASS to be the old version non
inline function of tcp_in_hpts().

This change also adds a new inline macro so that a uint64_t timestamp can be
obtained by a transport (aka Rack will use this).

Reviewed by: glebius, tuexen
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D44157

(cherry picked from commit 638b5ae1c7858373344bc7b9dcb5a1e7fab80bd9)
DeltaFile
+14-1sys/netinet/tcp_hpts.h
+1-1sys/netinet/tcp_hpts.c
+15-22 files

FreeBSD/src d48e7e8sys/netinet/tcp_stacks rack.c

TCP: Fix a rack bug that skyzall found which results in a crash.

So when we call the fast_rsm retransmit path, we should always move
snd_nxt back up to snd_max. In fact during ack-processing if snd_nxt
falls behind it should be moved up there as well. Otherwise what
can happen is we have an incorrect mark on snd_nxt and incorrectly
calculate the offset when we go through the  front path (which is
what skzyall was able to do) then when we go to clean up the
send the offset is all wrong and we crash.

Special thanks to Gleb for pointing out the problem and the email
that had the reproducer so I could find the issue.

Reported-by: syzbot+f5061a372f74f021ec02 at syzkaller.appspotmail.com
Sponsored by: Netflix Inc

(cherry picked from commit 8818f0f1124ea3d0e8028f85d667237536eba10c)
DeltaFile
+6-4sys/netinet/tcp_stacks/rack.c
+6-41 files

FreeBSD/src be4f189. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump the branch version.

Approved by:    so
DeltaFile
+5-0UPDATING
+1-1sys/conf/newvers.sh
+6-12 files

FreeBSD/src 266b3bdsys/contrib/openzfs/include/os/linux/zfs/sys zpl.h, sys/contrib/openzfs/include/sys arc.h

Unify arc_prune_async() code, fix excessive ARC pruning

There is no sense to have separate implementations for FreeBSD and Linux.  Make
Linux code shared as more functional and just register FreeBSD-specific prune
callback with arc_add_prune_callback() API.

Aside of code cleanup this fixes excessive pruning on FreeBSD.

[olce: This code comes from the OpenZFS pull request:
https://github.com/openzfs/zfs/pull/16083, vendor-merged into our tree.  Its
commit message has been slightly adapted to the present context.  The upstream
pull request has been reviewed and merged into 'zfs-2.1.16-staging' as
5b81b1bf5e6d6aeb8a87175dcb12b529185cac2f, which should come into our tree at the
next vendor import.  This is the same code that was merged into stable/14 and
main as part of vendor merges, and released as an EN (FreeBSD-EN-23:18.openzfs)
over releng/14.0 by markj@.]

PR:             275594, 274698
Reported by:    Seigo Tanimura <seigo.tanimura at gmail.com>, markj, and others

    [9 lines not shown]
DeltaFile
+0-62sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
+52-0sys/contrib/openzfs/module/zfs/arc.c
+0-51sys/contrib/openzfs/module/os/linux/zfs/arc_os.c
+32-0sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
+1-1sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h
+1-1sys/contrib/openzfs/include/sys/arc.h
+86-1152 files not shown
+87-1178 files

FreeBSD/src 78101d4lib/libsys _libsys.h, sys/compat/freebsd32 freebsd32_systrace_args.c

syscalls.master: correct return type of {read,write}v

This was missed when read/write, etc were updated to return ssize_t.

Fixes:          2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int.

Reviewed by:    imp, kib
Differential Revision:  https://reviews.freebsd.org/D44930
DeltaFile
+4-4lib/libsys/_libsys.h
+2-2sys/compat/freebsd32/freebsd32_systrace_args.c
+2-2sys/kern/syscalls.master
+2-2sys/kern/systrace_args.c
+10-104 files

FreeBSD/src 6b0cf2asys/kern vfs_lookup.c

vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled

Reviewed by:    emaste, imp, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44931
DeltaFile
+7-1sys/kern/vfs_lookup.c
+7-11 files

FreeBSD/src 66df810sys/kern vfs_lookup.c, sys/sys namei.h

sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c

Reviewed by:    emaste, imp, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44931
DeltaFile
+5-0sys/kern/vfs_lookup.c
+0-5sys/sys/namei.h
+5-52 files

FreeBSD/src 0135101share/mk meta.autodep.mk

meta.autodep.mk do not override start_utc

Update meta.autodep.mk
If included at level 0 it is important not to override start_utc
DeltaFile
+3-1share/mk/meta.autodep.mk
+3-11 files

FreeBSD/src d7ac426sys/sys elf_common.h

elf_common.h: Add STO_AARCH64_VARIANT_PCS

This is used to mark symbols that use a variant procedure call with
a different calling convention to the main ABI.

Reviewed by:    kib, imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D44868
DeltaFile
+3-0sys/sys/elf_common.h
+3-01 files

FreeBSD/src 2c35c86. Makefile.inc1

showconfig: Set MACHINE for src.opts.mk

Also set MACHINE and MACHINE_ARCH when reading config options from
src.opts.mk. This ensures any machine-dependent options are reported
correctly.

Reviewed by:    emaste, imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D44838
DeltaFile
+2-1Makefile.inc1
+2-11 files

FreeBSD/src 9d40492sys/arm64/arm64 efirt_machdep.c minidump_machdep.c, sys/arm64/include vmparam.h

arm64: Check DMAP address is valid in PHYS_IN_DMAP

When checking if a physical address is in the DMAP region we assume
all physical addresses between DMAP_MIN_PHYSADDR and DMAP_MAX_PHYSADDR
are able to be accesses through the DMAP. It may be the case that
there is device memory in this range that shouldn't be accessed through
the DMAP mappings.

Add a check to PHYS_IN_DMAP that the translated virtual address is a
valid kernel address. To support code that already checks the address
is valid add PHYS_IN_DMAP_RANGE.

PR:             278233
Reviewed by:    alc, markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D44677
DeltaFile
+15-3sys/arm64/include/vmparam.h
+2-7sys/arm64/arm64/efirt_machdep.c
+4-3sys/arm64/arm64/minidump_machdep.c
+1-1sys/arm64/arm64/machdep.c
+22-144 files

FreeBSD/src ef80df0sys/arm64/vmm vmm_hyp_exception.S

arm64/vmm: Ensure the tlbi has completed

Ensure the TLB is invalidated before enabling the EL2 MMU. Without
this the TLB may be in an inconsistant state leading to a possible
exception when enabling the MMU.

PR:             277559
Reviewed by:    markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D44799
DeltaFile
+3-0sys/arm64/vmm/vmm_hyp_exception.S
+3-01 files

FreeBSD/src a913f3a. .cirrus.yml

Cirrus-CI: bump Clang versions to 16 and 17

Clang/LLVM 17 is currently the in-tree default compiler, so use it as
the default Cirrus-CI toolchain.  Clang/LLVM 18 is coming soon and needs
to be added here, but I ran into trouble with llvm18-lite package
availability so will look at that later.

Reviewed by:    dim (earlier), Jose Luis Duran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44162

(cherry picked from commit 51c6bf0478bd331225121eb4a0a60510cc3920b1)
(cherry picked from commit adc61137fdf7b31b5f32354b970a8d824347b0de)
DeltaFile
+14-14.cirrus.yml
+14-141 files

FreeBSD/src 1a4e512sys/dev/acpica acpi_battery.c

acpi_battery: avoid divide-by-zero when no devices have capacity info

On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.

So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).

Reported by:    Stefano Marinelli
Tested by:      Stefano Marinelli
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D44818

(cherry picked from commit 2e850b832f5d2adb9b230d191277d67c00caaab9)
(cherry picked from commit 788987e034b1c73d779a3aa179f79f672bbdb366)
DeltaFile
+8-1sys/dev/acpica/acpi_battery.c
+8-11 files