FreeBSD/src b9128a3contrib/libarchive/libarchive archive_read_support_format_zip.c archive_write_set_format_zip.c, contrib/libarchive/libarchive/test test_compat_lzip_4.tlz.uu test_compat_lzip_3.lz.uu

libarchive: merge from vendor branch

Libarchive 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links

    [8 lines not shown]
DeltaFile
+1,474-0contrib/libarchive/libarchive/test/test_compat_lzip_4.tlz.uu
+1,461-0contrib/libarchive/libarchive/test/test_compat_lzip_3.lz.uu
+325-174contrib/libarchive/libarchive/archive_read_support_format_zip.c
+276-0contrib/libarchive/libarchive/test/test_write_format_zip64_stream.c
+247-0contrib/libarchive/libarchive/test/test_write_format_zip_stream.c
+115-78contrib/libarchive/libarchive/archive_write_set_format_zip.c
+3,898-252719 files not shown
+5,753-1,753725 files

FreeBSD/src d476e51sys/arm64/arm64 gicv3_its.c

gicv3: If the LPI is already allocated, remember it

If the LPI Configuration Tabel has been pre-allocated by the boot
loader, then we have to remember PROPBASER and use it rather than
allocating memory for it ourselves. Linux provides us with a reserved
table that contains all the gicv3 allocations, so make sure what we read
from PROPBASER matches something in that table. Normally, bare metal
boot loaders leave the gic in a reset state. However, Linux brings it up
fully so it can do I/O to boot the next kernel via kexec. Since the
gicv3 PENDBASER can't be reset while running due to undefined behavior,
we must reuse what's there for both PENDBASER and PROPBASER.

With this commit, the workaround is complete. Details are at
https://lkml.iu.edu/hypermail/linux/kernel/1809.2/06246.html
and pointers in the thread.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44038

    [2 lines not shown]
DeltaFile
+28-2sys/arm64/arm64/gicv3_its.c
+28-21 files

FreeBSD/src b532027sys/arm64/arm64 gicv3_its.c

gicv3: In its_init_cpu_lpi record each cpu's PENDBASER

When we're using the preallocated memory for gicv3, record each cpu's
PENDBASER where we'd normally allocate memory for it. Make sure that
memory is in the excluded list and map the PA to VA and store that, to
mimic what we do with the allocation case.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44037

(cherry picked from commit 1d13cc200820a020d7875563b036b5f43800ef38)
DeltaFile
+11-0sys/arm64/arm64/gicv3_its.c
+11-01 files

FreeBSD/src 582cecesys/arm64/arm64 gic_v3_reg.h

gicv3: Define PA masks for the PENDBASR and PROPBASER registers

Define masks for these registers to find the PA of where these are
pointing.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44096

(cherry picked from commit a3f164a0c7af17b6b1903e8f13d1b70072e1ccd0)
DeltaFile
+18-0sys/arm64/arm64/gic_v3_reg.h
+18-01 files

FreeBSD/src 6368e71sys/arm64/arm64 gicv3_its.c

gicv3: Report PENDBASE when bootverbose

Report some stats about PENDBASE when we're running under
bootverbose. We don't do this by default because experience has been
excess output in this routine hangs the system.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44036

(cherry picked from commit b4368e83891ed9eba72c0ceccf25f7642f2bad40)
DeltaFile
+5-0sys/arm64/arm64/gicv3_its.c
+5-01 files

FreeBSD/src bfb3b0esys/arm64/arm64 gicv3_its.c

gicv3: Only set the redistributor base if we're not prealloced

Only set the redistributor base if we're not reallocated.  If we are
preallocated, leave it all alone.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44035

(cherry picked from commit ae84491a3594c542f2aedc9340581cbb30386c1e)
DeltaFile
+71-63sys/arm64/arm64/gicv3_its.c
+71-631 files

FreeBSD/src 9eea5ebsys/arm64/arm64 gicv3_its.c

gicv3: Don't allocate pend_base if we're already started

If the gicv3 is already started, then don't allocate memory for the
pend_base tables.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44034

