FreeBSD/src c8282c0usr.bin/grep zgrep.sh, usr.bin/grep/tests grep_freebsd_test.sh

Fix zgrep(1) wrapper regression, add test

@bdrewery reported D48873 broke "bzgrep -q '1 2' /var/log/messages.0.bz2"
The mistake was in using $* instead of "$@" (I suspect $* is never right).

Reported by:    bdrewery
Reviewed by:    markj
Approved by:    markj
Fixes:          1070477cc8b7 ("Fix remaining zgrep(1) wrapper script regressions")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54217

(cherry picked from commit 80726c2257e9d6d79341aac65ba22987f53619bc)
DeltaFile
+10-0usr.bin/grep/tests/grep_freebsd_test.sh
+1-1usr.bin/grep/zgrep.sh
+11-12 files

FreeBSD/src 4706a2bcontrib/netbsd-tests/usr.bin/grep t_grep.sh, usr.bin/grep zgrep.sh

Fix remaining zgrep(1) wrapper script regressions

Summary:
Fix short flags without whitespace, e.g:

    zgrep -wefoo test

Fix multiple -e flags:

    zgrep -e foo -e xxx test

Previously only the last pattern would be used.

Clean up possible leading blank in ${grep_args}.

Update comment: 2.51 -> 2.6.0

Add a test case for the last known zgrep wrapper issue: recursion
(-r) not implemented.

    [6 lines not shown]
DeltaFile
+45-7usr.bin/grep/zgrep.sh
+20-4contrib/netbsd-tests/usr.bin/grep/t_grep.sh
+65-112 files

FreeBSD/src 88b0463contrib/libpcap pcap-bpf.c

libpcap: fix resource leaks and set error messages

In finddevs_bpf() close the BPF device descriptor and free the device list
buffer before returning.

For ioctl() and malloc() errors, use pcapint_fmt_errmsg_for_errno() to
generate an error message.

Fix some comments.

(cherry picked from commit 6870404f35da32d63a0a8789edb010842dd6b208)
DeltaFile
+37-7contrib/libpcap/pcap-bpf.c
+37-71 files

FreeBSD/src 0bd0c32sys/net if_ethersubr.c if.c, sys/netgraph ng_ether.c

ng_ether: refactor to use interface EVENTHANDLER(9)s
DeltaFile
+64-77sys/netgraph/ng_ether.c
+0-32sys/net/if_ethersubr.c
+0-5sys/net/if.c
+0-4sys/net/ethernet.h
+0-2sys/net/if_bridge.c
+64-1205 files

FreeBSD/src b275907sys/net if_tuntap.c

if_tuntap: use ifnet_rename_event instead of ifnet_arrival_event
DeltaFile
+6-12sys/net/if_tuntap.c
+6-121 files

FreeBSD/src 349fcf0sys/compat/linsysfs linsysfs_net.c, sys/net rtsock.c if_var.h

net: add ifnet_rename_event EVENTHANDLER(9) for interface renaming

and don't trigger ifnet_arrival_event and ifnet_departure_event for a
rename, as the interface isn't being detached from any protocol.  The
consumers of the arrival/departure events are divided into a few
categories:
- which indeed need to do the same actions as if interface was fully
  detached and attached: routing socket and netlink notifications to
  userland and the Linux sysfs.  All addressed by this commit.
- which build their logic based on an interface name, but should actually
  update their database on rename: packet filters.  This commit leaves
  them with the old behavior - emulate full detach & attach, but this
  should be improved.
- which shouldn't do anything on rename, not touched by the commit.
- ng_ether and if_tuntap, that are special and will be addressed by
  separate commits.
DeltaFile
+31-18sys/netpfil/ipfw/ip_fw_iface.c
+25-11sys/netlink/route/iface.c
+19-9sys/net/rtsock.c
+14-1sys/compat/linsysfs/linsysfs_net.c
+12-0sys/netpfil/pf/pf_if.c
+8-3sys/net/if_var.h
+109-422 files not shown
+118-458 files

