FreeBSD/src 37c9eba — contrib/llvm-project/clang/lib/CodeGen CGDebugInfo.cpp

Merge commit 80e8c0a59189 from llvm-project (by ShengYi Hung):

  [DebugInfo] Fill Column 0 if Line is not found (#227559)

  It is possible that user specified line 0 as the start of the line in C
  language (using `# 0`). However, it is rejected by the Lexer as we have
  no line but still carries column information. As a result, we fill
  column to 0 if we cannot find line.

  Assisted-by: Claude # Test
  Fixes: #56186

This fixes a fatal error when building the textproc/peg port.

PR:             264853
MFC after:      3 days
DeltaFile
+5-2contrib/llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp
+5-21 files

FreeBSD/src b69c008 — sys/netinet6 nd6.c

nd6: Fix regeneration of temp addresses in detached state

When an on-link prefix becomes detached, the kernel keeps
generating new RFC 8981 temporary addresses for that prefix.
Fix it by ignoring the detached addresses in regen_tmpaddr().
While here, change its return type to bool.

PR:             298533
Discussed with: markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D60051

(cherry picked from commit 61f98a98250da7bd2c80c6d93d0032961d7f2fad)
DeltaFile
+18-12sys/netinet6/nd6.c
+18-121 files

FreeBSD/src f05af59 — lib/libpfctl libpfctl.c, sys/netpfil/pf pf_nl.h pf_nl.c

pf: return per-address feedback from netlink table test

The PFNL_CMD_TABLE_TEST_ADDRS reply carries only the match count, so
the per-address feedback from pfr_tst_addrs() is lost:
"pfctl -v -T test" lists nothing and "pfctl -vv -T test" reports
every address as "nomatch".

Return each address, as updated by pfr_tst_addrs(), in a nested
PF_TAS_ADDR attribute, and decode them into the caller's array in
libpfctl.  PF_TA_ADDR is not reused: it shares its value with
PF_TAS_ASTATS, which older libpfctl would decode into an
uninitialised target.  That target was also read when no reply was
parsed, so the match count could be garbage; initialise it.

Add a regression test.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  281282e9357b ("pf: convert DIOCRTSTADDRS to netlink")

    [3 lines not shown]
DeltaFile
+55-0tests/sys/netpfil/pf/table.sh
+10-2lib/libpfctl/libpfctl.c
+4-0sys/netpfil/pf/pf_nl.c
+1-0sys/netpfil/pf/pf_nl.h
+70-24 files

FreeBSD/src 5c13a82 — sys/netpfil/pf pf_ioctl.c

pf: remove a source limiter from the id tree if its name is taken

When pf_sourcelim_add() finds the name of the new limiter taken, it
undoes the insertion into the id tree with RB_REMOVE() on the name tree,
which the limiter is not in, and then frees the limiter.  The freed
limiter stays in the inactive id tree, and RB_REMOVE() of an element
with no links clears the root of the name tree, which loses every other
inactive limiter from it.  pf_statelim_add() gets this right.

parse.y refuses duplicate names, so pfctl does not get here, but any
netlink client can.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  461648121230 ("pf: introduce source and state limiters")
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60189
DeltaFile
+1-1sys/netpfil/pf/pf_ioctl.c
+1-11 files

FreeBSD/src 2fa4ef4 — sys/netpfil/pf pf_ioctl.c

pf: free the packet rate counter of a rule

pf_ioctl_addrule() allocates a counter_rate for every rule, whether it
has a max-pkt-rate or not, and pf_krule_free() never frees it.

Free it with the rest of the rule.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  ff11f1c8c76c ("pf: add a generic packet rate matching filter")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60190
DeltaFile
+1-0sys/netpfil/pf/pf_ioctl.c
+1-01 files

FreeBSD/src 566fdcb — share/man/man4 Makefile

man: Link ena.4 to if_ena.4

For consistency, create a symbolic link from ena.4 to also if_ena.4

Reviewed by:            #manpages, ziaee
Differential Revision:  https://reviews.freebsd.org/D60191
MFC after:              3 days
DeltaFile
+1-0share/man/man4/Makefile
+1-01 files

FreeBSD/src fc6ed86 — sys/contrib/openzfs/cmd/zinject translate.c, sys/contrib/openzfs/cmd/zpool zpool_main.c

zfs: cherry-pick from openzfs/master (restore reverted commit)

zpool: Add zpool status -vv error ranges (#17864)

Add necessery change to libzfs/Makefile

(cherry picked from commit e903655c50fe2e710a4cdfe6e638454012ef6324)
DeltaFile
+292-25sys/contrib/openzfs/lib/libzfs/libzfs_pool.c
+186-55sys/contrib/openzfs/cmd/zpool/zpool_main.c
+173-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_-v.ksh
+75-4sys/contrib/openzfs/cmd/zinject/translate.c
+46-3sys/contrib/openzfs/module/zfs/zfs_znode.c
+23-1sys/contrib/openzfs/module/zfs/zfs_ioctl.c
+795-8812 files not shown
+892-9818 files

FreeBSD/src ab9fcc5 — sys/arm/include ifunc.h, sys/arm64/include ifunc.h

ifuncs: Have DEFINE_*IFUNC() macros expand the passed name

While here, make each <machine/ifunc.h> header include <sys/types.h> so
that it can be included standalone.

Reviewed by:    kib
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60167
DeltaFile
+12-7sys/riscv/include/ifunc.h
+11-7sys/x86/include/ifunc.h
+11-7sys/arm/include/ifunc.h
+10-6sys/arm64/include/ifunc.h
+8-6sys/powerpc/include/ifunc.h
+52-335 files

FreeBSD/src 1fadced — usr.bin/sdiff sdiff.c sdiff.1

sdiff.1: Document exit status and --help

MFC after:      3 days
Approved by:    bnovkov (mentor)
Sponsored by:   fme AG
Differential Revision:  https://reviews.freebsd.org/D59927

(cherry picked from commit 14c7492637ec0644b5bb88da114e8cc76b9bf629)
DeltaFile
+22-1usr.bin/sdiff/sdiff.1
+1-0usr.bin/sdiff/sdiff.c
+23-12 files

FreeBSD/src 2670aa4 — usr.bin/sdiff sdiff.c sdiff.1

sdiff.1: Document exit status and --help

MFC after:      3 days
Approved by:    bnovkov (mentor)
Sponsored by:   fme AG
Differential Revision:  https://reviews.freebsd.org/D59927

(cherry picked from commit 14c7492637ec0644b5bb88da114e8cc76b9bf629)
DeltaFile
+22-1usr.bin/sdiff/sdiff.1
+1-0usr.bin/sdiff/sdiff.c
+23-12 files

FreeBSD/src a9103f8 — 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.


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

FreeBSD/src f3a4211 — contrib/lutok aclocal.m4 configure, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: update from 0.4 to 0.6.2

More information about what's included in the new release can be found
[here](https://github.com/freebsd/lutok/compare/lutok-0.4...lutok-0.6.2).

MFC after:      1 week
Merge commit '447d4fe61d8bf55ffa21698ecee0ac51010a9a0f'

(cherry picked from commit 132f818ddbf457ee67d502cd89b5a18e0a34713d)
DeltaFile
+23,387-0contrib/lutok/configure
+11,524-0contrib/lutok/admin/ltmain.sh
+8,488-0contrib/lutok/m4/libtool.m4
+2,007-0contrib/lutok/api-docs/html/doxygen.css
+1,802-0contrib/lutok/admin/config.sub
+1,733-0contrib/lutok/aclocal.m4
+48,941-0190 files not shown
+68,466-701196 files

FreeBSD/src c09c4b1 — contrib/lutok Makefile.in aclocal.m4, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: remove autotools generated files

These files provide no value in the FreeBSD tree proper and change
frequently, depending on what machine I generate the release tarball on
(and what versions of autotools are on the host). Nuke the autogenerated
files to avoid bloating commit history/the tree.

MFC after:      3 days
Requested by:   Benjamin Jacobs <freebsd at dev.thsi.be>

(cherry picked from commit cfe443e1e63dd588fba7eabec553ed5e1c408d1f)
DeltaFile
+0-23,387contrib/lutok/configure
+0-11,524contrib/lutok/admin/ltmain.sh
+0-8,488contrib/lutok/m4/libtool.m4
+0-1,802contrib/lutok/admin/config.sub
+0-1,733contrib/lutok/aclocal.m4
+0-1,574contrib/lutok/Makefile.in
+0-48,5089 files not shown
+0-52,77715 files

FreeBSD/src 16c0b57 — contrib/lutok Makefile.in aclocal.m4, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: remove autotools generated files

These files provide no value in the FreeBSD tree proper and change
frequently, depending on what machine I generate the release tarball on
(and what versions of autotools are on the host). Nuke the autogenerated
files to avoid bloating commit history/the tree.

MFC after:      3 days
Requested by:   Benjamin Jacobs <freebsd at dev.thsi.be>

(cherry picked from commit cfe443e1e63dd588fba7eabec553ed5e1c408d1f)
DeltaFile
+0-23,387contrib/lutok/configure
+0-11,524contrib/lutok/admin/ltmain.sh
+0-8,488contrib/lutok/m4/libtool.m4
+0-1,802contrib/lutok/admin/config.sub
+0-1,733contrib/lutok/aclocal.m4
+0-1,574contrib/lutok/Makefile.in
+0-48,5089 files not shown
+0-52,77715 files

FreeBSD/src 6dcc931 — contrib/lutok aclocal.m4 configure, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: update from 0.4 to 0.6.2

More information about what's included in the new release can be found
[here](https://github.com/freebsd/lutok/compare/lutok-0.4...lutok-0.6.2).

MFC after:      1 week
Merge commit '447d4fe61d8bf55ffa21698ecee0ac51010a9a0f'

(cherry picked from commit 132f818ddbf457ee67d502cd89b5a18e0a34713d)
DeltaFile
+23,387-0contrib/lutok/configure
+11,524-0contrib/lutok/admin/ltmain.sh
+8,488-0contrib/lutok/m4/libtool.m4
+2,007-0contrib/lutok/api-docs/html/doxygen.css
+1,802-0contrib/lutok/admin/config.sub
+1,733-0contrib/lutok/aclocal.m4
+48,941-0190 files not shown
+68,466-701196 files

FreeBSD/src a319010 — secure/lib/libcrypto/man/man3 SSL_CTX_set_security_level.3 ENGINE_add.3, secure/lib/libcrypto/man/man5 fips_config.5 config.5

crypto/openssl: update generated files to match 3.5.9 release content

A new manpage has been added and some source files have been refactored
slightly, but by and large this is just a standard "version bump" update
(3.5.8 -> 3.5.9).

MFC after:      1 day
MFC with:       b3a31d78

(cherry picked from commit be0569f12f48fe414467cf9cba8627e439ca1cd4)
DeltaFile
+107-0secure/lib/libcrypto/man/man3/X509V3_EXT_nconf_nid.3
+46-49secure/lib/libcrypto/man/man3/ENGINE_add.3
+83-11secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3
+31-34secure/lib/libcrypto/man/man7/EVP_PKEY-EC.7
+31-34secure/lib/libcrypto/man/man5/config.5
+30-33secure/lib/libcrypto/man/man5/fips_config.5
+328-161904 files not shown
+4,295-6,061910 files

FreeBSD/src b97734d — crypto/openssl/test/recipes/10-test_bn_data bngcd.txt, crypto/openssl/test/recipes/30-test_evp_data evppkey_ecc.txt evpkdf_ssh.txt

crypto/openssl: update to 3.5.9

This is a security fix release addressing CVE High issues. Users are
strongly encouraged to update to this version.

See the release notes for the release for more details on what is being
fixed.

MFC after:      1 day
Merge commit 'af5a659dc1cd2b0a6994f2cee1956d0bf50bb1a2'

(cherry picked from commit f9bc005b8ef3b507a5ecbc2d7fe4411ef70eff38)
DeltaFile
+0-23,927crypto/openssl/test/recipes/30-test_evp_data/evpciph_aes_ccm_cavs.txt
+0-17,330crypto/openssl/test/recipes/10-test_bn_data/bngcd.txt
+0-11,686crypto/openssl/test/recipes/30-test_evp_data/evppkey_kas.txt
+0-5,037crypto/openssl/test/recipes/30-test_evp_data/evpkdf_tls13_kdf.txt
+0-4,943crypto/openssl/test/recipes/30-test_evp_data/evpkdf_ssh.txt
+0-4,563crypto/openssl/test/recipes/30-test_evp_data/evppkey_ecc.txt
+0-67,4861,248 files not shown
+10,203-197,9121,254 files

FreeBSD/src 220e946 — share/man/man4 asmc.4

asmc.4: clean up/modernize manpage

- sysutils/ataidle is no more: it was superseded by camcontrol(8).
- Sort the models table alphabetically.
- Use the SPDX License ID instead of the longhand licensing tort in the
  manpage header.
- Note that the driver has been heavily modified in 15.1 and later to
  support additional platforms and functionality.
- Trim down SYNOPSIS.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D59470

(cherry picked from commit 7a039603a49db09fa574b4365ba36c92b7658868)
DeltaFile
+46-70share/man/man4/asmc.4
+46-701 files

FreeBSD/src 98329e2 — share/man/man4 asmc.4

asmc.4: clean up/modernize manpage

- sysutils/ataidle is no more: it was superseded by camcontrol(8).
- Sort the models table alphabetically.
- Use the SPDX License ID instead of the longhand licensing tort in the
  manpage header.
- Note that the driver has been heavily modified in 15.1 and later to
  support additional platforms and functionality.
- Trim down SYNOPSIS.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D59470

(cherry picked from commit 7a039603a49db09fa574b4365ba36c92b7658868)
DeltaFile
+46-70share/man/man4/asmc.4
+46-701 files

FreeBSD/src 56a4abe — 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.


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

FreeBSD/src 6d7f016 — sys/netpfil/pf pf_nl.c

pf: take the rules read lock in pf_handle_getrule()

pfctl -sr calls PFNL_CMD_GETRULE once per rule, and
pf_handle_getrule() takes the rules write lock each time, so listing a
ruleset of N rules stops packet processing N times. Only zeroing the
counters (pfctl -z) needs the write lock. Take the read lock
otherwise, as DIOCGETRULENV does.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  777a4702c591 ("pf: implement addrule via netlink")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60161
DeltaFile
+20-6sys/netpfil/pf/pf_nl.c
+20-61 files

FreeBSD/src 82ab4ad — sys/netpfil/pf pf.c

pf: leave the epoch to purge unlinked rules

pf_purge_thread() calls pf_purge_unlinked_rules() in the network
epoch, where sleeping is not allowed, and it takes pf_config_lock, an
sx lock. If a rule is being added at the time, the purge thread
can sleep on the lock, which panics with INVARIANTS.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  f92d9b1aad73 ("pflow: import from OpenBSD")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60160
DeltaFile
+6-0sys/netpfil/pf/pf.c
+6-01 files

FreeBSD/src be7e57f — sys/netpfil/pf pf_nl.c

pf: free an unparsed rule with pf_krule_free() in pf_handle_addrule()

When the PFNL_CMD_ADDRULE message fails to parse, pf_handle_addrule()
frees the rule with pf_free_rule(), which asserts the rules and config
locks (neither is held) and releases references that
pf_ioctl_addrule() has not taken yet. With INVARIANTS this panics on
any parse error; without, a rule address parsed as PF_ADDR_TABLE makes
pfr_detach_table() dereference NULL.

Use pf_krule_free(), as the ioctl paths do.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  e249f5daa41f ("pf: fix memory leak on rule add parse failure")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60104
DeltaFile
+1-1sys/netpfil/pf/pf_nl.c
+1-11 files

FreeBSD/src 55a69b9 — lib/libpfctl libpfctl.c, sbin/pfctl pfctl_radix.c

libpfctl: zero the counters before summing per-chunk results

The chunked table address functions (set, add, del, clr_astats) add
each chunk's result to the caller's counter without initialising it.
pfctl reuses nadd for the number of tables created, so a replace that
also creates the table is off by one:

pfctl -t foo -T replace 192.0.2.1

reports "2 addresses added".

Zero the counters first, as pfctl_test_addrs() already does. Remove
the workaround for the add case from pfctl (da64f6e047b5), which is
no longer needed.

Add a regression test.

Reviewed by:            kp
Approved by:            kp (mentor)

    [4 lines not shown]
DeltaFile
+38-0tests/sys/netpfil/pf/table.sh
+16-0lib/libpfctl/libpfctl.c
+0-3sbin/pfctl/pfctl_radix.c
+54-33 files

FreeBSD/src c1241c6 — sys/netpfil/pf pf_if.c pf.c

pf: modify pfik_flags atomically

The purge thread sets PFI_IFLAG_REFS on the interfaces that states
refer to without the rules lock, under which the other flags are
changed. The updates can interleave, so that a "set skip on" is lost,
or outlives its removal, until the next ruleset load.

Use atomic operations to modify the flags. In the purge thread, only
write if the flag is not already set.

Reviewed by:            kp
Approved by:            kp (mentor)
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60107
DeltaFile
+10-2sys/netpfil/pf/pf.c
+5-5sys/netpfil/pf/pf_if.c
+15-72 files

FreeBSD/src 3171a60 — sbin/pfctl pfctl_parser.c, sbin/pfctl/tests pfctl_test_list.inc

pfctl: print "pass" on nat/rdr/binat rules again

c2d03a920ec7 rewrote the action printing in print_rule() from OpenBSD,
which has no natpass, and dropped the "pass" keyword.  A ruleset
loaded from "pfctl -sn" output therefore lost its nat-pass semantics.

Add a parser test covering nat, rdr, rdr log and binat with pass.

Reviewed by:            kp
Approved by:            kp (mentor)
Fixes:                  c2d03a920ec7 ("pfctl: fix anchortypes bounds test")
MFC after:              1 week
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60183
DeltaFile
+4-1sbin/pfctl/pfctl_parser.c
+5-0sbin/pfctl/tests/files/pf1080.ok
+5-0sbin/pfctl/tests/files/pf1080.in
+1-0sbin/pfctl/tests/pfctl_test_list.inc
+15-14 files

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

VFS: style

(cherry picked from commit e40c72c823c6502906d4024933f0c119b5ca17cf)
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 c363f72 — sys/fs/cd9660 cd9660_vfsops.c, sys/fs/ext2fs ext2_vfsops.c

filesystems: use g_vfs_close_unlocked(9)

(cherry picked from commit 53edaad235c86e4426e97d63be48f0160bcc5267)
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 592ed51 — sys/kern vnode_if.src vfs_subr.c

VFS: require locked vnode for fsync()

(cherry picked from commit 30ad8440b46838b050360ed87e6165a067f1cf8a)
DeltaFile
+8-12sys/kern/vfs_subr.c
+1-1sys/kern/vnode_if.src
+9-132 files

FreeBSD/src 4302877 — sys/geom geom_vfs.h geom_vfs.c

g_vfs_close_unlocked(9): wrapper around g_vfs_close(9)

(cherry picked from commit 87962e08fa18797103c96c17fd8c88ada056e0c0)
DeltaFile
+13-0sys/geom/geom_vfs.c
+3-1sys/geom/geom_vfs.h
+16-12 files