(cherry picked from commit ddd98f5a626df5de51fd5c2460592d9b95a49179)
DeltaFile
+15-10sys/arm64/arm64/gicv3_its.c
+15-101 files

FreeBSD/src 02eaed6sys/arm64/arm64 gicv3_its.c

gicv3: Change how we initialize its children.

The current code is written such that all the attach routines can do so
in parallel. However, newbus serializes children today, and is likely to
do so in the future. Only allocate memory for the first time. Add an
assertion that this memory is allocated for larger units.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44032

(cherry picked from commit 15c8a610a80dfe1980e043174d0fcc8034868676)
DeltaFile
+18-14sys/arm64/arm64/gicv3_its.c
+18-141 files

FreeBSD/src 5313024sys/arm64/arm64 gicv3_its.c

gicv3: Panic if the gicv3 already running

Due to undefined behavior, it's impossible to re-program a gicv3 ITS
table once it's programmed once. Memory corruption happens otherwise.
Panic if we detect the LPI is already enabled.

Sponsored by:           Netflix
Reviewed by:            andrew
Differential Revision:  https://reviews.freebsd.org/D44033

(cherry picked from commit 51c57ca92ed3d0caf8f3e8c61345ac670d494901)
DeltaFile
+16-7sys/arm64/arm64/gicv3_its.c
+16-71 files

FreeBSD/src e0919a4lib/libc/arm Symbol.map

libc/arm: export __signalcontext not _signalcontext

The former exists and architectures other than aarch64 and riscv provide
it.  The later does not exist.

Differential Revision:  https://reviews.freebsd.org/D44329
DeltaFile
+1-1lib/libc/arm/Symbol.map
+1-11 files

FreeBSD/src da77a1blib/libcxxrt Version.map.arm Version.map

libcxxrt: don't export nonexistant symbols

Remove version entries that we don't build.

Add an arm specific Version.map and for other targets run the files
through sed to handle int vs long in new and delete.

Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp,
but it doesn't currently handle C++ symbols so be annoyingly duplicative
for now.

Differential Revision:  https://reviews.freebsd.org/D44325
DeltaFile
+362-0lib/libcxxrt/Version.map.arm
+5-42lib/libcxxrt/Version.map
+17-1lib/libcxxrt/Makefile
+384-433 files

FreeBSD/src 3f82d83lib/libgcc_s Symbol.map

libgcc_s: only export 128-bit int APIs when available

These interfaces are only compiled when the platform supports 128-bit
ints.  Use a CRT_HAS_128BIT guard similar to the one used in the
compiler_rt sources.

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D44323
DeltaFile
+41-26lib/libgcc_s/Symbol.map
+41-261 files

FreeBSD/src b8df8b0lib/libgcc_s Symbol.map

libgcc_s: only export 128-bit long double when available

These functions are only available on aarch64 and riscv so only try to
export them on those architectures.

Differential Revision:  https://reviews.freebsd.org/D44322
DeltaFile
+2-0lib/libgcc_s/Symbol.map
+2-01 files

FreeBSD/src b457144lib/libgcc_s Symbol.map

libgcc_s: exclude symbols not present on some arches

arm, aarch64, and riscv lack some/all frame_info interfaces.
arm and powerpc lack some numeric functions.

Differential Revision:  https://reviews.freebsd.org/D44324
DeltaFile
+24-0lib/libgcc_s/Symbol.map
+24-01 files

FreeBSD/src 35b3504lib/librpcsec_gss Symbol.map

librpcsec_gss: don't export non-existant symbols

rpc_gss_mesh_to_oid was never implemented.

This doesn't seem to be any reason why we would need to export the _stub
functions, but it's also a little unclear to me why the linker thinks
they aren't present.  Perhaps they should be static.

Differential Revision:  https://reviews.freebsd.org/D44248
DeltaFile
+0-3lib/librpcsec_gss/Symbol.map
+0-31 files

FreeBSD/src 63b179blib/libc/stdio Symbol.map

libc: don't try to export __sF

This symbol has been static since 2008 (commit 1e98f88776fc).