FreeBSD/src 77939d6sys/net if.c

net: on interface detach purge multicast addresses after protocols

We first want to give a chance to all owners of multicast addresses to
free them and only then run through the list of remaining ones.  It might
be that no addresses remain there normally, but this needs to be analyzed
deeper.  For now restore the sequence that was before 0d469d23715d to fix
a possible use after free.

Fixes:  0d469d23715d690b863787ebfa51529e1f6a9092
DeltaFile
+1-2sys/net/if.c
+1-21 files

FreeBSD/src 129e15dsys/netpfil/ipfw ip_fw_bpf.c

ipfw: fix bpf tap point lookup

The trick I blindly used works for pointers to structs, but not for rule
numbers that can differ only by 1.

PR:     291854
Fixes:  3daae1ac1d82ecdcd855101bab5206e914b12350
DeltaFile
+2-2sys/netpfil/ipfw/ip_fw_bpf.c
+2-21 files

FreeBSD/src e3d6cf8sys/netpfil/pf pf_if.c

pf: make eventhandler_tag's static

No functional change.
DeltaFile
+6-6sys/netpfil/pf/pf_if.c
+6-61 files

FreeBSD/src 725f4b1sys/kern vfs_bio.c

geom(9): unset the BIO_ERROR_COMPAT flag correctly

Fixes:          112c453ba910
Approved by:    re (cperciva)
DeltaFile
+2-2sys/kern/vfs_bio.c
+2-21 files

FreeBSD/src 0e724desys/fs/nfs nfs_var.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clvnops.c

nfscl: Add some support for POSIX draft ACLs

An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the fourth of several patches that implement the
above draft.

There should be no semantics change for the series at
this point.

Fixes:  a35bbd5d9f5f ("nfscommon: Add some support for POSIX draft ACLs")
DeltaFile
+53-16sys/fs/nfsclient/nfs_clrpcops.c
+45-15sys/fs/nfsclient/nfs_clvnops.c
+7-5sys/fs/nfs/nfs_var.h
+105-363 files

FreeBSD/src 3ab741ausr.bin/grep zgrep.sh, usr.bin/grep/tests grep_freebsd_test.sh

Fix zgrep(1) wrapper regression, add test

@bdrewery reported D48873 broke "bzgrep -q '1 2' /var/log/messages.0.bz2"
The mistake was in using $* instead of "$@" (I suspect $* is never right).

Reported by:    bdrewery
Reviewed by:    markj
Approved by:    markj
Fixes:          1070477cc8b7 ("Fix remaining zgrep(1) wrapper script regressions")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54217

(cherry picked from commit 80726c2257e9d6d79341aac65ba22987f53619bc)
DeltaFile
+10-0usr.bin/grep/tests/grep_freebsd_test.sh
+1-1usr.bin/grep/zgrep.sh
+11-12 files

FreeBSD/src 949cff4sys/fs/nfs nfs_commonsubs.c nfs_commonacl.c

nfscommon: Add some support for POSIX draft ACLs

An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the third of several patches that implement the
above draft.

There should be no semantics change for the series at
this point.

Fixes:  a35bbd5d9f5f ("nfscommon: Add some support for POSIX draft ACLs")
DeltaFile
+249-23sys/fs/nfs/nfs_commonsubs.c
+193-2sys/fs/nfs/nfs_commonacl.c
+3-0sys/fs/nfs/nfs_var.h
+445-253 files

FreeBSD/src 112c453sys/geom geom_io.c, sys/kern vfs_bio.c

geom(9): struct bio KBI fix

The struct bio was changed after cb85c2e2e995 on the branch. To fix
this, move BIO_ERROR flag to another value, and now BIO_ERROR_COMPAT
occupies 0x1 instead. Also, introduce b_error_compat field at the place
where the old bio_error was.

This allows non-CAM(9) disk drivers and software volume manager modules
compiled against 15.0-RELEASE kernel to work on 15-STABLE kernel again.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D54327

