FreeBSD/src df4e99bcontrib/libarchive/libarchive archive_read_support_format_mtree.c archive_read_support_filter_uu.c, contrib/libarchive/tar subst.c

libarchive: merge from vendor branch

libarchive 3.8.5

Important bugfixes:
 #2809 bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix

Obtained from:  libarchive
Vendor commit:  dd897a78c662a2c7a003e7ec158cea7909557bee
MFC after:      1 week

(cherry picked from commit 4b047c3af3fec1607ba1cfe04e1d442a17fc1cf6)
DeltaFile
+16-3contrib/libarchive/test_utils/test_main.c
+8-8contrib/libarchive/tar/subst.c
+6-6contrib/libarchive/libarchive/archive_read_support_format_mtree.c
+4-4contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+1-5contrib/libarchive/libarchive/archive_write_open_memory.c
+1-5contrib/libarchive/libarchive/archive_write_open_fd.c
+36-3118 files not shown
+67-6024 files

FreeBSD/src ca5d4e7contrib/libarchive/libarchive archive_read_support_filter_lz4.c archive_read_support_filter_zstd.c, contrib/libarchive/libarchive/test test_compat_lz4_skippable_frames_B4.tar.lz4.uu test_read_format_7zip_issue2765.c

libarchive: merge from vendor branch

libarchive 3.8.3

Important bugfixes:
 #2753 lib: Create temporary files in the target directory
 #2768 lha: Fix for an out-of-bounds buffer overrun when using
       p[H_LEVEL_OFFSET]
 #2769 7-zip: Fix a buffer overrun when reading truncated 7zip headers
 #2771 lz4 and zstd: Support both lz4 and zstd data with leading
       skippable frames

Obtained from:  libarchive
Vendor commit:  1368b08875351df8aa268237b882c8f4ceb0882d
MFC after:      1 week

(cherry picked from commit 007679a138089676aadc9a712277f4004403b905)
DeltaFile
+6,739-0contrib/libarchive/libarchive/test/test_compat_lz4_skippable_frames_B4.tar.lz4.uu
+70-14contrib/libarchive/libarchive/archive_read_support_filter_lz4.c
+55-12contrib/libarchive/libarchive/archive_read_support_filter_zstd.c
+51-0contrib/libarchive/libarchive/test/test_read_format_7zip_issue2765.c
+38-0contrib/libarchive/libarchive/test/test_archive_string.c
+34-0contrib/libarchive/libarchive/module.modulemap
+6,987-2620 files not shown
+7,110-6126 files

FreeBSD/src b9bf082contrib/libarchive NEWS, contrib/libarchive/libarchive archive_read_disk_posix.c archive_write_set_format_xar.c

libarchive: merge from vendor branch

libarchive 3.8.4

Important bugfixes:
     #2787 bsdtar: Fix zero-length pattern issue
     #2797 lib: Fix regression introduced in libarchive 3.8.2
                when walking enterable but unreadable directories

Obtained from:  libarchive
Vendor commit:  d114ceee6de08a7a60ff1209492ba38bf9436f79
MFC after:      1 week

(cherry picked from commit c1e033c33e8b290cd40f4069249c879efcbae6a6)
DeltaFile
+11-14contrib/libarchive/libarchive/archive_read_disk_posix.c
+12-7contrib/libarchive/tar/subst.c
+6-6contrib/libarchive/libarchive/archive_write_set_format_xar.c
+5-3contrib/libarchive/NEWS
+7-1contrib/libarchive/tar/test/test_option_s.c
+3-3contrib/libarchive/libarchive/archive_write_disk_posix.c
+44-3411 files not shown
+63-5317 files

FreeBSD/src 506203ausr.sbin/makefs makefs.8

makefs.8: Cleanup man page

Reviewed by:    ziaee
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54538

(cherry picked from commit 12c51484188f88bcabc5b38ca8523fcde76830a6)
DeltaFile
+5-4usr.sbin/makefs/makefs.8
+5-41 files

FreeBSD/src 70db1cdusr.sbin/makefs/msdos msdosfs_vfsops.c

makefs: Fix typo 's/mirrorring/mirroring/'

MFC after:      1 week