Differential Revision:  https://reviews.freebsd.org/D44188
DeltaFile
+0-1lib/libc/stdio/Symbol.map
+0-11 files

FreeBSD/src 1b10a30lib/libc/db Symbol.map

libc: don't try to export mpool_stat

This requires that mpool.c be compiled with -DSTATISTICS and we provide
no mechanism to do this.

Differential Revision:  https://reviews.freebsd.org/D44185
DeltaFile
+0-1lib/libc/db/Symbol.map
+0-11 files

FreeBSD/src 88fcb61lib/libc/net Symbol.map

libc: don't try to export _nsdbtdump

It is only present when compiling nsdispatch.c with -D_NSS_DEBUG and we
provide no mechanism to do so.

Differential Revision:  https://reviews.freebsd.org/D44187
DeltaFile
+0-1lib/libc/net/Symbol.map
+0-11 files

FreeBSD/src 4d6722elib/libc/gmon Symbol.map

libc: don't try to export mexitcount

This requires that mcount.c be compiled with -DGUPROF and we provide no
mechanism to do so.

Differential Revision:  https://reviews.freebsd.org/D44186
DeltaFile
+0-1lib/libc/gmon/Symbol.map
+0-11 files

FreeBSD/src 0dd2f4alib/libc/net Symbol.hesiod.map Symbol.map

libc: only export hesiod symbols when enabled

Create a seperate symbol file for hesiod and conditionally include it.
This allows linkage with --no-undefined-version.

Differential Revision:  https://reviews.freebsd.org/D44184
DeltaFile
+12-0lib/libc/net/Symbol.hesiod.map
+0-10lib/libc/net/Symbol.map
+1-0lib/libc/net/Makefile.inc
+13-103 files

FreeBSD/src 1719886sys/contrib/openzfs/config kernel-blkdev.m4, sys/contrib/openzfs/include/os/linux/spl/sys debug.h

zfs: merge openzfs/zfs at 90ba19eb7

Notable upstream pull request merges:
 #15784 90ba19eb7b Do no use .cfi_negate_ra_state within the assembly
                   on Arm64
 #15942 b6bbaa8372 Give a better message from 'zpool get' with invalid
                   pool name
 #15943 ca678bc0bc Makefile.bsd: sort and cleanup source file list
 #15953 fa480fe5ba zinject: show more device fault fields
 #15983 30c4eba4ea Fix panics when truncating/deleting files
 #15992 99741bde59 zvol: use multiple taskq
 #16015 a100a195fa Add support for zfs mount -R <filesystem>
 #16022 5e5fd0a178 Speculative prefetch for reordered requests
 #16040 997f85b4d3 L2ARC: Relax locking during write
 #16042 b12738182c Improve dbuf_read() error reporting
 #16051 a9a4290173 xdr: header cleanup
 #16052 eeca9a91d6 Fix read errors race after block cloning
 #16057 aa5445c28b Remove db_state DB_NOFILL checks from syncing context
 #16061 76d1dde94c zinject: inject device errors into ioctls

    [7 lines not shown]
DeltaFile
+413-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/vdev_disk/page_alignment.c
+235-54sys/contrib/openzfs/module/zfs/dmu_zfetch.c
+136-83sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
+101-93sys/contrib/openzfs/module/zfs/arc.c
+125-34sys/contrib/openzfs/config/kernel-blkdev.m4
+135-17sys/contrib/openzfs/include/os/linux/spl/sys/debug.h
+1,145-28178 files not shown
+2,505-89484 files

FreeBSD/src e4a0c92sys/net iflib.c

iflib: Correct indentation according to style(9)

The indentation style for the SYSCTL_* macros used was not matching KNF.

Reported by:    jhb
Differential Revision:  https://reviews.freebsd.org/D44811
DeltaFile
+135-142sys/net/iflib.c
+135-1421 files

FreeBSD/src d1fb333stand/efi/gptboot Makefile

stand: Install gptboot.efi(8)

We need to include bsd.init.mk first when we have man pages in the boot
loader.