Approved by:    re (cperciva)
DeltaFile
+20-1sys/kern/vfs_bio.c
+3-1sys/sys/bio.h
+1-0sys/geom/geom_io.c
+24-23 files

FreeBSD/src 762f11d. ChangeLog THANKS, src/common my_landlock.h

Vendor import of xz 5.8.2 (trimmed)
DeltaFile
+1,586-0ChangeLog
+226-208THANKS
+34-45src/liblzma/common/stream_decoder_mt.c
+72-0src/xz/hardware.c
+44-1src/common/my_landlock.h
+18-20src/liblzma/api/lzma/container.h
+1,980-27426 files not shown
+2,079-33932 files

FreeBSD/src 8e3fd45sys/fs/nfs nfs_var.h, sys/fs/nfsserver nfs_nfsdserv.c nfs_nfsdport.c

nfsd: Add some support for POSIX draft ACLs

An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the second of several patches that implement the
above draft.

The only semantics change would be if you have exported
a UFS file system mounted with the "acl" option.
In that case, you would see the acl attribute supported.
This is bogus, but will be handled in the next commit.

Fixes:  a35bbd5d9f5f ("nfscommon: Add some support for POSIX draft ACLs")
DeltaFile
+64-22sys/fs/nfsserver/nfs_nfsdserv.c
+72-12sys/fs/nfsserver/nfs_nfsdport.c
+28-10sys/fs/nfsserver/nfs_nfsdsubs.c
+8-7sys/fs/nfs/nfs_var.h
+172-514 files

FreeBSD/src a35bbd5sys/fs/nfs nfsproto.h nfs_commonport.c

nfscommon: Add some support for POSIX draft ACLs

An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the first of several patches that implement the
above draft.

This patch should not result in a semantics change.
DeltaFile
+29-1sys/fs/nfs/nfsproto.h
+20-0sys/fs/nfs/nfs_commonport.c
+5-0sys/fs/nfs/nfs.h
+2-0sys/fs/nfs/nfs_var.h
+56-14 files

FreeBSD/src 95788a8sys/vm vm_fault.c

vm_fault_trap(): fix comments grammar

Submitted and reviewed by:      alc
Fixes:  22cce201da76a1916be5c993201f0478f3048292
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D54335
DeltaFile
+6-6sys/vm/vm_fault.c
+6-61 files

FreeBSD/src 823ebd7lib/libpfctl libpfctl.c libpfctl.h, sbin/pfctl pfctl.c

libpfctl: export a get states variant that takes a pfctl_handle

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+11-11lib/libpfctl/libpfctl.c
+1-1sbin/pfctl/pfctl.c
+1-0lib/libpfctl/libpfctl.h
+13-123 files

FreeBSD/src 622d7fasys/netpfil/pf pf.h

pf: fix pcounters array size

It's a 2 * 2 * 2, not 2 * 2 * 3. We only use PF_DROP and PF_PASS, so two
rows suffices.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/netpfil/pf/pf.h
+1-11 files

FreeBSD/src 4d69206sys/kern uipc_ktls.c, sys/sys ktls.h

ktls: Capture initial tls seqno at time offload is initiated

Some drivers want the TLS seqno when offload starts. Capture this
for them by adding a union for initial_seqno, sharing space with
the TLS 1.0 next_seqno.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54275
MFC After: 1 month
DeltaFile
+6-3sys/sys/ktls.h
+3-0sys/kern/uipc_ktls.c
+9-32 files

FreeBSD/src 43d7ee5sys/net iflib.c iflib.h

iflib: support for transmit side nic KTLS offload

This change adds support to iflib for drivers that want to do
transmit-side NIC ktls offload. This change does 2 things:

1) Extends the pkt info to include an optional mbuf pointer.

This gives drivers the ability to find the start of a TLS record if
they need to re-DMA part of the record to re-construct TLS state on
the NIC. This mbuf pointer is only passed when CSUM_SND_TAG is
present on the pkthdr. Note that I don't bother to inspect the send
tag on purpose; this will only be present for TLS offloaded or paced
connections