(cherry picked from commit 73af599fb7be6806b553ac6f470d76711b74286c)
DeltaFile
+1-1usr.sbin/makefs/msdos/msdosfs_vfsops.c
+1-11 files

FreeBSD/src 6434137usr.sbin/makefs/msdos msdosfs_vfsops.c

makefs: Fix typo 's/mirrorring/mirroring/'

MFC after:      1 week

(cherry picked from commit 73af599fb7be6806b553ac6f470d76711b74286c)
DeltaFile
+1-1usr.sbin/makefs/msdos/msdosfs_vfsops.c
+1-11 files

FreeBSD/src 5f53e65usr.sbin/makefs makefs.8

makefs.8: Cleanup man page

Reviewed by:    ziaee
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54538

(cherry picked from commit 12c51484188f88bcabc5b38ca8523fcde76830a6)
DeltaFile
+5-4usr.sbin/makefs/makefs.8
+5-41 files

FreeBSD/src 2bcc556usr.sbin/makefs/msdos msdosfs_vfsops.c

makefs: Fix typo 's/mirrorring/mirroring/'

MFC after:      1 week

(cherry picked from commit 73af599fb7be6806b553ac6f470d76711b74286c)
DeltaFile
+1-1usr.sbin/makefs/msdos/msdosfs_vfsops.c
+1-11 files

FreeBSD/src 99d4a01usr.sbin/makefs/tests makefs_msdos_tests.sh makefs_ffs_tests.sh

makefs: tests: Fix timestamp-related tests

Use a variable for mtree that includes the DEFAULT_MTREE_KEYWORDS, in
order to avoid missing the important "time" keyword or passing an
unimplemented "nlink" keyword.

Unskip the "failing" tests, and comment out the specific failing checks,
these will be addressed (or at least discussed) in a different revision.

For MS-DOS tests, use an even value timestamp, as precision is 2s.

For ZFS tests, use import_image instead of mount_image consistently.

Reviewed by:    bnovkov, markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54429

(cherry picked from commit 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1)
DeltaFile
+8-11usr.sbin/makefs/tests/makefs_msdos_tests.sh
+6-9usr.sbin/makefs/tests/makefs_ffs_tests.sh
+5-7usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+5-7usr.sbin/makefs/tests/makefs_zfs_tests.sh
+1-0usr.sbin/makefs/tests/makefs_tests_common.sh
+25-345 files

FreeBSD/src b10369dusr.sbin/makefs/tests makefs_cd9660_tests.sh makefs_ffs_tests.sh

makefs: tests: Fix -D flag test

As stated in the manual page:

-F is almost certainly not the option you are looking for.  To
create an image from a list of files in an mtree format manifest,
specify it as the last argument on the command line, not as the
argument to -F.

This change does exactly that.  Also bug #192839 has already been fixed.

Reviewed by:    ngie
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54428

(cherry picked from commit 96efda9cd55689ef3fa067281d8b0a42a7122536)
DeltaFile
+13-11usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+13-11usr.sbin/makefs/tests/makefs_ffs_tests.sh
+8-0usr.sbin/makefs/tests/makefs_tests_common.sh
+34-223 files

FreeBSD/src c0b56dbusr.sbin/makefs/tests makefs_cd9660_tests.sh makefs_tests_common.sh

makefs: tests: Cleanup and remove default flags

Cleanup and remove default atf_check flags for clarity.  The following
two lines are equivalent:

    atf_check $cmd
    atf_check -s exit:0 -e empty -o empty $cmd

Update the links to the reference documents.

Remove the D_flag_cleanup function, as common_cleanup() for these
particular set of tests does two things:

1. Unmount the md(4) device.
2. Destroy the md(4) device.

Essentially, one should only call common_cleanup() if the test body
invokes mount_image().  This is not the case for D_flag_body().


    [7 lines not shown]
DeltaFile
+58-89usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+34-39usr.sbin/makefs/tests/makefs_tests_common.sh
+28-41usr.sbin/makefs/tests/makefs_zfs_tests.sh
+27-42usr.sbin/makefs/tests/makefs_ffs_tests.sh
+7-7usr.sbin/makefs/tests/makefs_msdos_tests.sh
+154-2185 files

FreeBSD/src 463c0b8usr.sbin/makefs/tests makefs_zfs_tests.sh