Sponsored by:           Netflix

(cherry picked from commit cfcf475a669738382ac75ea50eb03a20280f7662)
DeltaFile
+1-0stand/efi/gptboot/Makefile
+1-01 files

FreeBSD/src e40703astand/efi/include efichar.h, stand/efi/libefi efichar.c

stand/efi: Changes to efichar to allow it to be used in the kernel

Replace malloc/free with EFICHAR_MALLOC and EFICHAR_FREEE macros.

Obtained from:  Juniper Networks, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D44541

(cherry picked from commit fe429e6794d322636e7c1e520d50ec0cb711dd14)
DeltaFile
+12-5stand/efi/libefi/efichar.c
+8-0stand/efi/include/efichar.h
+20-52 files

FreeBSD/src 41883f5stand/forth loader.4th

loader.4th dictthreshold too small

The dictthreshold in stand/forth/loader.4th is too small
resulting in full dictionary.

Reviewed by:    stevek, imp
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D44414

(cherry picked from commit a8eb3b365eb63d2a569b166f2dfc982967d3a7fa)
DeltaFile
+2-2stand/forth/loader.4th
+2-21 files

FreeBSD/src 33d1ce8stand/userboot/userboot Makefile

userboot: allow for overriding the version file location

Use ?= when assigning VERSION_FILE

Reviewed by:    imp
Obtained from:  Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D44624

(cherry picked from commit 112783ebbc313f0df73bbec8520a94aba4a4f33d)
DeltaFile
+1-1stand/userboot/userboot/Makefile
+1-11 files

FreeBSD/src 519aef9stand/kboot/kboot hostfs.c

kboot: hostfs -- check for llseek failure correctly

The host_* syscalls are all raw Linux system calls, not the POSIX
wrappers that glibc / musl create. So we have to ranage change the
return value of host_llseek correctly to use the negative value hack
that all Linux system calls use.

This fixes a false positive error detection when we do something like
lseek(fd, 0xf1234567, ...); This returns 0xf1234567, which is a negative
value which used to trigger the error path.  Instead, we check using the
is_linux_error() and store the return value in a long. Translate that
errno to a host errno and set the global errno to that and return
-1. lseek can't otherwise return a negative number, since it's the
offset after seeking into the file, which by definition is positive.

This kept the 'read the UEFI memory map out of physical memory' from
working on aarch64 (whose boot loader falls back to reading it since
there are restrictive kernel options that can also prevent it), since
the physical address the memory map was at on my platform was like

    [6 lines not shown]
DeltaFile
+10-3stand/kboot/kboot/hostfs.c
+10-31 files

FreeBSD/src cb9ef3astand/kboot/kboot main.c

kboot: Use is_linux_error to check mmap return error

Rather than checking against the (incorrect) -511, use the
is_linux_error() function to check to see if host_mmap failed.

Sponsored by:           Netflix

(cherry picked from commit d75524b3fe21752b233f66ae8e9d6450d507f75c)
DeltaFile
+1-1stand/kboot/kboot/main.c
+1-11 files

FreeBSD/src d18377cstand/kboot/kboot hostfs.c

kboot: Avoid UB in signed shift

offset is signed. Copy it to the unsigned res before shifting. This
avoids any possible undefined behavior for right shifting signed
numbers. No functional change intended (and the code generated is the
nearly same for aarch64).

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D44285

(cherry picked from commit 8b1925f29c54f5791db3c8dcdf2b67541bb8ab32)
DeltaFile
+3-2stand/kboot/kboot/hostfs.c
+3-21 files

FreeBSD/src d55ddcestand/kboot/kboot kbootfdt.c

kboot: kbootfdt: fix error handling

If we are able to open /sys/firmware/fdt, but aren't able to read it,
fall back to /proc/device-tree. Remove comment that's not really true,
it turns out.

Sponsored by:           Netflix

(cherry picked from commit 462af7676b3ee8a8bd9ee9b55a35c0cf815a351f)
DeltaFile
+6-7stand/kboot/kboot/kbootfdt.c
+6-71 files