2) Allows the driver to specify how much ring padding is needed
   before the ring is considered to be full using the new isc_tx_pad
   field in if_softc_ctx.

This re-uses a field that was marked spare in 2019 via d49e83eac3baf.

    [11 lines not shown]
DeltaFile
+19-12sys/net/iflib.c
+3-2sys/net/iflib.h
+22-142 files

FreeBSD/src 84a265dshare/man/man9 vmem.9

vmem.9: provide a reference to libuvmem(3)

(cherry picked from commit 5c1d9df10b78f8d2e13e16f5db2e4542f582aebd)
DeltaFile
+3-0share/man/man9/vmem.9
+3-01 files

FreeBSD/src 117306dsys/netinet6 in6_ifattach.c

in6_ifattach: include sys/eventhandler.h to unbreak NOVIMAGE builds

LINT-NOVIMAGE fails to build due to a missing eventhandler.h include
which in hte VIMAGE case is likely leaked through some other header.
Add the #include to unbreak the build.

Fixes:  0d469d23715d6 (net: attach IPv4 and IPv6 stacks to an ...)
DeltaFile
+1-0sys/netinet6/in6_ifattach.c
+1-01 files

FreeBSD/src 27cb261sys/powerpc/powerpc intr_machdep.c

powerpc/intr: Minor cleanup

Use MTX_SYSINIT() instead of rolling our own.
DeltaFile
+1-7sys/powerpc/powerpc/intr_machdep.c
+1-71 files

FreeBSD/src dd5a48fusr.sbin/fwget/pci pci_video_amd

fwget: Add Navi 33 support

Tested on a RX7600

MFC After:      3 days
DeltaFile
+8-0usr.sbin/fwget/pci/pci_video_amd
+8-01 files

FreeBSD/src f954e59tests/ci Makefile, tests/ci/tools freebsdci

tests/ci: Collect environment information

For reproducing errors or test results it is important to gather
environment information. These environments are divided into two parts.
One part is in which environment the artifacts were built into and the
second part is in which environment the tests were run.

This patch collects thesee information and saves into a .env file in
the metadir. After this patch lands we will also need to change our
jenkins job where we are uploading the artifact to a central location.
This environment file should also be stored along with the artifact.
For easier location the image basename and the environment basename are
kept same.

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

(cherry picked from commit 14d5c13a89269862b51ef2a7f190b0d28cfbf8a2)
DeltaFile
+35-22tests/ci/tools/freebsdci
+42-1tests/ci/Makefile
+77-232 files

FreeBSD/src 2011380contrib/netbsd-tests/usr.sbin/mtree t_mtree.sh

mtree: tests: Import NetBSD's mtree test suite

Manually import latest mtree test suite from NetBSD.

MFC after:      1 week

(cherry picked from commit 2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d)
DeltaFile
+39-1contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
+39-11 files

FreeBSD/src 23d971acontrib/mtree spec.c compare.c

mtree: Fix typos

Manually apply a typo fix.  This change has already been submitted
upstream as bin/59824.

MFC after:      1 week

(cherry picked from commit dab5daf54cc26aaf2679a2eda5f378461f279ec5)
DeltaFile
+1-1contrib/mtree/spec.c
+1-1contrib/mtree/compare.c
+2-22 files

FreeBSD/src a3b349econtrib/mtree create.c mtree.8

Import latest mtree from NetBSD

Merge commit 'f600477feb4ae61a75f61949eb600caff4aeea8c'

MFC after:      1 week
Discussed with: brooks

(cherry picked from commit 49b6dda4d71175ad615718401573be5fd024822b)
DeltaFile
+60-84contrib/mtree/create.c
+108-31contrib/mtree/mtree.8
+36-8contrib/mtree/spec.c
+24-15contrib/mtree/compare.c
+10-10contrib/mtree/crc.c
+12-5contrib/mtree/verify.c
+250-1534 files not shown
+271-16710 files