makefs: tests: Double the timeout of ZFS file_extend test

The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.

Reported by:    Jenkins
Reviewed by:    asomers
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54425

(cherry picked from commit 065f02174f76a49fbf537ee51ed8068d3d398b08)
DeltaFile
+6-0usr.sbin/makefs/tests/makefs_zfs_tests.sh
+6-01 files

FreeBSD/src f8b5a8ausr.sbin/makefs/tests makefs_zfs_tests.sh

makefs: tests: Double the timeout of ZFS compression test

The test makefs_zfs_tests:compression is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.

While here, check if the file exists before cleaning up, otherwise, cat
may fail.

Reported by:    Jenkins
Reviewed by:    asomers
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54424

(cherry picked from commit 9f28e92637e9a29124f407b74d7665a921865a53)
DeltaFile
+16-6usr.sbin/makefs/tests/makefs_zfs_tests.sh
+16-61 files

FreeBSD/src 10a4af9usr.sbin/makefs/tests makefs_cd9660_tests.sh makefs_msdos_tests.sh

makefs/tests: Use require.kmods property instead of ad-hoc checks

Signed-off-by:  Siva Mahadevan <me at svmhdvn.name>
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1870

(cherry picked from commit 2cd31bd8fa687922d2a571ae53456ecd2e9ba095)
DeltaFile
+0-19usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+0-8usr.sbin/makefs/tests/makefs_msdos_tests.sh
+2-0usr.sbin/makefs/tests/Makefile
+2-273 files

FreeBSD/src ce8cd5detc/mtree BSD.debug.dist

mtree: debug: Add missing krb5 entries

Reviewed by:    ivy
Differential Revision:  https://reviews.freebsd.org/D54681
DeltaFile
+4-0etc/mtree/BSD.debug.dist
+4-01 files

FreeBSD/src 32dd4b3share/mk bsd.man.mk

bsd.man.mk fix and simplify staging

The STAGE_SETS need to match STAGE_DIR.

For each STAGE_SET we have STAGE_DIR.${STAGE_SET}
and create a target stage_files.${STAGE_SET},
the settings all need to be self consistent to work.

We actually only need the high level targets stage_files and stage_links
meta.stage.mk will take care of the details.

(cherry picked from commit 9cd89fc5aa3c0e76375732788fe9d4282d65224f)
(cherry picked from commit 9fed072b44223f061a0dbf604741091b3bc09aee)
DeltaFile
+3-3share/mk/bsd.man.mk
+3-31 files

FreeBSD/src 5bd84c4sys/dev/acpica acpi.c acpi_battery.c

acpi: Add a function to deregister all ioctl commands using the same function

This simplifies detach/cleanup for drivers that add multiple ACPI ioctls.

Reviewed by:    imp
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D54420
DeltaFile
+15-0sys/dev/acpica/acpi.c
+1-7sys/dev/acpica/acpi_battery.c
+1-0sys/dev/acpica/acpiio.h
+17-73 files

FreeBSD/src 6d6bf4alibexec/rtld-elf rtld.c

rtld: Use a helper variable to simplify a few lines

Reviewed by:    kib
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54507
DeltaFile
+5-6libexec/rtld-elf/rtld.c
+5-61 files

FreeBSD/src 4ba8df2.github path-rules.txt

.github: Narrow sys/crypto warning to sys/crypto/skein

This is the only subdirectory of sys/crypto that is a vendor import.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D54719
DeltaFile
+1-1.github/path-rules.txt
+1-11 files

FreeBSD/src 241a43clib Makefile, usr.sbin Makefile

virtual_oss: Take MK_CUSE into account

Reported by:    brooks
Fixes:          f74f891581bc ("src.opts: Introduce MK_SOUND")
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
Reviewed by:    brooks, emaste
Differential Revision:  https://reviews.freebsd.org/D54708
DeltaFile
+1-1usr.sbin/Makefile
+1-1lib/Makefile
+2-22 files

FreeBSD/src 3716422libexec/rc/rc.d Makefile

libexec/rc/rc.d/Makefile: Remove duplicate mixer entry

Fixes:          f74f891581bc ("src.opts: Introduce MK_SOUND")
PR:             292436
Sponsored by:   The FreeBSD Foundation
MFC after:      4 days
Reviewed by:    ivy, emaste
Differential Revision:  https://reviews.freebsd.org/D54706
DeltaFile
+0-1libexec/rc/rc.d/Makefile
+0-11 files

