Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caprevoke: merge dev 2023-07-24 #1766

Closed
wants to merge 2,906 commits into from
Closed
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jun 29, 2023

  1. Generalise libcompat to be a list rather than a single option

    Whilst the kernel can support any number of COMPAT_FOO, world can only
    build a single libfoo. Upstream this isn't such an issue, since the only
    option is lib32 anyway, but downstreams, such as CheriBSD, may wish to
    support multiple at the same time. Thus, adjust the top-level Makefiles
    to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and
    adjust bsd.compat.mk to support this use-case.
    
    For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and
    refer to the requested compat's, preserving the current interface. For
    the top-level Makefiles those variables are no longer set (since there
    is no longer "the" compat) and only the per-compat ones are available.
    
    Reviewed by:	brooks, jhb, imp
    Differential Revision:	https://reviews.freebsd.org/D40571
    
    (cherry picked from commit 91d7edd)
    jrtc27 authored and bsdjhb committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    cb783c2 View commit details
    Browse the repository at this point in the history
  2. Makefile.inc1: Sort _LIBCOMPATS

    jrtc27 authored and bsdjhb committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    3a4451b View commit details
    Browse the repository at this point in the history
  3. src.opts.mk: Stop marking LIB32 broken on CHERI architectures

    Makefile.libcompat now supports building multiple sets of compat
    libraries so this is no longer needed. It is, however, rather academic
    for now given CHERI-MIPS was removed (the only CHERI architecture whose
    base architecture has LIB32 support in FreeBSD), at least until upstream
    gains LIB32 for arm64.aarch64.
    jrtc27 authored and bsdjhb committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    a1e9a86 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. Configuration menu
    Copy the full SHA
    2a6700f View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2023

  1. arm64: Include machine/pcb.h in freebsd64_machdep.c

    get_arm64_tls pokes at the PCB for TPIDR_EL0 so needs the relevant
    definitions. Currently we have a downstream diff to sys/systm.h that
    pulls in machine/pcb.h, but that was only needed for CHERI-MIPS and so
    should go away, which exposes this missing include.
    jrtc27 committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    aff6332 View commit details
    Browse the repository at this point in the history
  2. sys/sys/systm.h: Drop downstream-only include of machine/pcb.h

    Upstream doesn't pull it in here; this diff dates back to CHERI-MIPS,
    which stored DDC in the PCB and thus __USER_CAP needed its definition.
    However, neither Morello nor CHERI-RISC-V get it from the PCB and so do
    not need this include (nor is it a generic thing that's needed), so we
    should not have this as a downstream diff any more.
    
    This fixes building lib32 libprocstat on amd64. Currently it dies
    building zfs_defs.c, since it transitively includes machine/fpu.h via
    sys/systm.h and, because it hackily defines _KERNEL, gets kernel
    prototypes for things like fpu_save_area_free which reference struct
    savefpu, but x86/fpu.h will give the i386 definition, which is a union
    not a struct, giving a tag mismatch error. This issue once again
    highlights how awful this approach is, and how fragile the whole thing
    is when you start modifying system headers. We should probaby invest
    efforts in fixing this mess upstream given the continued friction seen
    around libprocstat/zfs downstream.
    jrtc27 committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    68cc84d View commit details
    Browse the repository at this point in the history
  3. libzfs: Fix 32-bit build

    jrtc27 committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    7181e33 View commit details
    Browse the repository at this point in the history
  4. Makefile.libcompat: Work around local bsd.compat.mk workaround

    The situation for cleandir is a bit of a mess. The top-level build runs
    cleandir normally and re-runs it per-libcompat under LIBCOMPATWMAKE.
    This includes all programs, not just libraries, and so we end up in
    nonsense situations. As a result, bsd.compat.mk is stubbed out for
    cleandir, which in turn means it won't define libcompats, yet the top
    level has defined _LIBCOMPATS, and so we end up trying to index it and
    error out. Thus, skip this code in that instance, since cleandir isn't
    referencing any of these targets. Note that, prior to multi-libcompat
    support, we'd just reference the undefined libcompat and it would expand
    to the empty string (which isn't an error in the contexts it was done,
    other than the one removed in 86ddc08), but now we have to be more
    careful.
    
    This should all be reworked upstream so cleandir doesn't do stupid
    things and these hacks can go (including reverting the .warn that
    otherwise gets hit in bsd.compat.mk back to an .error).
    
    Fixes:	cb783c2 ("Generalise libcompat to be a list rather than a single option")
    Fixes:	#1729
    jrtc27 committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    90aacc1 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. rtld-elf: Fix whitespace regression

    Fixes:	c5c2d3d ("c18n: Insert trampolines for PLT function calls")
    jrtc27 authored Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f4caadd View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. Jenkinsfile: Enable building lib32 in CI

    These add a bit to the build time, but we want to check that we're not
    regressing the lib32 build as has happened in the past. We may wish to
    flip the default in cheribuild (or remove the option entirely) at some
    point in the future once we don't need to support versions where the
    build is broken.
    jrtc27 committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    561829f View commit details
    Browse the repository at this point in the history
  2. rc: ignore .pkgsave files

    The local parts of rc already skip .sample files; we add .pkgsave to the
    list, and add logic for base.
    
    Thanks to @RhodiumToad for getting this started.
    
    Differential Revision: https://reviews.freebsd.org/D27962
    Reviewed by: imp
    Pull Request: freebsd/freebsd-src#662
    
    (cherry picked from commit 3693d91)
    igalic authored and brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    0d25fc0 View commit details
    Browse the repository at this point in the history
  3. Minor whitespace fixes

    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    9d7f6d5 View commit details
    Browse the repository at this point in the history
  4. Add some comments to endifs for long blocks

    It was hard to tell what the if conditions were.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    84ac86b View commit details
    Browse the repository at this point in the history
  5. Copy pmap CLG value to new vmspace

    When the parent is GEN1, capdirty pages will also be GEN1, but now the
    child will be GEN0 so there will be a mismatch leading to faulted capdirty
    pages being revoked when revocation isn't in progress.  If no revocation
    is triggered before the fault happens then vm_map.vm_cheri_revoke_test may
    be NULL leading to a panic.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    779b8fa View commit details
    Browse the repository at this point in the history
  6. Verify consistency of CLG at the end of revocation

    This is a potentially expensive check we we might not want to keep it
    on by default even under invariants.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    9b23369 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    aa94804 View commit details
    Browse the repository at this point in the history
  8. vm_map_clear: reset revoker state/epoch

    When called from exec_new_vmspace() to empty an unshared vmspace prior
    to exec, the vm_map will be initialized with a zeroed enqueue and
    dequeue epoch in the info page. When the process had previously revoked
    and we failed to reset the state and zero the kernel's notion of the
    epoch we ended up in an infinite loop were the kernel would see no work
    to do (passed start epoch in the past) and thus would not update the
    info page resulting in no progress being made.
    
    One could alternatively reset the state in exec_new_vmspace(), but the
    extra store seems harmless in the vm_map_free() case.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    f8ff5b9 View commit details
    Browse the repository at this point in the history
  9. exec_new_vmspace: assert revoker state is NONE

    Verify that the empty vmspace is not revoking and has a zero epoch.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    16f3ca2 View commit details
    Browse the repository at this point in the history
  10. vmspace_fork: copy vm_cheri_revoke_test

    If the epoch is open then vm_cheri_revoke_test has been set and we need
    to copy it was that we can test capabilities when we come back to finish
    this epoch.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    2687cb6 View commit details
    Browse the repository at this point in the history
  11. vmspace_fork(): update rev_entry

    If the epoch is open we may be in the midst of a revocation and thus
    rev_entry may be set in old_map.  In that case, set the corresponding
    entry in new_map.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    ea1a0ca View commit details
    Browse the repository at this point in the history
  12. cheri/revoke.h: allow include on non-CHERI systems

    Add a somewhat unprincipled set of __has_feature(capabilities) checks to
    allow cheri/revoke.h to be included unconditionally by libsysdecode's
    implementation.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    c5c9f3a View commit details
    Browse the repository at this point in the history
  13. libsysdecode: support caprevoke syscall flags

    Support the flags arguments of cheri_revoke(2) and
    cheri_revoke_get_shadow(2).  Use compressed names (sysdecode_cr*()) as
    otherwise the formatting of the manpage is completely trashed (mandoc
    uses too much space between columns).
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4f2bc91 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8d8de38 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    83cc6e5 View commit details
    Browse the repository at this point in the history
  16. Test finishing a revoke epoch after fork

    Add two new modes to cheribsdtest_cheri_revoke_lib_run which start or
    end a revocation of the entire array (rather than looping over it to
    process a random number of times (average should be)).  Use this to open
    an epoch prior to forking and close it in the child process.
    brooksdavis committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    da3f9d8 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    f02b183 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    fbe7b56 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f6f7f48 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    e01f485 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    17f197f View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. Configuration menu
    Copy the full SHA
    f60bf6b View commit details
    Browse the repository at this point in the history
  2. arm64: Don't define Morello-specific register fields for non-CHERI

    It's plausible these could mean something else in the Arm architecture
    outside of the Morello architecture fork, so we shouldn't go defining
    (and using) them unless we know we're targeting Morello.
    jrtc27 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    926917a View commit details
    Browse the repository at this point in the history
  3. arm64: Inherit C64 in child across fork

    Because Morello awkwardly puts the encoding mode in SPSR rather than
    CELR, we need to explicitly copy it over to the child's trapframe
    otherwise we'll lose the state and end up back in A64. In practice, this
    currently doesn't matter, since the success path doesn't have any
    mode-dependent instructions and terminates in a ret, which will get the
    right mode from c30, and the error path (which does have mode-dependent
    instructions behind a direct branch to cerror) can never be reached in
    the child, only the parent. However, this is still wrong, and will
    matter in the Morello benchmark ABI, where fork will return with an
    integer ret x30 and thus stay in A64.
    jrtc27 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    aeec55c View commit details
    Browse the repository at this point in the history
  4. cheribsdtest: Improve reason if child unexpectedly dies with a signal

    Currently we just use "Child exited abnormally" for when the child
    process doesn't exit cleanly, which is unhelpful when debugging, so
    print the signal number instead if it was due to a signal.
    
    Note that tests which deliberately provoke signals still exit cleanly,
    since the child's test harness will catch the signal, save various parts
    of the given siginfo_t and exit. This code is only for more catastrophic
    situations (e.g. signal delivery itself is broken or the child received
    a fatal signal before even setting up the handler).
    jrtc27 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    a81c683 View commit details
    Browse the repository at this point in the history
  5. examples: Add a new /usr/share/examples/cheribsdtest/run-many

    This lets you easily run multiple cheribsdtest variants in sequence,
    filtering out the verbose logging for each test, printing just the
    summary lines at the end, as a useful tool for local testing. It is only
    intended for humans and should not be extended for use in automated
    environments; those should be using cheribuild or another similar tool
    to do things properly.
    jrtc27 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    7fbfc70 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a776b4c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6b7fb2e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f430a5b View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Configuration menu
    Copy the full SHA
    e7c113a View commit details
    Browse the repository at this point in the history
  2. Replace LD_CHERI_ prefix with LD_64C_ for rtld-elf64c

    This at last finishes the multi-year transition from libcheri to lib64c,
    now that cheribuild should be able to handle both.
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    0623cef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3255bbe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ea811f View commit details
    Browse the repository at this point in the history
  5. Delete upstream's pull request template

    GitHub doesn't give a way to namespace these so they don't show up on
    forks as far as I know, so we just have to delete the file for CheriBSD.
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    2c1ee36 View commit details
    Browse the repository at this point in the history
  6. vm_map_clear: clear more revocation state

    If we were in the process of revoking we need to NULL out map->rev_entry
    so that vm_map_delete() is allowed to unlink the entry.  Also zero the
    stats structure.
    brooksdavis committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    8d98d3d View commit details
    Browse the repository at this point in the history
  7. caprevoke: Don't stop revoking an unmapped entry prematurely

    I'd put the call to vm_map_entry_end_revocation() at the end of the
    initial store-side barrier so it somewhat worked, by accident, but was
    missed more or less completely in the load-side case.
    brooksdavis committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    fbe5de0 View commit details
    Browse the repository at this point in the history
  8. libutil: Delete trailing whitespace

    (cherry picked from commit f8cabe5)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    ec6940c View commit details
    Browse the repository at this point in the history
  9. getlocalbase.3: Fix AUTHORS formatting

    MFC after:	1 week
    
    (cherry picked from commit bfc4758)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    9e69c66 View commit details
    Browse the repository at this point in the history
  10. kmod.mk: Use portable printf '%s' over non-portable echo -n

    Whilst /bin/echo on macOS and Linux implement -n, as do the builtin
    echos in bash and zsh, the builtin echo in dash does not, causing the
    first line of the output to be -n foo rather than just foo, and there to
    be an extra newline in the output and thus blank line, both of which
    result in "Symbol ... is not present in *.kld" warnings appearing in the
    build output (once for -n foo and once for the empty string for each
    module where EXPORT_SYMS is a list of symbols).
    
    MFC after:	1 week
    
    (cherry picked from commit d1e44bc)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    90527ef View commit details
    Browse the repository at this point in the history
  11. getlocalbase: Make default path actually configurable

    We include paths.h in getlocalbase.c, which defines _PATH_LOCALBASE.
    This will override a definition on the command line, meaning it is
    impossible to override like how the manpage says you can, and it means
    the code to provide a fallback default is dead as the macro is always
    defined.
    
    Instead, introduce a new LOCALBASE_PATH macro like LOCALBASE_CTL_LEN
    that can be set on the command line and will default to the system's
    existing _PATH_LOCALBASE to avoid duplicating the default here.
    
    Reviewed by:	imp
    Differential Revision:	https://reviews.freebsd.org/D40975
    
    (cherry picked from commit 3a46fe2)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    d1b9bcf View commit details
    Browse the repository at this point in the history
  12. bsd.compat.mk: Fix indentation for alignment

    Fixes:	91d7edd ("Generalise libcompat to be a list rather than a single option")
    (cherry picked from commit aa85676)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    de4a944 View commit details
    Browse the repository at this point in the history
  13. libsysdecode: Drop dead __amd64__ && COMPAT_32BIT code

    Under COMPAT_32BIT we are compiling 32-bit code and so __amd64__ is not
    defined, __i386__ is, and we use the real i386 headers.
    
    Reviewed by:	brooks, jhb, imp
    Differential Revision:	https://reviews.freebsd.org/D40916
    
    (cherry picked from commit 3d96c00)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    93b8855 View commit details
    Browse the repository at this point in the history
  14. Don't bother to check COMPAT_32BIT when __LP64__ is defined

    Under COMPAT_32BIT we are compiling 32-bit code and so __LP64__ is not
    defined, __ILP32__ is, and thus the check is completely redundant.
    
    Reviewed by:	brooks, jhb, imp
    Differential Revision:	https://reviews.freebsd.org/D40917
    
    (cherry picked from commit c63c4e6)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    cbc351b View commit details
    Browse the repository at this point in the history
  15. elf-hints.h: Allow rtld_paths.h to be included before it

    Currently rtld_paths.h will #undef _PATH_ELF_HINTS in order to override
    this to the right value if included afterwards, but the other way round
    does not work as elf-hints.h tries to define an already-defined macro to
    a potentially different value. Thus, guard the definition here so that
    rtld_paths.h's definition continues to take precedence.
    
    Note that, although all in-tree uses of _PATH_ELF_HINTS have included
    rtld_paths.h already, pax-utils wants _PATH_ELF_HINTS from elf-hints.h
    and so we cannot just drop the define. In-tree uses must just continue
    to make sure that they include rtld_paths.h to get the right value for
    libcompat builds as is already required.
    
    Reviewed by:	kib, brooks, jhb, imp
    Differential Revision:	https://reviews.freebsd.org/D40918
    
    (cherry picked from commit be01082)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    5dc0a88 View commit details
    Browse the repository at this point in the history
  16. rtld-elf: Reuse _BASENAME_RTLD for debug.h rather than duplicating logic

    Reviewed by:	kib, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40919
    
    (cherry picked from commit 5181fe2)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    5f738ae View commit details
    Browse the repository at this point in the history
  17. ldd: Stop using downstream-specific _DEFAULT_PATH_RTLD

    This is just _PATH_RTLD by another name.
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    ca5333d View commit details
    Browse the repository at this point in the history
  18. lib: Enable libcbor and libfido2 for COMPAT_32BIT

    We no longer have COMPAT_32BIT hacks for libusb, instead supporting the
    normal 32-bit ioctls for freebsd32 processes, so we can enable these for
    the lib32 build.
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40920
    
    (cherry picked from commit 6adfb81)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    51c73e2 View commit details
    Browse the repository at this point in the history
  19. libc: Build all i386 sources for amd64 lib32

    Having the symbols exported by libc differ between i386 and amd64 lib32
    is questionable. Since these files build just fine today, stop guarding
    them with !defined(COMPAT_32BIT). Whether or not they work at run time
    is a different matter, but an i386 jail would be similarly affected if
    not, so that's not a problem with lib32.
    
    Reviewed by:	kib, jhb, imp
    Differential Revision:	https://reviews.freebsd.org/D40937
    
    (cherry picked from commit 0fbb77c)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    455f618 View commit details
    Browse the repository at this point in the history
  20. Makefile.libcompat: Quote CFLAGS and CXXFLAGS for sub-make

    Currently none of the words in these require quoting, but a future
    commit will add words that do, thus we should make sure to quote each
    word so the shell doesn't mangle them before calling the sub-make.
    
    (Note that :@var@expr@ is the bmake syntax for map, replacing each word
    with expr's evaluation, with var containing the input word)
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40921
    
    (cherry picked from commit 537f945)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    59b157e View commit details
    Browse the repository at this point in the history
  21. bsd.compat.mk: Provide new CPP and sub-make variables

    Currently the only way to detect for a libcompat build is to consult
    whether COMPAT_32BIT is defined (or equivalent, for downstreams with
    other libcompats or past releases with libsoft as COMPAT_SOFTFP). There
    are two issues with this:
    
    1. COMPAT_32BIT is a new naming scheme that doesn't match the libcompat
       name, which is unnecessary deviation.
    2. When multiple libcompats exist, everywhere that needs to detect a
       libcompat must check each variable in turn, despite the fact that it
       normally just wants to know if this is a libcompat build and perhaps
       what ${LIBCOMPAT} and/or ${libcompat} are for it.
    
    As a result, far too many places in the tree need to know about the set
    of possible libcompats.
    
    Instead, introduce two new CPP and sub-make variables, COMPAT_LIBCOMPAT
    and COMPAT_libcompat, which give the values for ${LIBCOMPAT} and
    ${libcompat} respectively, so that uses can be made parameterised. For
    when code really does need to know the specific libcompat, Makefiles can
    perform a string comparison, but the C preprocessor cannot, so introduce
    an additional CPP-only COMPAT_LIB${LIBCOMPAT} which is intended to
    replace the inconsistently-named COMPAT_32BIT (which will be removed in
    future). Uses of this new variable should still be kept to a minimum,
    however, given the code duplication needed for new libcompats.
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40922
    
    (cherry picked from commit 8fad2cd)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    f827443 View commit details
    Browse the repository at this point in the history
  22. openpam: Migrate from COMPAT_32BIT to generic COMPAT_libcompat

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40923
    
    (cherry picked from commit 0ade2f8)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    f370175 View commit details
    Browse the repository at this point in the history
  23. include: Migrate from COMPAT_32BIT to generic COMPAT_libcompat

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40924
    
    (cherry picked from commit d3748fc)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    c484c39 View commit details
    Browse the repository at this point in the history
  24. rtld-elf: Migrate from COMPAT_32BIT to generic COMPAT_libcompat/LIBCO…

    …MPAT
    
    We still have a tiny amount of libcompat-specific code in rtld_paths.h,
    but it's been deduplicated as much as possible, and in future we may
    wish to just push these variables down to the few consumers of them and
    make them use the double-underscore variants with a libcompat argument
    rather than give them names here.
    
    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	kib, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40925
    
    (cherry picked from commit f940929)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    b66254c View commit details
    Browse the repository at this point in the history
  25. kerberos5: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPAT

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	emaste, imp, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40926
    
    (cherry picked from commit cb2f2fa)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    99b6030 View commit details
    Browse the repository at this point in the history
  26. geom: Migrate from COMPAT_32BIT to generic COMPAT_libcompat

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	imp, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40927
    
    (cherry picked from commit daf2519)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    f9d6d56 View commit details
    Browse the repository at this point in the history
  27. libiconv_modules: Migrate from COMPAT_32BIT to generic COMPAT_libcompat

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40929
    
    (cherry picked from commit d7be70f)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    99dd97d View commit details
    Browse the repository at this point in the history
  28. libsysdecode: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPAT

    The use isn't any more generic, just the variable itself, which will
    allow COMPAT_32BIT to be removed. The fact we even have to check
    COMPAT_LIBCOMPAT here in order to pass the right flags to CPP points at
    our libcompat infrastructure not suitably modifying the CPP variable
    (which we barely use for world; this and bsd.symver.mk are the two
    uses, and the latter could benefit from the right flags too), but this
    change doesn't attempt to fix that.
    
    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	emaste, imp, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40930
    
    (cherry picked from commit 45be501)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    06884e7 View commit details
    Browse the repository at this point in the history
  29. lib: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPAT

    In the process, delete a COMPAT_SOFTFP remnant that was missed in
    previous sweeps.
    
    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40931
    
    (cherry picked from commit 3864bd4)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    13cd705 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    c82d548 View commit details
    Browse the repository at this point in the history
  31. include: Migrate from COMPAT_64BIT to uniform COMPAT_LIB64

    Note that #if defined(...) rather than #ifdef is used here since this
    list will be added to in future and this will minimise such diffs.
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    dfb8e24 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    13e0777 View commit details
    Browse the repository at this point in the history
  33. libpam: Remove a stale COMPAT_CHERI use

    These defines come from bsd.compat.mk these days; no need to do it
    manually here.
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    b97f836 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    20030e6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    725230b View commit details
    Browse the repository at this point in the history
  36. bsd.compat.mk: Remove obsolete COMPAT_32BIT now it's unused

    See commit 8fad2cd ("bsd.compat.mk: Provide new CPP and sub-make
    variables") for the context behind this change.
    
    Reviewed by:	emaste, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40932
    
    (cherry picked from commit 1840dc0)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    cd79631 View commit details
    Browse the repository at this point in the history
  37. ldconfig: Use __PATH_ELF_HINTS("32") over _PATH_ELF32_HINTS

    This will allow the latter to be removed, reducing the boilerplate
    needed for a new libcompat.
    
    Reviewed by:	kib, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40933
    
    (cherry picked from commit 1e635e8)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    ae97330 View commit details
    Browse the repository at this point in the history
  38. ldd: Use __PATH_RTLD("32") over _COMPAT32_PATH_RTLD

    This will allow the latter to be removed, reducing the boilerplate
    needed for a new libcompat.
    
    Reviewed by:	kib, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40934
    
    (cherry picked from commit e17dd92)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    6c34d8a View commit details
    Browse the repository at this point in the history
  39. rtld-elf: Remove _PATH_ELF32_HINTS and _COMPAT32_PATH_RTLD

    These are no longer referenced, with the one user of each now using the
    double-underscore version with "32" as an argument instead.
    
    Reviewed by:	kib, brooks, jhb
    Differential Revision:	https://reviews.freebsd.org/D40935
    
    (cherry picked from commit 076a4dc)
    jrtc27 committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    2941e5d View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Do not enforce representability for hybrid binaries in elf imgact.

    When loading hybrid position-dependent binaries, we do not care about the
    representability of the ELF sections. The reservation creation will skip the
    representability alignment enforcement as well, so avoid complaining about
    alignment when creating the imgact_capability.
    qwattash committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    82061ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd2c740 View commit details
    Browse the repository at this point in the history
  3. caprevoke: re-sort revoker states

    We're only planning to merge load-side revocation to dev at this time so
    put it at the top.
    brooksdavis committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    1885dd5 View commit details
    Browse the repository at this point in the history
  4. cheribsdtest: remove redundent LIBADD+=procstat

    It's been required for all versions, not just purecap for quite some
    time.
    brooksdavis committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    5557782 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a0ce3d2 View commit details
    Browse the repository at this point in the history
  6. posix_memalign_test: fix !purecap condition

    We recycled the LIBCHERI make variable long ago.
    brooksdavis committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    37aa08e View commit details
    Browse the repository at this point in the history
  7. reduce diff to dev

    brooksdavis committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    a5ef0e6 View commit details
    Browse the repository at this point in the history
  8. trailing whitespace

    brooksdavis committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    ac35537 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. arm_smcc_1_0_*: Fix to work on purecap.

    - Load a capability pointer from the stack for purecap.
    
    - Store capability registers to the results structure.  Even though
      the current firmware only returns integer registers, storing the
      full capability is ok as the values will just be null-derived.
      However, this approach matches the current structure's layout and
      will work with any future firmware that may return capabilities.
    bsdjhb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    5897443 View commit details
    Browse the repository at this point in the history
  2. cheri/revoke.h: allow include on non-CHERI systems

    Add a somewhat unprincipled set of __has_feature(capabilities) checks to
    allow cheri/revoke.h to be included unconditionally by libsysdecode's
    implementation.
    brooksdavis authored and bsdjhb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    b20e012 View commit details
    Browse the repository at this point in the history
  3. libsysdecode: support caprevoke syscall flags

    Support the flags arguments of cheri_revoke(2) and
    cheri_revoke_get_shadow(2).  Use compressed names (sysdecode_cr*()) as
    otherwise the formatting of the manpage is completely trashed (mandoc
    uses too much space between columns).
    brooksdavis authored and bsdjhb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    5d8d3ff View commit details
    Browse the repository at this point in the history
  4. kdump: decode cheri_revoke*(2) flags

    brooksdavis authored and bsdjhb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    4d0dd2c View commit details
    Browse the repository at this point in the history
  5. truss: decode cheri_revoke*(2) flags

    brooksdavis authored and bsdjhb committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    b20255b View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. setfacl.1: correct reference to a trailing comma, should read "colon"

    PR:		271063
    Reported by:	[email protected]
    ceri authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    d4d1524 View commit details
    Browse the repository at this point in the history
  2. Reported by: vvd

    Approved by: tcberner (mentor)
    Differential Revision: https://reviews.freebsd.org/D39859
    
    Add records about new ports committer (vvd).
    Update Mentor and Mentee Information to follow step 5 of the Committers
    Guide.
    VVD authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    ffae1e2 View commit details
    Browse the repository at this point in the history
  3. wg: change module name to if_wg

    Other virtual interface drivers (e.g. if_gif, if_stf, if_ovpn) all start
    with if_. The wireguard file is also named if_wg, but the module name
    was 'wg'.
    
    Fix this inconsistency.
    
    Reported by:	Christian McDonald <[email protected]>
    Reviewed by:	zlei, kevans
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    Differential Revision:	https://reviews.freebsd.org/D39853
    kprovost authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    0a636fc View commit details
    Browse the repository at this point in the history
  4. Additional output from dumpfs(8).

    Provide an additional line of output for the superblock giving the
    computed size of the cylinder group (CGSIZE macro) along with the
    details needed to calculate it.
    
    MFC after:   1 week
    Kirk McKusick authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    d39e9a6 View commit details
    Browse the repository at this point in the history
  5. Updates to UFS/FFS superblock integrity checks when reading a superbl…

    …ock.
    
    Check for an uninitialed (zero valued) fs_maxbsize and set it
    to its minimum valid size (fs_bsize). Uninitialed fs_maxbsize
    were left by older versions of makefs(8) and the superblock
    integrity checks fail when they are found.
    
    No legitimate superblocks should fail as a result of these changes.
    
    MFC after:    1 week
    Sponsored by: The FreeBSD Foundation
    Kirk McKusick authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6234b49 View commit details
    Browse the repository at this point in the history
  6. Additional validity checking in newfs(8).

    A check in the superblock validity code verifies that the computed
    size of the filesystem cylinder groups (CGSIZE macro) does not
    exceed the filesystem block size (fs_bsize).
    
    A report was received that a filesystem had been flagged as failing
    this check. We were unable to determine how the reported filesystem
    could have been created. This commit adds a check at the end of the
    newfs(8) command to verify that the the cylinder group size is valid.
    If an oversize cylinder group is found newfs(8) prints a diagnostic
    output and rebuilds the filesystem to make it compiliant.
    
    MFC after:   1 week
    Kirk McKusick authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    794017b View commit details
    Browse the repository at this point in the history
  7. Fix printf format conflict

    MFC after:   1 week
    Kirk McKusick authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    33c440e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c7ccca4 View commit details
    Browse the repository at this point in the history
  9. Yet another try to fix printf format conflict.

    I find it very annoying that there is no FreeBSD infrastructure to
    determine failures across architectures other than to check in
    changes and then have Jenkins find them.
    
    Suggested by: Jessica Clarke
    MFC after:    1 week
    Kirk McKusick authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    2986b25 View commit details
    Browse the repository at this point in the history
  10. sctp: improve handling of stale cookie error causes

    * If a measure of staleness of 0 is reported, use the RTT instead.
    * Ensure that we always send a cookie preservative parameter by
      rounding up during the calculation.
    * If allowed, perform a round trip time measurement.
    * Clear the overall error counter, since the error cause also
      acts like an ACK.
    
    MFC after:	1 week
    tuexen authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    5be112d View commit details
    Browse the repository at this point in the history
  11. newfs: fix up 32-bit compile

    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    mjguzik authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    44a12f3 View commit details
    Browse the repository at this point in the history
  12. libifconfig: fix carp key configuration

    There were two issues with the carp key configuration in the new netlink
    code.
    
    The first is that userspace failed to actually pass the CARP_NL_KEY
    attribute to the kernel, so a key was never set.
    
    The second issue is that snl_attr_get_string() returns a pointer to the
    string inside the netlink message. It does not copy the string to the
    target buffer. That's somewhat inconvenient to work with in libifconfig
    where we have a static buffer for the key.
    Introduce snl_attr_copy_string() which can copy a string to a target
    buffer and uses the 'arg' parameter to pass the buffer size, so it
    doesn't accidentally exceed the available space.
    
    Reviewed by:	melifaro
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    Differential Revision:	https://reviews.freebsd.org/D39874
    kprovost authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    a846bcf View commit details
    Browse the repository at this point in the history
  13. contrib/bc: import version 6.5.0

    This release that fixes an infinite loop bug in the (non-standard)
    extended math library functions root() and cbrt(), fixes a bug with
    BC_LINE_LENGTH=0, and adds the fib() function to the extended math
    library to calculate Fibonacci numbers.
    
    (cherry picked from commit 438a1101dc1f687928cdbe02cd7817a88a24f42f)
    
    MFC after:      3 days
    stesser authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    5f97b5d View commit details
    Browse the repository at this point in the history
  14. listen(2): improve administrator control over logging

    As documented in listen.2 manual page, the kernel emits a LOG_DEBUG
    syslog message if a socket listen queue overflows. For some appliances,
    it may be desirable to change the priority to some higher value
    like LOG_INFO while keeping other debugging suppressed.
    
    OTOH there are cases when such overflows are normal and expected.
    Then it may be desirable to suppress overflow logging altogether,
    so that dmesg buffer is not flooded over long run.
    
    In addition to existing sysctl kern.ipc.sooverinterval,
    introduce new sysctl kern.ipc.sooverprio that defaults to 7 (LOG_DEBUG)
    to preserve current behavior. It may be changed to any value
    in a range of 0..7 for corresponding priority or to -1 to suppress logging.
    Document it in the listen.2 manual page.
    
    MFC after:	1 month
    Eugene Grosbein authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    14f195a View commit details
    Browse the repository at this point in the history
  15. arm: Remove TI code from GENERIC

    TI support is in a sad state for years.
    We haven't been able to keep up with all the breaking changes that
    upstream do in the DTS. This requires a lot of new drivers to handle the
    new buses that they create and all the new clocks that they expose.
    Keep the code for now in case somebody is interested in reviving this
    platform but stop bloating GENERIC with code that don't work.
    
    Reviewed by:	imp, mmel
    MFC after:	never
    Sponsored by:	Beckhoff Automation GmbH & Co. KG
    Differential Revision:	https://reviews.freebsd.org/D39843
    evadot authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    7245398 View commit details
    Browse the repository at this point in the history
  16. armv7: release: Stop installing BBB u-boot

    BBB code was removed from GENERIC kernel as it's not functional.
    Stop installing u-boot for a platform that we don't boot on.
    
    Reviewed by:	imp, gjb
    Approved by:	re@ (gjb)
    MFC after:	never
    Sponsored by:	Beckhoff Automation GmbH & Co. KG
    Differential Revision:	https://reviews.freebsd.org/D39844
    evadot authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    3be3e78 View commit details
    Browse the repository at this point in the history
  17. fwget: Introduce new utility

    This script's goal is to check the system for peripherals that needs
    firmware and install the needed packages for them.
    For now it only support pci subsystem and only video classes for AMD
    and Intel GPUs.
    
    Reviewed by:	bapt
    Sponsored by:	Beckhoff Automation GmbH & Co. KG
    Differential Revision:	https://reviews.freebsd.org/D39825
    evadot authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    dc8f6c0 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f180149 View commit details
    Browse the repository at this point in the history
  19. opensm: Fix build with -Werror and -Wdate-time.

    This fixes builds WITH_OFED_EXTRA=YES .
    
    PR:		270776
    Pull Request:	freebsd/freebsd-src#715
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    igalic authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    56431f4 View commit details
    Browse the repository at this point in the history
  20. libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table.

    To allow userspace utilities to use these devices.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    ed2d3f4 View commit details
    Browse the repository at this point in the history
  21. netlink: always zero provided header buffers.

    Reported by:	KMSAN
    MFC after:	3 days
    AlexanderChernikov authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    99b8920 View commit details
    Browse the repository at this point in the history
  22. pf: reduce number of hashing operations when handling source nodes

    Reduce number of hashing operations when handling source nodes by always
    having a pointer to the hash row mutex in the source node. Provide
    macros for handling and asserting the mutex. Calculate the hash only
    once in pf_find_src_node() and then use this hash in subsequent
    operations.
    
    Cherry-picked from development of D39880
    
    Reviewed by:	kp, mjg
    Sponsored by:	InnoGames GmbH
    Differential Revision:	https://reviews.freebsd.org/D39888
    TuxPowered42 authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    8e2f40e View commit details
    Browse the repository at this point in the history
  23. libc: Fix a documentation spelling mistake

    tomhukins authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    5a1e0e9 View commit details
    Browse the repository at this point in the history
  24. pf: Fix a spelling mistake in a comment

    tomhukins authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    9c7c674 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    dd83229 View commit details
    Browse the repository at this point in the history
  26. netlink: whitespace fix in netlink_message_writer.h.

    Reported by:	garga
    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    bd174ae View commit details
    Browse the repository at this point in the history
  27. mfi(4): Refer to mrsas(4)

    Reviewed by:	imp
    Pull Request:	freebsd/freebsd-src#722
    tomhukins authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    7674e1c View commit details
    Browse the repository at this point in the history
  28. geom(4): Add cross reference to geom(8)

    PR:		264387
    Reviewed by:	ceri
    Pull Request:	freebsd/freebsd-src#702
    tomhukins authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    2fe14dc View commit details
    Browse the repository at this point in the history
  29. hwpmc: Fix a typo

    MFC after:	1 week
    markjdb authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    9262543 View commit details
    Browse the repository at this point in the history
  30. fbt: get rid of redundant defines

    No functional change intended.
    
    Reviewed by:	markj
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39882
    christosmarg authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    ac8508f View commit details
    Browse the repository at this point in the history
  31. kinst: test lock in kinst_trampoline_dealloc_locked()

    Reviewed by:	markj
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39883
    christosmarg authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    f2174d8 View commit details
    Browse the repository at this point in the history
  32. Cirrus-CI: set PKG_FORMAT via top level env:

    This ensures consistency among different CI scripts, including future
    ones for pkgbase work.
    
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b591e96 View commit details
    Browse the repository at this point in the history
  33. pkgbase: hide duplicate METALOG directory warnings under verbose

    Creating directories multiple times is an inherent side effect of the
    way installation is done.  Hide warnings from duplicate directory
    entries (with identical metadata) under metalog_reader's verbose mode.
    
    Duplicate file entries are always reported.  They currently generate
    warnings but will be switched to errors once the few instances currently
    in the tree are fixed.
    
    PR:		244596, 271178
    Reviewed by:	kevans
    Sponsored By:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39898
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b072362 View commit details
    Browse the repository at this point in the history
  34. bxe: prefer C99 bool to boolean_t

    Differential Revision:	https://reviews.freebsd.org/D20853
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    9d4e967 View commit details
    Browse the repository at this point in the history
  35. bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob

    A user may use a tool chain from a package or just use an existing
    tool chain from a previous installation.  There is no reason for this
    to disable the installation of lib${LIB}_pic.a.
    
    This also means we don't need to force MK_TOOLCHAIN=yes in lib/libc.
    
    This reverts part of commit c0f5aeb.
    
    Reviewed by:	jrtc27
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39917
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b867a12 View commit details
    Browse the repository at this point in the history
  36. stand/boot1.efi: Allow modules to add env variables

    Sometimes filesystem modules need to pass details of the state of the
    filesystem to later stages of a boot. Provide a generic method to do
    so. We'll add them after any env variables set in our config files.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39407
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    2b79cea View commit details
    Browse the repository at this point in the history
  37. stand/zfs: Move spa_find_by_dev from zfsimpl.c to zfs.c

    zfsimpl.c doesn't know about devdesc at all, but zfs.c does. Move it to
    zfs.c, which is the only user. Keep it static for now, but it could be
    exposed later if something else were to need it.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39408
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    5bff53a View commit details
    Browse the repository at this point in the history
  38. stand/zfs: Refactor zfs_get_bootenv

    Create a new interface to zfs_get_bootenv called zfs_get_bootenv_spa
    which takes a spa instead of a void * (effectively a devdesc *). Use
    that in zfs_get_bootenv.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39409
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    81a59c7 View commit details
    Browse the repository at this point in the history
  39. stand/zfs: Refactor zfs_set_bootenv

    Refactor zfs_set_bootenv to split out the lookup of spa from the
    rest. zfs_set_bootenv_spa flushes the benv to the vdevs and updates the
    cached benv.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39410
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    84d4f83 View commit details
    Browse the repository at this point in the history
  40. stand/zfs: Refactor zfs_get_bootonce

    Lookup the spa and pass it into zfs_get_bootonce_spa to process the boot
    once protocol.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39411
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    ce780c2 View commit details
    Browse the repository at this point in the history
  41. stand/boot1.efi: Implement bootonce for ZFS

    Implement ZFS bootonce protocol. We pass zfs-bootonce=t to the next boot
    stage as a command line argument. Unlike zfsboot -> loader handoff in
    the BIOS case, we don't use the OS_BOOTONCE_USED. This would require
    modifications to loader.efi which would only server to make it more
    complicated. Instead, use the command line parsing interface for the
    boot1.efi -> loader.efi to pass in the zfs-bootonce kenv that will be
    needed by rc.d/zfsbe to activate the BE if boot progresses that far.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39412
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6fe574a View commit details
    Browse the repository at this point in the history
  42. rc.d/zfsbe: Simplify

    So $(foo) is a shorter version of "`foo`".
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39413
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    0339f45 View commit details
    Browse the repository at this point in the history
  43. stand/userboot: Simplify code

    We have way more than 8k of stack for the current value of the zfs
    bootonce attribute. Allocate buf on the stack rather than the
    complicated malloc / free dance.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans, jhb
    Differential Revision:	https://reviews.freebsd.org/D39414
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    8433e07 View commit details
    Browse the repository at this point in the history
  44. stand/efi: Simplify code here

    We have plenty of stack in the EFI case, so use it instead of the
    complicated malloc / free dance.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39415
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    e1624cd View commit details
    Browse the repository at this point in the history
  45. stand/kboot: Simplify

    There's plenty of stack in kboot, so use it here rather than the
    malloc/free dance.
    
    Sponsored by:		Netflix
    Reviewed by:		tsoome, kevans
    Differential Revision:	https://reviews.freebsd.org/D39416
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    502556d View commit details
    Browse the repository at this point in the history
  46. stand: Fix warning about variable unused

    dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the
    ifdef.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    4a79caa View commit details
    Browse the repository at this point in the history
  47. stand: remove ZFS warning about computered but unused variable

    Toss a __unused on the unexpected_errors variable. We compute it, but
    never use it.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    8551516 View commit details
    Browse the repository at this point in the history
  48. stand: back out the most of the horrible aarch64 kludge

    Add one ifdef to upstrem code and get rid of compiling the horrible
    checked-in aarch64 assembler for the boot loader that the loader will
    never use. I'll attempt to upstream this and adjust as needed.
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39897
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    944a516 View commit details
    Browse the repository at this point in the history
  49. stand: Add isspace to FreeBSD ctypes.h

    And eliminate blake3_impl_hack.c since it's no longer needed.
    
    Sponsored by:		Netflix
    Reviewed by:		delphij
    Differential Revision:	https://reviews.freebsd.org/D39899
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    38571b9 View commit details
    Browse the repository at this point in the history
  50. kboot: Add HOST_MAP_FAILED define

    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39790
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    1f78451 View commit details
    Browse the repository at this point in the history
  51. stand: Testing program for smbios

    Write a quick and dirty testing program to dump physical memory to help
    test and debug the smbios.c code in new environments.
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39791
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    4846527 View commit details
    Browse the repository at this point in the history
  52. kboot: Fix an off by one error

    Fix an off-by-one error that would mean we'd get stuck on the newline if
    ACPI= wasn't first.
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39817
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    dfe8ef5 View commit details
    Browse the repository at this point in the history
  53. kboot: Add smbios support

    Add support for getting smbios from /sys/firmware/efi/systab, if
    any. Add ptov mapping that uses mmap on /dev/mem to do the mapping with
    64k pages (usually we only need 1 or two mappings).
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39792
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    0a29ef8 View commit details
    Browse the repository at this point in the history
  54. stand: Avoid unaligned access in smbios code

    This code was written on x86 where unaligned accesses were
    easy. LinuxBoot running on aarch64 uses mmap of /dev/mem to read the
    smbios table. Linux's mapping of this memory doesn't allow the normal
    unaligned fixup, so we get a bus error instead. We can't use the more
    natural le16dec and friends because they optimize into a single,
    unaligned memory load. We don't see this issue on aarch64 UEFI because
    memory is mapped such that unaligned accesses are fixed up.
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39793
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    a5e9646 View commit details
    Browse the repository at this point in the history
  55. stand: More protection against malformed smbios tables

    Add some more sanity checks to make sure we don't march off the end of
    the table. Typically, smbios structures are well formed, or Windows
    wouldn't boot. Sometimes they aren't, and this at least fails safe.
    
    Sponsored by:		Netflix
    Differential Revision:	https://reviews.freebsd.org/D39794
    bsdimp authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    f7d2340 View commit details
    Browse the repository at this point in the history
  56. src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN

    Prior to 590461a installation of include files was controlled
    directly by ${MK_TOOLCHAIN}.  590461a added an INCLUDES knob
    defaulting to YES.  Setting WITHOUT_TOOLCHAIN forced it off to retain
    existing behaviour.
    
    Decouple them now, as there are reasonable use cases for installing
    libraries and include files without a compiler or other tool chain
    components.
    
    Reviewed by:	imp, jrtc27
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39918
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    2275f1a View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    ed656fd View commit details
    Browse the repository at this point in the history
  58. MFV: less v632.

    MFC after:	2 weeks
    delphij authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    c8ac864 View commit details
    Browse the repository at this point in the history
  59. amd64: move definition of the struct pmap_pcids into _pmap.h

    and rename the structure to pmap_pcid.
    
    Reviewed by:	markj
    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39890
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b275baa View commit details
    Browse the repository at this point in the history
  60. amd64 pmap: add pmap_pinit_pcids() helper

    to initialize pm_pcids array for a new user pmap
    
    Reviewed by:	markj
    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39890
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    723b1f5 View commit details
    Browse the repository at this point in the history
  61. amd64: add pmap_get_pcid() helper

    Reviewed by:	markj
    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39890
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b3c9889 View commit details
    Browse the repository at this point in the history
  62. amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead o…

    …f cpuid
    
    Cpuid is used to index the pmap->pm_pcids array only.
    
    Reviewed by:	markj
    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39890
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    13833b0 View commit details
    Browse the repository at this point in the history
  63. amd64: store pcids pmap data in pcpu zone

    This change eliminates the struct pmap_pcid array embedded into struct
    pmap and sized by MAXCPU, which would bloat with MAXCPU increase.  Also
    it removes false sharing of cache lines, since the array elements are
    mostly locally accessed by corresponding CPUs.
    
    Suggested by:	mjg
    Reviewed by:	markj
    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39890
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    53434fc View commit details
    Browse the repository at this point in the history
  64. Intel DMAR: remove parsing of 6-level paging capability

    Early versions of the VT-d spec mentioned 6-level paging support as a
    possible value for the SAGAW capability, but later versions removed it
    and SAGAW=0x10 is currently listed as a reserved value.
    
    The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic
    with clang15 because the attempted comparison against 1ULL << 64 in
    dmar_maxaddr2mgaw() causes the compiler to elide the last iteration
    of the initial loop, which bypasses the subsequent logic to find the
    greatest HW-supported address width.  This results in 5-level paging
    always being selected regardless of whether the hardware supports it,
    which can result address translation failure due to invalid context-
    entry programming.
    
    Reviewed by:	kib
    MFC after:	3 days
    Differential Revision: https://reviews.freebsd.org/D39896
    Jason A. Harmening authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    e739040 View commit details
    Browse the repository at this point in the history
  65. fstatat(2): restore AT_EMPTY_PATH handling

    Fixes:	cb85834
    Reported by:	markj
    Sponsored by:	The FreeBSD Foundation
    kostikbel authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6a31b8e View commit details
    Browse the repository at this point in the history
  66. rtsol: introduce an 'always' script

    In addition to the 'M' and 'O' scripts (for when 'Managed' and 'Other'
    flags are set) also introduce an 'always' script that is called for any
    router advertisement (so even if M and O are not set).
    
    This is primarly useful for systems like pfSense that wish to be
    informed of routers for further system configuration.
    
    See also https://redmine.pfsense.org/issues/14072
    
    Reviewed by:	melifaro
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    Differential Revision:	https://reviews.freebsd.org/D39931
    kprovost authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    b86a212 View commit details
    Browse the repository at this point in the history
  67. riscv: remove unused string from swtch.S

    MFC after:	3 days
    Sponsored by:	The FreeBSD Foundation
    mhorne authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    7709eda View commit details
    Browse the repository at this point in the history
  68. riscv: retire the FPE kernel option

    We always build the kernel floating point support. Now that the
    riscv64sf userspace variant has been removed the option is required for
    correct operation.
    
    Reviewed by:	jhb
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39851
    mhorne authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    e3caf01 View commit details
    Browse the repository at this point in the history
  69. IfAPI: Add if_maddr_empty() to check for any maddrs

    if_llmaddr_count() only counts link-level multicast addresses.
    hv_netvsc(4) needs to know if there are any multicast addresses.  Since
    hv_netvsc(4) is the only instance where this would be used, make it a
    simple boolean.  If others need a if_maddr_count(), that can be added in
    the future.
    
    Reviewed by:	melifaro
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D39493
    chmeeedalf authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    716f7fe View commit details
    Browse the repository at this point in the history
  70. Mechanically convert if_hn(4) to IfAPI

    Reviewed by:	zlei
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D37855
    chmeeedalf authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    85eff8a View commit details
    Browse the repository at this point in the history
  71. Convert nfs bootp/diskless to use IfAPI

    Use the new IfAPI interface and address iterators so the nfs driver
    doesn't need direct access to the interface structures.
    
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D38962
    chmeeedalf authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    3c7f326 View commit details
    Browse the repository at this point in the history
  72. vmrun.sh: mention new edk2 package

    uefi-edk2-bhyve no longer exists.
    
    Reviewed by:	markj
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39937
    christosmarg authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    31f3ad9 View commit details
    Browse the repository at this point in the history
  73. rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no

    rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was
    no.  This was done as part of a change to fix building rtld with
    MK_TOOLCHAIN == no (although I'm not sure this part was necessary).
    
    In any case as of 5f2e840 libc_pic.a is built independent of the
    MK_TOOLCHAIN setting and the main part of the workaround has already
    been removed.  Remove the rest now.
    
    This reverts commit c0f5aeb.
    
    Reviewed by:	jrtc27
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39938
    emaste authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    0e1b16c View commit details
    Browse the repository at this point in the history
  74. riscv: Add pass(4) to GENERIC kernel

    Whilst we don't have ahci(4) currently, we do have umass(4), and need
    pass(4) for smartctl(8) to be able to talk to such devices.
    
    Reported by:	David Gilbert <[email protected]>
    MFC after:	1 week
    jrtc27 authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    f5c78e2 View commit details
    Browse the repository at this point in the history
  75. vfs: reduce audit branching in namei_setup

    mjguzik authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    e307973 View commit details
    Browse the repository at this point in the history
  76. RELNOTES: Add fwget entry

    Sponsored by:	Beckhoff Automation GmbH & Co. KG
    evadot authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    7a063ed View commit details
    Browse the repository at this point in the history
  77. RELNOTES: Document TI code removal from armv7 GENERIC kernel

    Suggested by:	mhorne
    Sponsored by:	Beckhoff Automation GmbH & Co. KG
    evadot authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    4844a5b View commit details
    Browse the repository at this point in the history
  78. pf: simplify structs with anonymous unions

    Rather than playing preprocessor hacks use actual anonymous unions.
    No functional change.
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6425ef9 View commit details
    Browse the repository at this point in the history
  79. pf: improve source node error handling

    Functions manipulating source nodes can fail due to various reasons like
    memory allocation errors, hitting configured limits or lack of
    redirection targets. Ensure those errors are properly caught and
    propagated in the code. Increase the error counters not only when
    parsing the main ruleset but the NAT ruleset too.
    
    Cherry-picked from development of D39880
    
    Reviewed by:	kp
    Sponsored by:	InnoGames GmbH
    Differential Revision:	https://reviews.freebsd.org/D39940
    TuxPowered42 authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    4a3593c View commit details
    Browse the repository at this point in the history
  80. zfs: merge openzfs/zfs@d96e29576

    Notable upstream pull request merges:
    
      #11680 Add support for zpool user properties
      #14145 Storage device expansion "silently" fails on degraded vdev
      #14405 Create zap for root vdev
      #14659 Allow MMP to bypass waiting for other threads
      #14674 Miscellaneous FreBSD compilation bugfixes
      #14692 Fix some signedness issues in arc_evict()
      #14702 Fix typo in check_clones()
      #14715 module: small fixes for FreeBSD/aarch64
      #14716 Trim needless zeroes from checksum events
      #14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter
      #14722 Fix "Detach spare vdev in case if resilvering does not happen"
      #14723 freebsd clone range fixes
      #14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS
      #14735 Fix in check_filesystem()
      #14739 Fix data corruption when cloning embedded blocks
      #14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic
      #14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"
      #14774 FreeBSD .zfs fixups
      #14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration
      #14779 powerpc64: Support ELFv2 asm on Big Endian
      #14788 FreeBSD: add missing vop_fplookup assignments
      #14789 PAM: support the authentication facility
      #14790 Revert "Fix data race between zil_commit() and zil_suspend()"
      #14795 Fix positive ABD size assertion in abd_verify()
      #14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE
      #14804 Correct ABD size for split block ZIOs
      #14806 Use correct block pointer in block cloning case.
      #14808 blake3: fix up bogus checksums in face of cpu migration
    
    Obtained from:	OpenZFS
    OpenZFS commit:	d96e295
    mmatuska authored and bsdjhb committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    d2cca09 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. git subrepo pull --force sys/contrib/subrepo-openzfs

    subrepo:
      subdir:   "sys/contrib/subrepo-openzfs"
      merged:   "01ab861b726b"
    upstream:
      origin:   "https://github.com/CTSRD-CHERI/zfs.git"
      branch:   "cheri-hybrid"
      commit:   "01ab861b726b"
    git-subrepo:
      version:  "0.4.3"
      origin:   "???"
      commit:   "???"
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    b83cc6c View commit details
    Browse the repository at this point in the history
  2. authpf: do not sprintf to a null pointer

    The fgetln loop will terminate with buf = NULL at EOF.
    
    Reported by:	GCC
    Reviewed by:	kp
    MFC after:	3 days
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39947
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e773bc1 View commit details
    Browse the repository at this point in the history
  3. sctp: improve shutdown(..., SHUT_WR) handling

    When shutdown(..., SHUT_WR) is called in the front states, send a
    SHUTDOWN chunk when a COOKIE ACK chunk is received and there is
    no outstanding data.
    
    MFC after:	1 week
    tuexen authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f9f5930 View commit details
    Browse the repository at this point in the history
  4. src.conf: add WITH_TOOLCHAIN description

    It is not used by the in-tree default configuration, but adding it
    allows downstream projects with different defaults to make use of
    Cirrus-CI (as the makeman test added in 85e8c2a requires that
    there are no missing option descriptions).
    
    Reviewed by:	imp
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39936
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    54d71b3 View commit details
    Browse the repository at this point in the history
  5. unix: Fix locking in uipc_peeraddr()

    After the locking protocol changed in commit 75a67bf ("AF_UNIX:
    make unix socket locking finer grained"), uipc_peeraddr() was not
    updated accordingly.
    
    The link lock now only protects global socket lists.  The PCB lock is
    used to protect the link between connected PCBs, so use that.  Remove an
    old comment which appears to be noting that unp_conn is not set for
    connected SOCK_DGRAM sockets (in one direction anyway).
    
    Reviewed by:	glebius
    MFC after:	1 week
    Differential Revision:	https://reviews.freebsd.org/D39855
    markjdb authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3140738 View commit details
    Browse the repository at this point in the history
  6. sctp: only start shutdown guard timer when sending SHUTDOWN chunk

    The intention is to protect a malicious peer not following the
    shutdown procedures.
    
    MFC after:	1 week
    tuexen authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    880bd58 View commit details
    Browse the repository at this point in the history
  7. local.meta.sys.mk set BOOTSTRAPPING

    When building for host on non-FreeBSD
    some makefiles want to see BOOTSTRAPPING defined.
    
    With this libmd and hence nmtree build ok
    sgerraty authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    dfff4de View commit details
    Browse the repository at this point in the history
  8. fsck_ffs: fix the previous change that skipped pass 5 in some cases

    The previous change involved calling check_cgmagic() twice in a row
    for the same CG in order to differentiate when the CG was already ok vs.
    when the CG was rebuilt, but that doesn't work because the second call
    (which was supposed to rebuild the CG) returns 0 (indicating that
    the CG was not rebuilt) due to the prevfailcg check causing an early
    failure return.  Fix this by moving the rebuild part of check_cgmagic()
    out into a separate function which is called by pass1() when it wants to
    rebuild a CG.
    
    Fixes: da86e7a
    Reported by:	pho
    Discussed with:	mckusick
    Sponsored by:	Netflix
    Chuck Silvers authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    06b5e6b View commit details
    Browse the repository at this point in the history
  9. release: Report disk image filename

    For someone new to the release bits it's not always clear what files are
    being created. Report the disk image name explicitly.
    
    Reviewed by:	gjb
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39953
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9fbeded View commit details
    Browse the repository at this point in the history
  10. ObsoleteFiles: Complete 20201025: Remove cal data files

    Fixes:	d20d655 calendar: remove all datafiles except freebsd one
    MFC after:	3 days
    lwhsu authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    d20f731 View commit details
    Browse the repository at this point in the history
  11. stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_z…

    …aps_v2
    
    com.klarasystems:vdev_zaps_v2 is a new feature that the last OpenZFS
    import brought in. It needs to be on the list of supported features, but
    that update didn't happen so I woke up to a mailbox with multiple
    complaints.
    
    CirrusCI test to boot twice with a zpool update inbetween coming later
    today.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    60a2148 View commit details
    Browse the repository at this point in the history
  12. amd64: initialize APs kpmap_store in init_secondary()

    The APs pcpu area is zeroed in init_secondary() by pcpu_init(), so the
    early initialization in pmap_bootstrap() is nop.
    
    Fixes:	42f722e721cd010ae5759a4b0d3b7b93c2b9cad2ESC
    Reviewed by:	markj
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39945
    kostikbel authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6dc1b3e View commit details
    Browse the repository at this point in the history
  13. amd64: do not leak pcpu pages

    Do not preallocate pcpu area backing pages on early startup, only
    allocate enough of KVA for pcpu[MAXCPU] and the page for BSP.  Other
    pages are allocated after we know the number of cpus and their
    assignments to the domains.
    
    PCPUs are not accessed until they are initialized, which happens on AP
    startup.
    
    Reviewed by:	markj
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39945
    kostikbel authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3e85991 View commit details
    Browse the repository at this point in the history
  14. amd64 mp_machdep.c: remove useless comment

    Reviewed by:	markj
    Sponsored by:	The FreeBSD Foundation
    Differential revision:	https://reviews.freebsd.org/D39945
    kostikbel authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f799970 View commit details
    Browse the repository at this point in the history
  15. Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a00…

    …4e57bb'
    
    git-subtree-dir: contrib/spleen
    git-subtree-mainline: 3582acb
    git-subtree-split: 5eab633
    
    Reviewed by:	imp [earlier]
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D20653
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    b3a8736 View commit details
    Browse the repository at this point in the history
  16. pf: remove NULL check before uma_zfree()

    uma_zfree() can be called on a NULL pointer. Simplify the pf code a
    little by removing the redundant checks.
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    4eb4b8f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    61767e4 View commit details
    Browse the repository at this point in the history
  18. dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE

    This helps avoid ugly noise in dirdeps.cache on Linux.
    sgerraty authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    1973ac4 View commit details
    Browse the repository at this point in the history
  19. ncal: Error out if writing to stdout failed.

    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	kevans, imp
    Differential Revision:	https://reviews.freebsd.org/D39958
    dag-erling authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    bd52001 View commit details
    Browse the repository at this point in the history
  20. tsort: Error out if writing to stdout failed.

    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	kevans, imp
    Differential Revision:	https://reviews.freebsd.org/D39959
    dag-erling authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    a0ec72c View commit details
    Browse the repository at this point in the history
  21. local.dirdeps.mk skip N_host_libs for non-FreeBSD host

    The N_host_libs dance only makes sense if host is FreeBSD.
    Even then, if MK_host_egacy is yes we need libmd
    
    libnetbsd does not need libutil when using libegacy
    
    Sponsored by:	Juniper Networks, Inc.
    sgerraty authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ec40484 View commit details
    Browse the repository at this point in the history
  22. md5 Makefile.depend.host

    sgerraty authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    52d6ea2 View commit details
    Browse the repository at this point in the history
  23. imgact_elf: Change header_supported to return bool instead of boolean_t.

    Reviewed by:	imp, kib, emaste
    Differential Revision:	https://reviews.freebsd.org/D39919
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    477bebf View commit details
    Browse the repository at this point in the history
  24. pmap_{un}map_io_transient: Use bool instead of boolean_t.

    Reviewed by:	imp, kib
    Differential Revision:	https://reviews.freebsd.org/D39920
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    183158b View commit details
    Browse the repository at this point in the history
  25. acpi_button: Replace boolean_t with better types.

    - Use an enum for the button type (it is not really a boolean value).
    
    - Use bool for fixed.
    
    Reviewed by:	imp, emaste
    Differential Revision:	https://reviews.freebsd.org/D39922
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    a9ead45 View commit details
    Browse the repository at this point in the history
  26. al: Replace boolean_t with either al_bool or bool.

    Use al_bool for interfaces and structures defined in the
    OS-independent HAL in sys/contrib, and use plain bool for
    FreeBSD-specific APIs and structures in sys/dev/al_eth.
    
    Reviewed by:	imp, emaste
    Differential Revision:	https://reviews.freebsd.org/D39923
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ecf570a View commit details
    Browse the repository at this point in the history
  27. dpaa2: Replace boolean_t with bool.

    This was already using true/false rather than TRUE/FALSE.
    
    Reviewed by:	imp, emaste
    Differential Revision:	https://reviews.freebsd.org/D39924
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    0214ed8 View commit details
    Browse the repository at this point in the history
  28. dwc(4): Use bool rather than boolean_t.

    This was already using true/false rather than TRUE/FALSE.
    
    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39925
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    649d5b9 View commit details
    Browse the repository at this point in the history
  29. ofw_cpu_early_foreach: Change callback to return bool instead of bool…

    …ean_t.
    
    Reviewed by:	imp
    Differential Revision:	https://reviews.freebsd.org/D39926
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f49da00 View commit details
    Browse the repository at this point in the history
  30. emac(4): Use bool rather than boolean_t.

    This was already using true/false rather than TRUE/FALSE.
    
    Reviewed by:	imp, emaste
    Differential Revision:	https://reviews.freebsd.org/D39927
    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    068f051 View commit details
    Browse the repository at this point in the history
  31. wlan(4): Mention WiFi more prominently

    WiFi is a commonly used term to describe wireless LANs.  Adding this
    word will help readers better understand the contents of this manual
    page and will help find the page when searching, for example when
    running `man -k wifi`.
    
    Pull Request: freebsd/freebsd-src#721
    Reviewed by: imp
    tomhukins authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c48097d View commit details
    Browse the repository at this point in the history
  32. bluetooth/hccontrol: Fix unterminated command list

    Signed-off-by: Brian Campbell <[email protected]>
    Reviewed by: imp
    Pull Request: freebsd/freebsd-src#730
    bacam authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e9eab91 View commit details
    Browse the repository at this point in the history
  33. mpr(4) & mps(4): refer to related utilities

    Reviewed by: imp
    Pull Request: freebsd/freebsd-src#729
    tomhukins authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6accebb View commit details
    Browse the repository at this point in the history
  34. mpsutil(8): Improve English usage

    Reviewed by: imp
    Pull Request: freebsd/freebsd-src#729
    tomhukins authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    a82e376 View commit details
    Browse the repository at this point in the history
  35. mpsutil(8): Remove a stray paragraph

    Spotted by running `mandoc -Tlint usr.sbin/mpsutil/mpsutil.8`.
    
    Reviewed by: imp
    Pull Request: freebsd/freebsd-src#729
    tomhukins authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    262f482 View commit details
    Browse the repository at this point in the history
  36. Add wifi(4) alias for wlan(4).

    Suggested by:		jrtc27
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    2aac494 View commit details
    Browse the repository at this point in the history
  37. sys/amd64/conf/FIRECRACKER: typo (compatiblity)

    https://bugs.freebsd.org/269753
    
    PR:                      269753
    Reported by:             Igor Ostapenko
    Approved by:             doc, src (delphij, imp, zlei)
    Differential revision:   https://reviews.freebsd.org/D38741
    ihoro authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    faccdfa View commit details
    Browse the repository at this point in the history
  38. sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity)

    https://bugs.freebsd.org/269753
    
    PR:                      269753
    Reported by:             Igor Ostapenko
    Approved by:             doc, src (delphij, imp, zlei)
    Differential revision:   https://reviews.freebsd.org/D38741
    ihoro authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    10d5be0 View commit details
    Browse the repository at this point in the history
  39. sys/sys/_endian.h: typo (Compatiblity)

    https://bugs.freebsd.org/269753
    
    PR:                      269753
    Reported by:             Igor Ostapenko
    Approved by:             doc, src (delphij, imp, zlei)
    Differential revision:   https://reviews.freebsd.org/D38741
    ihoro authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6d8b893 View commit details
    Browse the repository at this point in the history
  40. sys/x86/x86/mptable.c: typo (compatiblity)

    https://bugs.freebsd.org/269753
    
    PR:                      269753
    Reported by:             Igor Ostapenko
    Approved by:             doc, src (delphij, imp, zlei)
    Differential revision:   https://reviews.freebsd.org/D38741
    ihoro authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    7ea54e5 View commit details
    Browse the repository at this point in the history
  41. build.7: remove reference to deprecated mergemaster

    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    2cff78c View commit details
    Browse the repository at this point in the history
  42. ntpd: Support IPv6-only hosts

    0.pool.* returns only IPv4 addresses.
    2.pool.* returns both, IPv6 and IPv4 addresses.
    
    conservatively extend our IPv4 only pool configuration by adding a
    second pool, which also returns IPv6 addresses.
    
    PR:			270536
    Reported by:		Lapo Luchini <[email protected]>
    MFC after:		3 days
    Pull Request:		freebsd/freebsd-src#731
    Differential Revision:	https://reviews.freebsd.org/D39954
    Mina Galic authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e2cf506 View commit details
    Browse the repository at this point in the history
  43. pvscsi: maximum target number is one less than number of targets

    Fix the number of targets we inquiry to be one less than the maximum
    number of targets adapter reports.  This gets rid of the errors reported
    on VMware Workstation:
    
    (probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00
    (probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error
    
    While here, print the maximum number of targets.
    
    Reviewed by:	imp
    Differential Revision:	https://reviews.freebsd.org/D39867
    Yuri Pankov authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    fe71161 View commit details
    Browse the repository at this point in the history
  44. pf: fix a few more prototypes

    Fix function prototypes to use the same type for sa_family_t as the
    definition.
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    a7bbb14 View commit details
    Browse the repository at this point in the history
  45. Makefile.inc1: use make builtin :ts instead of sed

    Commit 3eb1b4da3cf7 replaced "xargs -n1" with a sed expression to
    convert from space to newline as a list separator for *-old-* targets.
    Dan Nelson followed up with a suggestion to use make's built-in :ts
    instead, which should be slightly more efficient.
    
    Reviewed by:	sjg
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39972
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    fbcd6df View commit details
    Browse the repository at this point in the history
  46. dd: Tidy up the tests.

    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	ngie
    Differential Revision:	https://reviews.freebsd.org/D39711
    dag-erling authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    f594e82 View commit details
    Browse the repository at this point in the history
  47. dd: Fix SIGINT handling.

    Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup().  There are several issues with this:
    
    * summary() is not signal safe;
    * the parent is not informed about the signal;
    * setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands.
    
    Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write().
    
    Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading.  I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script).
    
    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	cracauer, ngie, imp
    Differential Revision:	https://reviews.freebsd.org/D39641
    dag-erling authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    88959a8 View commit details
    Browse the repository at this point in the history
  48. bhyve(8): fix typo in examples

    PR:		271259
    Alexey Marchenko authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3b03b4c View commit details
    Browse the repository at this point in the history
  49. vmm: don't free unallocated memory

    If vmx or svm is disabled in BIOS or the device isn't supported by vmm,
    modinit won't allocate these state save areas. As kmem_free panics when
    passing a NULL pointer to it, loading the vmm kernel module causes a
    panic too.
    
    PR:			271251
    Reviewed by:		markj
    Fixes:			74ac712 ("vmm: Dynamically allocate a couple of per-CPU state save areas")
    MFC after:		1 week
    Sponsored by:		Beckhoff Automation GmbH & Co. KG
    Differential Revision:	https://reviews.freebsd.org/D39974
    ckoehne authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6d09623 View commit details
    Browse the repository at this point in the history
  50. libpcap: Update to 1.10.4

    Jehops authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3a35b7a View commit details
    Browse the repository at this point in the history
  51. share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU

    MFC after:	3 days
    Approved by:	jhibbits
    Differential revision:	https://reviews.freebsd.org/D39240
    pkubaj authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    12b5a94 View commit details
    Browse the repository at this point in the history
  52. man9: Add a manual page for kstack_contains(9).

    Approved by:	gnn (mentor)
    Reviewed by:	mhorne
    Differential Revision: https://reviews.freebsd.org/D39933
    jkoshy authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    2fe6175 View commit details
    Browse the repository at this point in the history
  53. daemon: EINTR from kevent(2) is not a fatal error

    Simply resume waiting for events rather than exiting if we took a signal
    here.
    
    This at least fixes running programs under daemon(8) in the face of
    suspend/resume, which I suspect hits us with a spurious EINTR rather
    than a signal anyways.
    
    Reported and tested by:	manu
    Fixes:	8935a39 ("daemon: use kqueue for all events")
    kevans91 authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    d7fc883 View commit details
    Browse the repository at this point in the history
  54. Apply libc++ fix for compiling <type_traits> with gcc 13

    Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath):
    
      [libc++] Use __is_convertible built-in when available
    
      llvm/llvm-project#62396 reports that
      GCC 13 barfs on parsing <type_traits> because of the declarations
      of `struct __is_convertible`.  In GCC 13, `__is_convertible` is a
      built-in, but `__is_convertible_to` is not.  Clang has both, so
      using either should be fine.
    
      Reviewed By: #libc, philnik
    
      Differential Revision: https://reviews.llvm.org/D149313
    
    Reported by:	Mark Millard <[email protected]>
    MFC after:	3 days
    DimitryAndric authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6d856d0 View commit details
    Browse the repository at this point in the history
  55. Add mrsasutil(8) as alias to mfiutil(8)

    mfiutil(8) in theory can work on devices attached to mrsas(4) but
    mrsas(4) is missing the FreeBSD mfi(4) ioctl support.  Once that
    support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4)
    attached devices.  So this commit depends on that.  When mrsasutil(8)
    is run it automatically opens /dev/mrsas0 instead of /dev/mfi0.
    Add -D <device> and -t <type> flag to optionally specify mrsas or mfi to
    work with the existing -u <unit>.  Device is the device node with or
    without /dev/
    
    PR:			https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794
    Differential Revision:	https://reviews.freebsd.org/D36343
    Tested by:		Dan Mahoney <[email protected]>
    Reviewed by:		jhb
    Doug Ambrisko authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    6635f4b View commit details
    Browse the repository at this point in the history
  56. nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers

    If the i-node number (d_fileno) for a file on the server did
    not fit in 32bits, it would be truncated to the low order 32bits
    for the NFSv3 Readdir and ReaddirPlus RPC replies.
    This is no longer correct, given that ino_t is now 64bits.
    
    This patch fixes this by sending the full 64bits of d_fileno
    on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply.
    
    PR:	271174
    Reported by:	[email protected]
    Tested by:	[email protected]
    MFC after:	2 weeks
    Rick Macklem authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    762d7b9 View commit details
    Browse the repository at this point in the history
  57. libfido2: update to 1.9.0

    Some highlights from NEWS:
    
     ** Added OpenSSL 3.0 compatibility.
     ** Removed OpenSSL 1.0 compatibility.
     ** Support for FIDO 2.1 "minPinLength" extension.
     ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation.
     ** Support for TPM 2.0 attestation.
     ** Support for device timeouts; see fido_dev_set_timeout().
     ** New API calls:
      - es256_pk_from_EVP_PKEY;
      - fido_cred_attstmt_len;
      - fido_cred_attstmt_ptr;
      - fido_cred_pin_minlen;
      - fido_cred_set_attstmt;
      - fido_cred_set_pin_minlen;
      - fido_dev_set_pin_minlen_rpid;
      - fido_dev_set_timeout;
      - rs256_pk_from_EVP_PKEY.
     ** Reliability and portability fixes.
     ** Better handling of HID devices without identification strings; gh#381.
    
    Relnotes:       Yes
    Sponsored by:   The FreeBSD Foundation
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9b0014c View commit details
    Browse the repository at this point in the history
  58. libfido2: update to 1.10.0

    Some highlights from NEWS:
    
     ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*();
        gh#480.
     ** New API calls:
      - fido_dev_info_set;
      - fido_dev_io_handle;
      - fido_dev_new_with_info;
      - fido_dev_open_with_info.
     ** Documentation and reliability fixes.
     ** Support for TPM 2.0 attestation of COSE_ES256 credentials.
    
    Relnotes:       Yes
    Sponsored by:   The FreeBSD Foundation
    emaste authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e6be29b View commit details
    Browse the repository at this point in the history
  59. Merged through May 5, 2023

    bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    39fa567 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    92b768b View commit details
    Browse the repository at this point in the history
  61. riscv: pmap_fault_fixup misbehaves on VM_PROT_WRITE_CAP

    If ftype is VM_PROT_WRITE | VM_PROT_WRITE_CAP but the PTE has PTE_W
    clear, we'll accidentally skip over the "goto done" and end up returning
    1 as if we did something.  For the same ftype, even if PTE_W is set, we
    won't assert PTE_D.  Fix by treating VM_PROT_WRITE as the flag it is
    rather than a whole value.
    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    05f63cb View commit details
    Browse the repository at this point in the history
  62. capdirty: introduce MI bits

    nwf authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    b888017 View commit details
    Browse the repository at this point in the history
  63. capdirty: capability presence information in mincore (MI bits)

    Now that we're tracking capdirty, it might be informative to show
    userland.  Once upon a time, we thought this might be part of the
    revoker implementation, but now we think it's just diagnostics.
    nwf authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c79a2f9 View commit details
    Browse the repository at this point in the history
  64. capdirty: introduce vm_page_mask_cap_prot

    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    bca516b View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    8b6ed94 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    29ad076 View commit details
    Browse the repository at this point in the history
  67. capdirty: vm_fault VM_PROT_WRITE_CAP vs. CAPSTORE

    * If we're allocating a page to store capabilities to it, assume we're
      about to do that in the near future and let hardware mark it CAPDIRTY,
      rather than requiring another trap to mark it CAPSTORE first.
    
    * Do the same thing if we're populating a page to store capabilities to
      it.
    
    * If we're on the soft_fast path, we might be upgrading a page from not
      storing capabilities to storing capabilities, so mark it CAPSTORE here,
      too.
    
    * Otherwise, if we're about to land a page, assume that we want to keep
      the existing CAPSTORE status and so zero VM_PROT_WRITE_CAP
    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    25bfa56 View commit details
    Browse the repository at this point in the history
  68. capdirty: vm_page_ps_test PS_ALL_CAPSTORE predicate

    When we're fishing around at the MI layer to see if we can advise
    pmap_enter to install a superpage of some form, vm_page_ps_test runs
    predicates across the contiguous collection of pages.  Add a predicate
    that all pages are considered possibly cap-bearing (i.e., are all
    PGA_CAPDIRTY).
    
    When we're attempting to map a superpage in a cap-store permitting
    way, use this predicate to make sure that all constituent pages are
    PGA_CAPDIRTY, just as we would have if we'd mapped them individually.
    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    dba9505 View commit details
    Browse the repository at this point in the history
  69. capdirty: mark CAPDIRTY in page in from the swap_pager

    The swap pager might directly set tags on physical pages, bypassing
    the MMU.  Go ahead and mark the vm_page as CAPDIRTY (and CAPSTORE) in
    such cases.
    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    aa0c975 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    9553552 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    9302511 View commit details
    Browse the repository at this point in the history
  72. capdirty: add vm.capstore_on_alloc sysctl

    When first mapping a page with abstract capability store permission,
    should we map it CAPSTORE?  If we think that it's likely to experience
    actual capability stores soon, yes; if not, then these cap-devoid pages
    will create extra work for the (eventual) revoker.  Add sysctl so we
    can experiment; default to minimizing traps (vm.capstore_on_alloc=1).
    nwf-msr authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3082649 View commit details
    Browse the repository at this point in the history
  73. capdirty morello: add pmap_pte_dirty()

    This function replaces the pattern:
    
    	if (pmap_pte_dirty(pmap, pte))
    		vm_page_dirty(m);
    
    In this commit it's a (mostly) straightfoward simplification replacing
    all but one call to vm_page_dirty().  A follow on change will use it to
    set the capability dirty state (capdirty) as required.
    
    Co-authored-by: Nathaniel Filardo <[email protected]>
    Co-authored-by: Brett Gutstein <[email protected]>
    3 people authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    cdd9017 View commit details
    Browse the repository at this point in the history
  74. capdirty riscv: add pmap_pte_dirty()

    This function replaces the pattern:
    
    	if ((l3e & PTE_D) != 0)
    		vm_page_dirty(m);
    
    In this commit it's a (mostly) straightfoward simplification replacing
    all but one call to vm_page_dirty().  A follow on change will use it to
    set the capability dirty state (capdirty) as required.
    
    Co-authored-by: Nathaniel Filardo <[email protected]>
    2 people authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    370181d View commit details
    Browse the repository at this point in the history
  75. capdirty riscv: add support for capdirty tracking

    While here, move EXCP_STORE_AMO_CAP_PAGE_FAULT traps to the ordinary
    data_abort() path.  This builds directly on VM_PROT_WRITE_CAP,
    unlike in the MIPS analogue, for which the equivalent of
    EXCP_STORE_AMO_CAP_PAGE_FAULT is a C2E trap, not a TLB trap.
    nwf authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    4f93f53 View commit details
    Browse the repository at this point in the history
  76. capdirty morello: support for capdirty tracking

    Co-authored by:	Brooks Davis <[email protected]>
    brettferdosi authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    1d52637 View commit details
    Browse the repository at this point in the history
  77. capdirty morello: work around lack of CDBM support in qemu

    Set ATTR_SC on kernel mappings rather than CDBM.  We don't currently
    need to track capdirty in kernel so just don't worry about it rather
    than attemping to emulate in a trap handler.
    
    Fixes: capdirty morello: support for capdirty tracking
    brooksdavis authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    532284c View commit details
    Browse the repository at this point in the history
  78. capdirty: first, minimal test in cheritest

    Co-authored-by: Brett Gutstein <[email protected]>
    2 people authored and bsdjhb committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    5816076 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    c0eea8d View commit details
    Browse the repository at this point in the history
  80. Merge remote-tracking branch 'origin/dev' into caprevoke

    This includes the merge of capdirty and tracing support into dev as well
    as updates from upstream.
    brooksdavis committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3486ce4 View commit details
    Browse the repository at this point in the history