FreeBSD/src 42255aftools/build checkstyle9.pl

checkstyle9: Allow a space between "*" and _*restrict

Before the change, we would get errors like this:

    ERROR: "foo * bar" should be "foo *bar"
    #369: FILE: foobar.c:369:
    +barbaz(char * __restrict s,

Reviewed by:            des, imp
Sponsored by:           Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D44911
DeltaFile
+1-0tools/build/checkstyle9.pl
+1-01 files

FreeBSD/src 177ba18bin/sync sync.8

sync.8: Document that the "sync dance" is not a thing

People still believe that it is essential to run sync(8) a couple of
times before a reboot/halt. Document that this has not been necessary
for a long time now.

Reviewed by:    imp, bcr, Pau Amma <pauamma at gundo.com>
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D33233
DeltaFile
+29-1bin/sync/sync.8
+29-11 files

FreeBSD/src 4395d3clib/libsys gettimeofday.2

Document that gettimeofday() is obsolescent

Reported by:    kaktus
Reviewed by:    kaktus, pstef
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D23942
DeltaFile
+24-1lib/libsys/gettimeofday.2
+24-11 files

FreeBSD/src 2e9bfb6sys/sys link_elf.h types.h

sys: Remove two double words in source code comments

- s/of of/of/

(cherry picked from commit cf5d9c41246c0583b28d5c1101c6f334e38a67e9)
DeltaFile
+1-1sys/sys/link_elf.h
+1-1sys/sys/types.h
+2-22 files

FreeBSD/src 0cb97c1tools/tools/mwl/mwlstats mwlstats.c

mwlstats: Fix a typo in an error message

- s/the the/the/

(cherry picked from commit e1e149ad8ada85267e981cb9d4c6b48d4ce9e1f4)
DeltaFile
+1-1tools/tools/mwl/mwlstats/mwlstats.c
+1-11 files

FreeBSD/src 1002fa2tools/tools/mwl/mwlstats mwlstats.c

mwlstats: Fix a typo in an error message

- s/the the/the/

(cherry picked from commit e1e149ad8ada85267e981cb9d4c6b48d4ce9e1f4)
DeltaFile
+1-1tools/tools/mwl/mwlstats/mwlstats.c
+1-11 files

FreeBSD/src ce775a8sys/sys link_elf.h types.h

sys: Remove two double words in source code comments

- s/of of/of/

(cherry picked from commit cf5d9c41246c0583b28d5c1101c6f334e38a67e9)
DeltaFile
+1-1sys/sys/link_elf.h
+1-1sys/sys/types.h
+2-22 files

FreeBSD/src 068465dsys/sys link_elf.h types.h

sys: Remove two double words in source code comments

- s/of of/of/

(cherry picked from commit cf5d9c41246c0583b28d5c1101c6f334e38a67e9)
DeltaFile
+1-1sys/sys/link_elf.h
+1-1sys/sys/types.h
+2-22 files

FreeBSD/src 176336ctools/tools/mwl/mwlstats mwlstats.c

mwlstats: Fix a typo in an error message

- s/the the/the/

(cherry picked from commit e1e149ad8ada85267e981cb9d4c6b48d4ce9e1f4)
DeltaFile
+1-1tools/tools/mwl/mwlstats/mwlstats.c
+1-11 files

FreeBSD/src 19307b8sys/kern uipc_accf.c, tests/sys/kern socket_accf.c

accept_filter: return different errors for non-listener and a busy socket

The fact that an accept filter needs to be cleared first before setting to
a different one isn't properly documented.  The requirement that the
socket needs already be listening, although trivial, isn't documented
either.  At least return a more meaningful error than EINVAL for an
existing filter.  Cover this with a test case.
DeltaFile
+32-0tests/sys/kern/socket_accf.c
+5-1sys/kern/uipc_accf.c
+37-12 files

FreeBSD/src fac45b6sys/dev/aic7xxx aic7xxx_inline.h aic7xxx.c

ahc(4): resolve some minor nits

In ahc_init(), qoutfifo is already assigned to effectively the same
value a couple lines up, except in the first assignment it uses the
proper definition; keep the more descriptive assignment.

ahc_targetcmd_offset() gets the offset wrong entirely; as per the
area of ahc_init() this diff also touches, targetcmds is laid out first
in the shared map and it's followed by the qoutfifo.  As a result, we'd
generally be getting negative offsets here.  We can't actually do a
partial sync anyways, so there was no consequence to getting this wrong.

Reviewed by:    imp, mav

(cherry picked from commit b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0)
DeltaFile
+1-1sys/dev/aic7xxx/aic7xxx_inline.h
+0-1sys/dev/aic7xxx/aic7xxx.c
+1-22 files

FreeBSD/src cef3d54sys/dev/aic7xxx aic79xx_osm.c aic7xxx_osm.c

ahc(4)/ahd(4): fix target mode on ARM

One of the comments in ahc_execute_scb() notes that the CAM direction is
actually w.r.t. the initiator.  As a consequence, all of our sync ops
end up being wrong because the direction is flipped from that of the
transfer.  Fix it to do proper invalidation and avoid spewing random
garbage out on the SCSI bus.

Reported and tested by: HP van Braam <hp at tmm.cx>
Reviewed by:    imp, mav

(cherry picked from commit 9dcf39575efb2ff32f955d9e04e04af28d45d798)
DeltaFile
+21-14sys/dev/aic7xxx/aic79xx_osm.c
+21-14sys/dev/aic7xxx/aic7xxx_osm.c
+42-282 files

FreeBSD/src 60a4a85sys/dev/aic7xxx aic7xxx_inline.h aic7xxx.c

ahc(4): resolve some minor nits

In ahc_init(), qoutfifo is already assigned to effectively the same
value a couple lines up, except in the first assignment it uses the
proper definition; keep the more descriptive assignment.

ahc_targetcmd_offset() gets the offset wrong entirely; as per the
area of ahc_init() this diff also touches, targetcmds is laid out first
in the shared map and it's followed by the qoutfifo.  As a result, we'd
generally be getting negative offsets here.  We can't actually do a
partial sync anyways, so there was no consequence to getting this wrong.

Reviewed by:    imp, mav

(cherry picked from commit b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0)
DeltaFile
+1-1sys/dev/aic7xxx/aic7xxx_inline.h
+0-1sys/dev/aic7xxx/aic7xxx.c
+1-22 files

FreeBSD/src 7c3092esys/dev/aic7xxx aic79xx_osm.c aic7xxx_osm.c

ahc(4)/ahd(4): fix target mode on ARM

One of the comments in ahc_execute_scb() notes that the CAM direction is
actually w.r.t. the initiator.  As a consequence, all of our sync ops
end up being wrong because the direction is flipped from that of the
transfer.  Fix it to do proper invalidation and avoid spewing random
garbage out on the SCSI bus.

Reported and tested by: HP van Braam <hp at tmm.cx>
Reviewed by:    imp, mav

(cherry picked from commit 9dcf39575efb2ff32f955d9e04e04af28d45d798)
DeltaFile
+21-14sys/dev/aic7xxx/aic79xx_osm.c
+21-14sys/dev/aic7xxx/aic7xxx_osm.c
+42-282 files

FreeBSD/src c68eed8share/man/man9 accf_tls.9, sys/conf options

accf_tls: accept filter that waits for TLS handshake header
DeltaFile
+106-0sys/netinet/accf_tls.c
+95-0share/man/man9/accf_tls.9
+60-1tests/sys/kern/socket_accf.c
+7-0sys/modules/accf_tls/Makefile
+1-0sys/modules/Makefile
+1-0sys/conf/options
+270-13 files not shown
+273-19 files

FreeBSD/src c7a5881sys/dev/uart uart_bus_pci.c

Add support for Intel Atom S1200 UART

PR: 278316

Signed-off-by: Henrich Hartzer <henrichhartzer at tuta.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1164
(cherry picked from commit 1f2776e123603042944aad9f41ceb46b5b28d8ae)
DeltaFile
+2-0sys/dev/uart/uart_bus_pci.c
+2-01 files

FreeBSD/src 9857f82sys/tools arm_kernel_boothdr.awk

arm_kernel_bothdr.awk: Update to latest ota

The latest ota is the first one in FreeBSD that treats 0 + "0xf" as
being '0' instead of '15'. Don't use this old trick anymore to convert
from hexidecimal to a number. Write a function to do that instead. This
fixes kernel.bin building on arm*. awk on 14 doesn't need this, but to
build FreeBSD stable/14's kernel.bin on 15 we'll need it, so fast MFC.

MFC After:              3 days
Sponsored by:           Netflix
Reviewed by:            kevans
Differential Revision:  https://reviews.freebsd.org/D44801

(cherry picked from commit de22251127cd0e89ce1edb56c58b202496a97ba3)
DeltaFile
+10-4sys/tools/arm_kernel_boothdr.awk
+10-41 files

FreeBSD/src 99ec4fetools/tools/git mfc-candidates.sh

mfc-candidates: use stable/14 as default MFC-to branch

This tool is typically invoked from within a working tree containing the
desired MFC target branch, which is detected automatically.  It also has
a default for when it is invoked from elsewhere.  Switch the default to
the most recent branch, stable/14.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 76a8625bc71da3fa63eef5abb4782553d2588f5c)
DeltaFile
+1-1tools/tools/git/mfc-candidates.sh
+1-11 files

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