FreeBSD/src 21d666asys/net if_ovpn.c, tests/sys/net/if_ovpn if_ovpn.sh

if_ovpn: add interface counters

Count input/output packets and bytes on the interface as well, not just
in openvpn-specific counters.

PR:             292464
MFC after:      2 weeks
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+32-0sys/net/if_ovpn.c
+25-0tests/sys/net/if_ovpn/if_ovpn.sh
+57-02 files

FreeBSD/src fb96702tools/build depend-cleanup.sh

depend-cleanup.sh: Clean up the old arm64 memset.S

This has moved from a generated file in objdir to the source tree.
Remove the old file and any .depend files that reference it.

Reviewed by:    bapt (via IRC)
Fixes:  41ccf82b29f3 ("libc/aarch64: Use MOPS implementations of memcpy/memmove/memset where availble")
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54729
DeltaFile
+6-0tools/build/depend-cleanup.sh
+6-01 files

FreeBSD/src faa31fcusr.bin/netstat inet.c

netstat: Remove padding from cc and stack fields

Trim white space padding that gets added libxo fields cc and stack when
using -C and -c.

The padding is only visible if you're using multiple stacks or
congestion algorithms.

PR:             292262
MFC after:      5 days
Reviewed by:    asomers, tuexen
Approved by:    asomers (mentor)
Differential Revision:  https://reviews.freebsd.org/D54709
DeltaFile
+2-2usr.bin/netstat/inet.c
+2-21 files

FreeBSD/src 8bc63f0sys/dev/nvme nvme_private.h

nvme: Fix a typo

Fixes:  73c921ef1d44 ("nvme: Add ability to override ioq to put the request on")
DeltaFile
+2-1sys/dev/nvme/nvme_private.h
+2-11 files

FreeBSD/src 6740cccsys/arm64/iommu smmu.c

arm64/iommu: Fix a resource leak in smmu_domain_alloc()

We should free the allocated ASID if smmu_init_cd() fails.

Move the allocation of "domain" to simplify the first error path.

Reported by:    Kevin Day <kevin at your.org>
Reviewed by:    br
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54676
DeltaFile
+2-3sys/arm64/iommu/smmu.c
+2-31 files

FreeBSD/src 6fef0c9sys/arm64/vmm/io vgic_v3.c

arm64/vgic_v3: Fix an inverted test when reading GICD_I<C|S>ENABLER

On read, these registers' fields return 1 if forwarding of the
corresponding interrupt is enabled, and 0 otherwise.  The test in
read_enabler() was inverted.

Reported by:    Kevin Day <kevin at your.org>
Reviewed by:    andrew
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54678
DeltaFile
+1-1sys/arm64/vmm/io/vgic_v3.c
+1-11 files

FreeBSD/src 251662esys/compat/linuxkpi/common/src linux_shmemfs.c

linuxkpi: Clean up linux_shmem_file_setup() a bit

- Free the pointer that was returned by the allocator, instead of the
  address of the first member.  These will be equal in practice, but
  it's sketchy and won't work on CHERI with subobject bounds checking.
- Use an anonymous struct, there's no need to name it.

Reviewed by:    bz, brooks, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54673
DeltaFile
+3-4sys/compat/linuxkpi/common/src/linux_shmemfs.c
+3-41 files

FreeBSD/src aa1eb62sys/compat/linuxkpi/common/src linux_firmware.c

linuxkpi: Avoid a potential null pointer dereference in an error path

Reported by:    Kevin Day <kevin at your.org>
Reviewed by:    bz, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54672
DeltaFile
+2-1sys/compat/linuxkpi/common/src/linux_firmware.c
+2-11 files

FreeBSD/src a4955b0sys/compat/linuxkpi/common/src linux_current.c

linuxkpi: Fix an error path in linux_alloc_current()

If the allocation fails we should free the task struct.

While here get rid of a couple of unnecessary assertions.

Reported by:    Kevin Day <kevin at your.org>
Reviewed by:    emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54671
DeltaFile
+2-8sys/compat/linuxkpi/common/src/linux_current.c
+2-81 files