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

Merge FreeBSD 2023-04-21 #1721

Merged
merged 460 commits into from
Jun 21, 2023
Merged

Merge FreeBSD 2023-04-21 #1721

merged 460 commits into from
Jun 21, 2023
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 20, 2023

  1. syscall.master: Fix comments

    Have more accruate comments. While #if, #else, etc are copied to the
    header files, lines that don't start with # are not.  And #include files
    are only output to sysinc (which winds up at the front of init_sysent.c
    which seems a bit odd). This is all radically undocumented, and likely
    has drifted somewhat from 4.4BSD and what other systems do (they've
    drifted too, fwiw).
    
    Sponsored by:		Netflix
    bsdimp committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    559b94a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    058aa79 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. Update meta.sys.mk and related local*mk

    Move the setting of TARGET_SPEC_VARS to local.sys.env.mk
    so meta.sys.mk can do the processing, and include local.meta.sys.mk
    later.
    
    Move the setting of GENDIRDEPS_FILTER*_VARS from local.gendirdeps.mk
    to local.meta.sys.mk so we can automatically set DEP_* at level 1+
    to avoid syntax errors when DEP_* variables are used in conditionals
    in Makefile.depend files.
    
    Update gendirdeps.mk just to get the documentation about the above.
    No functional change.
    
    local.dirdeps.mk be more careful about adding to DIRDEPS to avoid
    unnecessary overhead, and introducing cycles in the graph.
    Also set DEP_MACHINE_CPUARCH.
    
    Reviewed by:	stevek
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision:	https://reviews.freebsd.org/D39737
    sgerraty committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    f957a32 View commit details
    Browse the repository at this point in the history
  2. cxgbe(4): Update firmwares to version 1.27.3.0

    These are the changes since the last update (copy-pasted from the
    release notes for Chelsio Unified Wire v3.18.0.0):
    
    ====================
    Version : 1.27.3.0
    Date    : 04/07/2023
    
    Fixes
    -----
    BASE:
    - Fixed a hang if module eeprom reads gives invalid data.
    - KR backlplane no-fec link problem fixed.
    OFLD:
    - iscsi ddp errors fixed.
    - iwarp connection abort in rare cases causing NIC traffic hang fixed.
    
    ENHANCEMENTS
    ------------
    BASE:
    - Cisco GLC-TE 1G modules support added.
    
    ====================
    Version : 1.27.1.0
    Date    : 12/02/2022
    
    Fixes
    -----
    BASE:
    - memwrite dsgl cannot be used for T5.
    OFLD:
    - Enabled FCoE in SO adapters.
    - TOE-TLS crash fixed.
    - iscsi hang fixed.
    
    MFC after:	2 weeks
    Sponsored by:	Chelsio Communications
    np-2020 committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    ca5391b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    552815b View commit details
    Browse the repository at this point in the history
  4. bsdinstall avoid subdir depending on parent

    When not doing tree walks, it is bad for sub-dirs to depend on
    parents.  Move the generation of opt_osname.h to distextract
    and have others that need that depend on it.
    
    In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still works.
    
    Reviewed by:	obrien
    Differential Revision:	https://reviews.freebsd.org/D39742
    sgerraty committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    0c3627f View commit details
    Browse the repository at this point in the history
  5. Remove stray line

    Forgot to remove this in 559b94a.
    
    Fixes:		559b94a
    Sponsored by:	Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    8fc68c1 View commit details
    Browse the repository at this point in the history
  6. syscall.master: Remove stray 4.2

    Back in 4.3BSD, the system call table wasn't generated, and there was an
    entry:
            "4.2 sigreturn",        /* 139 = old 4.2 sigreturn */
    This got converted to
    139     OBSOL   0 4.2 sigreturn
    in 4.3 RENO. Since it was obsolete, nothing bad happened. In fact,
    there was code in makeyscalls.sh to cope:
            {       comment = $4
                    for (i = 5; i <= NF; i++)
                            comment = comment " " $i
                    if (NF < 5)
                            $5 = $4
            }
    so the generated comment in syscalls.c was almost correct:
            "obs_4.2",                      /* 139 = obsolete 4.2 sigreturn */
    a bug that we have to this very day, despite makesyscalls.sh being
    rewritten in lua.
    
    However, this historical wart is the only place in our current
    syscalls.master file where we have an extra field for the 'not
    generated' class of system calls. Remove the historical wart so that the
    re-write of makesyscalls.lua can be simpler (so, I hope, qemu's bsd-user
    can large swathes of code automatically generated too). This should help
    make things more understandable (changes to simplify makesyscalls.lue
    aren't quite debugged, so have to wait for another day).
    
    There's 3 different obsolete sigreturns (but only 1 that was ever in
    FreeBSD 2.x and newer).
    
    Sponsored by:		Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    602b575 View commit details
    Browse the repository at this point in the history
  7. syscalls: regenerate

    The 4.2 sigreturn was a bit of a enima so the 4.2 was remove. Regenerate
    to cope the very minor changes in comments and one string.
    
    Sponsored by:		Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    9abba78 View commit details
    Browse the repository at this point in the history
  8. linuxkpi: Fix __sg_alloc_table_from_pages loop

    Commit 3e0856b updated
    __sg_alloc_table_from_pages to use the same API as linux, but modified
    the loop condition when going over the pages in a sg list. Part of the
    change included moving the sg_next call out of the for loop and into the
    body, which causes an off by one error when traversing the list. Since
    sg_next is called before the loop body it will skip the first element
    and read one past the last element.
    
    This caused panics when running PRIME with nvidia-drm as the off-by-one
    issue causes a NULL dereference.
    
    Reviewed by:	bz, hselasky
    Differential Revision:	https://reviews.freebsd.org/D39628
    Fixes:	3e0856b ("linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux")
    amshafer authored and evadot committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    3f68653 View commit details
    Browse the repository at this point in the history
  9. mpr: fix copying of event_mask

    Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the
    field event_mask was fully copied to the EventMasks field.
    After this commit the event_mask (uint8_t) is 4 times casted to
    EventMask (uint32_t). Because of that 24 bits of each event_mask array
    is lost.
    
    This commits brings back simple copying of field, and after words
    converting 32 bits field to the requested endian.
    
    I don't think we need more sophisticated method,
    as the array is of size 4 (for 32 bits version).
    
    Reviewed by:	imp
    MFC after:	1 week
    Sponsored by:	Klara Inc.
    Differential Revision:	https://reviews.freebsd.org/D39562
    oshogbo committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    ea6597c View commit details
    Browse the repository at this point in the history
  10. mpr: don't use hardcoded value in debug branch

    Pointed out by:	imp
    Sponsored by:   Klara Inc.
    oshogbo committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    444c661 View commit details
    Browse the repository at this point in the history
  11. pf.conf.5: minor improvements

    * Align 'on <interface>' parameter with the BNF, so use 'on <ifspec>'
    * Clarify etherprotospec BNF, to make it clearer that only numbers are
      supported.
    
    Suggested by:	Christian McDonald
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    4bfffd8 View commit details
    Browse the repository at this point in the history
  12. tcp: hpts needs to still call output even after input.

    The other stacks it turns out actually expect the output to be called and can become stuck if it is
    not. This is because they run there timer code from there and the input routine does not always
    assure a timer is running. The real longterm fix here might be to go into the other stacks (rack and bbr)
    and make sure that a timer is running after input if you don't do output.. as well as call the timer functions.
    This would cut down on calls from hpts. But I think its too dramatic of a change for the immediate time.
    
    Reviewed by: tuexen, glebius
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39738
    Randall Stewart authored and Randall Stewart committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    0121626 View commit details
    Browse the repository at this point in the history
  13. riscv: Compile instr_size.c into the kernel when DTrace is configured

    Reported by:	Jenkins
    Fixes:	080e56a ("dtrace: expose dtrace_instr_size() to userland and implement it for riscv")
    markjdb committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    92fa22c View commit details
    Browse the repository at this point in the history
  14. newvers: Use correct regexp

    There's no need to quote the # here. Inside of regexp, it's not treated
    like a comment from an awk perspective. And inside if '' it's not
    treated as special by the shell. gawk also warns.
    
    Sponsored by:		Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    2c19bee View commit details
    Browse the repository at this point in the history
  15. truss: Kill dead code

    If it doesn't exist, we don't need it in the table...
    
    Sponsored by:		Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    e63690e View commit details
    Browse the repository at this point in the history
  16. freebsd32: Regen

    Need to regen freebsd32 as well when sys/kern/syscalls.master is
    updated.
    
    Sponsored by:		Netflix
    bsdimp committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    7b42f33 View commit details
    Browse the repository at this point in the history
  17. llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set

    A few Makefiles overrode LINKS and MLINKS when WITH_LLVM_BINUTILS was
    set, which caused some llvm- prefixed tools to disappear.  One such case
    was llvm-ranlib, which some ports invoke explicitly.
    
    Use += when adding to LINKS and MLINKS under WITH_LLVM_BINUTILS.
    
    PR:		270955, 270956, 270959
    Submitted by:	jbeich
    Reviewed by:	arichardson
    Fixes: 021385a ("Add WITH_LLVM_BINUTILS to install LLVM binuti...")
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39747
    emaste committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    41df1d6 View commit details
    Browse the repository at this point in the history
  18. libcbor: update to 0.10.2

    Sponsored by:	The FreeBSD Foundation
    emaste committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    5d3e716 View commit details
    Browse the repository at this point in the history
  19. llvm-strings: Install as strings when WITH_LLVM_BINUTILS=YES

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D32065
    CRKatri authored and emaste committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    81fa5c4 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. tmpfs: unbreak module build outside of kernel build environment

    MFC after:	3 days
    Eugene Grosbein authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    8a7ee97 View commit details
    Browse the repository at this point in the history
  2. KASAN: add bus_space*read*_8 for aarch64

    Add the remaining bus_space*read*_8 functions conditionally for
    only arm64 in order to not break KASAN builds with new code using
    one of them.
    
    Suggested by:	markj
    Reviewed by:	markj
    MFC after:	3 days
    Differential Revision: https://reviews.freebsd.org/D39581
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2bab57e View commit details
    Browse the repository at this point in the history
  3. zfs: don't use zfs_freebsd_copy_file_range

    There is one data corruption problem reported and fixed upstream, not
    cherry-picked here yet.
    
    On top of it the following fires under load:
            VERIFY(zil_replaying(zfsvfs->z_log, tx));
    
    The patch which introduced the entire machinery is a revert candidate,
    but as the machinery came with a dedicated feature flag, doing so would
    render affected pools read-only at best. To be figured out.
    
    As a temporary bandaid at least stop the active usage.
    Note this patch does not make the feature disappear from zpool upgrade.
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f6062b7 View commit details
    Browse the repository at this point in the history
  4. zfs: Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()"

    This reverts commit 5198511.
    
    It results in data corruption, see:
    openzfs/zfs#14753
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    22495b1 View commit details
    Browse the repository at this point in the history
  5. cam: Properly mask out the status bits to get completion code

    ccb_h.status has two parts: the actual status and some addition bits to
    indicate additional information. It must be masked before comparing
    against completion codes. Add new inline function cam_ccb_success to
    simplify this to test whether or not the request succeeded. Most of the
    code already does this, but a few places don't (the rest likely should
    be converted to use cam_ccb_status and/or cam_ccb_success, but that's
    for another day). This caused at least one bug in recognizing devices
    behind a SATA port multiplexer, though some of these checks were
    fine with the special knowledge of the code paths involved.
    
    PR:			270459
    Sponsored by:		Netflix
    MFC After:		1 week (and maybe a EN requst)
    Reviewed by:		ken, mav
    Differential Revision:	https://reviews.freebsd.org/D39572
    bsdimp authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f2157d4 View commit details
    Browse the repository at this point in the history
  6. cam: fix up world compilation after previous

    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    29f9c4d View commit details
    Browse the repository at this point in the history
  7. cam: Include stdbool.h for userland

    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e99d385 View commit details
    Browse the repository at this point in the history
  8. Revert "cam: fix up world compilation after previous"

    This reverts commit 1d35493. It was the wrong fix. 757fc66 has
    the proper fix to include stdbool for userland.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5de082a View commit details
    Browse the repository at this point in the history
  9. loader: lua: unload the kernel when changing BEs

    Usually the kernel is loaded later, but there are circumstances where it
    could have been loaded earlier than changing BEs.  Unload anything that
    is already there so that we know we're using artifacts from the proper
    environment.
    
    PR:		265471
    Reviewed by:	kevans
    MFC after:	3 days
    signetica authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    45d8c1e View commit details
    Browse the repository at this point in the history
  10. loader: lua: disable autoboot timer after password entry

    In the lua loader, if one sets a password in loader.conf, the
    autoboot_delay timer will start before the menu is displayed.  One can
    interrupt the autoboot and bring up the menu by entering a keyboard
    character before the timer expires.
    
    If this is done a prompt for the password is displayed.  Entering the
    password will bring up the menu, but the timer will again start and
    another keyboard character must be entered or autoboot will abort the
    menu and boot the system.
    
    PR:		265472
    Reviewed by:	kevans
    MFC after:	3 days
    signetica authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    560933c View commit details
    Browse the repository at this point in the history
  11. Quiet compiler warnings for fget_noref and fdget_noref

    Summary:
    Typecasting both parts of the comparison to u_int quiets compiler
    warnings about signed/unsigned comparison and takes care of positive
    and negative numbers for the file descriptor in a single comparison.
    
    Obtained from:	Juniper Netwowrks, Inc.
    
    Reviewers: mjg
    
    Subscribers: imp
    
    Differential Revision: https://reviews.freebsd.org/D39593
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    cc0aed2 View commit details
    Browse the repository at this point in the history
  12. grdc.6: Add an ENVIRONMENT section

    - Add an ENVIRONMENT section
    
    Obtained from:	OpenBSD
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2fc55d0 View commit details
    Browse the repository at this point in the history
  13. morse.6: Mention to standards in the SEE ALSO section

    Mention ITU-T Recommendation F.1 and ITU-R M.1677-1
    in the SEE ALSO section.
    
    Obtained from:	OpenBSD
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f86f854 View commit details
    Browse the repository at this point in the history
  14. procctl: add state flags to PROC_REAP_GETPIDS reports

    For a process supervisor using the reaper API to track process subtrees,
    it is very useful to know the state of the processes on the list.
    
    Sponsored by:   https://www.patreon.com/valpackett
    Reviewed by:    kib
    MFC after:	1 week
    Differential Revision: https://reviews.freebsd.org/D39585
    valpackett authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7a72d4a View commit details
    Browse the repository at this point in the history
  15. makefs: remove unused cd9660 options

    Makefs defined "follow-symlinks" and "help" options, but they did
    nothing.  Remove them.
    
    Obtained from:	OpenBSD a8f1645688c2
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e4039fd View commit details
    Browse the repository at this point in the history
  16. Add new privilege PRIV_KDB_SET_BACKEND

    Summary:
    Check for PRIV_KDB_SET_BACKEND before allowing a thread to change
    the KDB backend.
    
    Obtained from:	Juniper Networks, Inc.
    Reviewers: sjg, emaste
    Subscribers: imp
    
    Differential Revision: https://reviews.freebsd.org/D39538
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    45de116 View commit details
    Browse the repository at this point in the history
  17. RELNOTES: Add entries for two new NFS features

    Rick Macklem authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d4f0d00 View commit details
    Browse the repository at this point in the history
  18. makefs: call brelse from bread

    This matches NetBSD and rationalizes makefs with the kernel API.
    
    This reverts commit 370e009.
    
    Reviewed by:	mckusick
    Sponsored by:	The FreeBSD Foundation
    Obtained from:	NetBSD 0a62dad69f62, 0c4125e1a19f, cb6a5a3575fd
    Differential Revision:	https://reviews.freebsd.org/D39070
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    fd26e2f View commit details
    Browse the repository at this point in the history
  19. mac_veriexec: add mac_priv_grant check for NODEV

    Allow other MAC modules to override some veriexec checks.
    
    We need two new privileges:
    PRIV_VERIEXEC_DIRECT	process wants to override 'indirect' flag
    			on interpreter
    PRIV_VERIEXEC_NOVERIFY	typically associated with PRIV_VERIEXEC_DIRECT
    			allow override of O_VERIFY
    
    We also need to check for PRIV_VERIEXEC_NOVERIFY override
    for FINGERPRINT_NODEV and FINGERPRINT_NOENTRY.
    This will only happen if parent had PRIV_VERIEXEC_DIRECT override.
    
    This allows for MAC modules to selectively allow some applications to
    run without verification.
    
    Needless to say, this is extremely dangerous and should only be used
    sparingly and carefully.
    
    Obtained from:	Juniper Networks, Inc.
    
    Reviewers: sjg
    Subscribers: imp, dab
    
    Differential Revision: https://reviews.freebsd.org/D39537
    Simon J. Gerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c776dd8 View commit details
    Browse the repository at this point in the history
  20. sys/modules/Makefile: add MAC/veriexec modules into the build

    Build the MAC/veriexec module and the SHA2, SHA256, SHA384, and
    SHA512 fingerprint modules.
    
    Obtained from:	Juniper Networks, Inc.
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c2ff89f View commit details
    Browse the repository at this point in the history
  21. veriexec: allow sha512 fingerprint in manifest parser

    MAC/veriexec already supports SHA512 fingerprints, therefore the
    veriexec program should also.
    
    Reviewed by:	sjg
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    14b8c7a View commit details
    Browse the repository at this point in the history
  22. sys/modules/Makefile: conditionally add MAC/veriexec modules

    Only build MAC/veriexec modules when MK_VERIEXEC is yes or we
    are building all modules.
    
    Add VERIEXEC knob to kernel __DEFAULT_NO_OPTIONS
    
    Reviewed by:	sjg
    Obtained from:	Juniper Networks, Inc.
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    90e043b View commit details
    Browse the repository at this point in the history
  23. veriexec: fix use of getopt

    getopt(3) returns int type not char. Using char triggers the
    -Wtautological-constant-out-of-range-compare warning with clang.
    Change the type of the variable used for holding the return value
    of getopt(3) to int to match the prototype and eliminate the warning.
    
    MFC after:	1 week
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    be40bec View commit details
    Browse the repository at this point in the history
  24. Update dirdeps.mk

    Fix handling of local.dirdeps-missing.mk
    we need to reset DEP_RELDIR and DIRDEPS just as if including
    a Makefile.depend*
    
    Also fix a typo in DIRDEP_LOADAVG_REPORT
    and improve debug output.
    
    Reviewed by: stevek
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    30b9782 View commit details
    Browse the repository at this point in the history
  25. veriexec: Add SPDX-License-Identifier

    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2177efb View commit details
    Browse the repository at this point in the history
  26. Update meta mode makefiles

    meta2deps - add checks to detect truncated/corrupted filemon data
    (only known to happen on Linux hosts), to ensure we do not auto
    update dependencies based on incomplete data.
    
    meta.stage.mk adds STAGE_SHLIB_LINKS_FILTER and STAGE_LINK_AS_*
    
    We also allow for hosts where egrep is deprecated for grep -E
    
    Reviewed by: stevek
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    648ff6f View commit details
    Browse the repository at this point in the history
  27. zfs: cherry-pick openzfs/zfs@c71fe7164

    Fix data corruption when cloning embedded blocks
    
    Don't overwrite blk_phys_birth, as for embedded blocks it is part of
    the payload.
    
    Reviewed-by: Richard Yao <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Pawel Jakub Dawidek <[email protected]>
    Issue #13392
    Closes #14739
    
    Approved by: oshogbo, mm
    Pawel Jakub Dawidek authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    02faf6a View commit details
    Browse the repository at this point in the history
  28. zfs: Merge openzfs/zfs#14739

    The zfs_log_clone_range() function is never called from the
    zfs_clone_range_replay() function, so I assumed it is safe to assert
    that zil_replaying() is never TRUE here. It turns out zil_replaying()
    also returns TRUE when the sync property is set to disabled.
    
    Fix the problem by just returning if zil_replaying() returns TRUE.
    
    Reported by: Florian Smeets
    Signed-off-by: Pawel Jakub Dawidek [email protected]
    
    Approved by: oshogbo, mm
    Pawel Jakub Dawidek authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    64c3a7c View commit details
    Browse the repository at this point in the history
  29. vnet: Fix a typo in a source code comment

    - s/form/from/
    
    MFC after:	3 days
    gmshake authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    43dff7c View commit details
    Browse the repository at this point in the history
  30. lagg(4): Correctly define some sysctl variables

    939a050 virtualized lagg(4), but the corresponding sysctl of some
    virtualized global variables are not marked with CTLFLAG_VNET. A try to
    operate on those variables via sysctl will effectively go to the 'master'
    copies and the virtualized ones are not read or set accordingly. As a
    side effect, on updating the 'master' copy, the virtualized global
    variables of newly created vnets will have correct values.
    
    PR:		270705
    Reviewed by:	kp
    Fixes:		939a050 Virtualize lagg(4) cloner
    MFC after:	3 days
    Differential Revision:	https://reviews.freebsd.org/D39467
    gmshake authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d519e7f View commit details
    Browse the repository at this point in the history
  31. zfs: Add vfs.zfs.bclone_enabled sysctl.

    Keep block cloning disabled by default for now, but allow to enable and
    use it after setting vfs.zfs.bclone_enabled to 1, so people can easily
    try it.
    
    Approved by:	oshogbo
    Reviewed by:	mm, oshogbo
    Differential Revision:	https://reviews.freebsd.org/D39613
    Pawel Jakub Dawidek authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    bf13ed1 View commit details
    Browse the repository at this point in the history
  32. tests: add ktest modules to build

    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    66cd93d View commit details
    Browse the repository at this point in the history
  33. netlink: fix operations with link-local routes/gateways.

    MFC after:	3 days
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    02966ce View commit details
    Browse the repository at this point in the history
  34. makefs: use unsigned and %u for rock_ridge_move_count

    For diff reduction against NetBSD's makefs.  Based on NetBSD git mirror
    commit 00991aee8248.
    
    With this change our makefs cd9660 support should be in sync up to
    NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace.").
    
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f6ea4b0 View commit details
    Browse the repository at this point in the history
  35. makefs: remove unused variable

    Reported by:	Clang
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2ee71b7 View commit details
    Browse the repository at this point in the history
  36. tests: make ktest build on ppc.

    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c5e81da View commit details
    Browse the repository at this point in the history
  37. riscv: save the thread pointer in both modes

    The contents of frame->tf_tp are uninitialized if accessed by DTrace (in
    probe context), resulting in a panic when trying to access the memory
    pointed to by tp. This saves the thread pointer to the trap frame when
    handling both userland and kernel exceptions.
    
    Reviewed by:	markj, mhorne
    MFC after:	2 weeks
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39582
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3ee393a View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    702c339 View commit details
    Browse the repository at this point in the history
  39. veriexec: Additional functionality for MAC/veriexec

    Ensure veriexec opens the file before doing any read operations.
    
    When the MAC_VERIEXEC_CHECK_PATH_SYSCALL syscall is requested, veriexec
    needs to open the file before calling mac_veriexec_check_vp. This is to
    ensure any set up is done by the file system. Most file systems do not
    explicitly need an open, but some (e.g. virtfs) require initialization
    of access tokens (file identifiers, etc.) before doing any read or write
    operations.
    
    The evaluate_fingerprint() function needs to ensure it has an open file
    for reading in order to evaluate the fingerprint. The ideal solution is
    to have a hook after the VOP_OPEN call in vn_open. For now, we open the
    file for reading, envaluate the fingerprint, and close the file. While
    this leaves a potential hole that could possibly be taken advantage of
    by a dedicated aversary, this code path is not typically visited often
    in our use cases, as we primarily encounter verified mounts and not
    individual files. This should be considered a temporary workaround until
    discussions about the post-open hook have concluded and the hook becomes
    available.
    
    Add MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL and
    MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL to mac_veriexec_syscall so we can
    fetch and check label contents in an unconstrained manner.
    
    Add a check for PRIV_VERIEXEC_CONTROL to do ioctl on /dev/veriexec
    
    Make it clear that trusted process cannot be debugged. Attempts to debug
    a trusted process already fail, but the failure path is very obscure.
    Add an explicit check for VERIEXEC_TRUSTED in
    mac_veriexec_proc_check_debug.
    
    We need mac_veriexec_priv_check to not block PRIV_KMEM_WRITE if
    mac_priv_gant() says it is ok.
    
    Reviewed by:	sjg
    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ecc3717 View commit details
    Browse the repository at this point in the history
  40. veriexec: mac_veriexec_syscall compat32 support

    Some 32bit apps may need to be able to use
    MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL
    MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL
    
    Therefore compat32 support is required.
    
    Obtained from:	Juniper Networks, Inc.
    Simon J. Gerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d7296dc View commit details
    Browse the repository at this point in the history
  41. veriexec: Add option MAC_VERIEXEC_DEBUG

    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f84f0ef View commit details
    Browse the repository at this point in the history
  42. veriexec: Rename old VERIEXEC_SIGNED_LOAD as VERIEXEC_SIGNED_LOAD32

    We need to handle old ioctl from old binary.
    
    Add some missing ioctls.
    
    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f195d44 View commit details
    Browse the repository at this point in the history
  43. libveriexec: add function to check a label based on a path

    veriexec_check_path_label() can be used to check if a specified
    path has a label associated with it that contains the what we
    want.
    
    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    eabd498 View commit details
    Browse the repository at this point in the history
  44. veriexec: Add function to get label associated with a file

    Add mac_veriexec_metadata_get_file_label to avoid the need to
    expose internals to other MAC modules.
    
    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    143c032 View commit details
    Browse the repository at this point in the history
  45. sqlite3: Vendor import of sqlite3 3.41.2

    Release notes at https://www.sqlite.org/releaselog/3_41_2.html.
    
    Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz
    MFC after:      2 weeks
    
    Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1'
    cschuber authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ceab57f View commit details
    Browse the repository at this point in the history
  46. tcp_hpts: use queue(9) STAILQ for the input queue

    Reviewed by:		rrs
    Differential Revision:	https://reviews.freebsd.org/D39574
    glebius authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    599d156 View commit details
    Browse the repository at this point in the history
  47. net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH

    Expect that drivers call into the network stack with the net epoch
    entered. This has already been the fact since early 2020. The net
    interrupts, that are marked with INTR_TYPE_NET, were entering epoch
    since 511d1af. For the taskqueues there is NET_TASK_INIT() and
    all drivers that were known back in 2020 we marked with it in
    6c3e93c. However in e87c494 we took conservative approach
    and preferred to opt-in rather than opt-out for the epoch.
    
    This change not only reverts e87c494 but adds a safety belt to
    avoid panicing with INVARIANTS if there is a missed driver. With
    INVARIANTS we will run in_epoch() check, print a warning and enter
    the net epoch.  A driver that prints can be quickly fixed with the
    IFF_NEEDSEPOCH flag, but better be augmented to properly enter the
    epoch itself.
    
    Note on TCP LRO: it is a backdoor to enter the TCP stack bypassing
    some layers of net stack, ignoring either old IFF_KNOWSEPOCH or the
    new IFF_NEEDSEPOCH.  But the tcp_lro_flush_all() asserts the presence
    of network epoch.  Indeed, all NIC drivers that support LRO already
    provide the epoch, either with help of INTR_TYPE_NET or just running
    NET_EPOCH_ENTER() in their code.
    
    Reviewed by:		zlei, gallatin, erj
    Differential Revision:	https://reviews.freebsd.org/D39510
    glebius authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    af4cb17 View commit details
    Browse the repository at this point in the history
  48. Suppress lld 16 errors about undefined symbols in version maps

    lld >= 16 turned on --no-undefined-version by default, which results in
    errors whenever symbols are mentioned in version maps, but are not
    actually defined in the binary.
    
    Since we have quite a few instances of symbols that are defined or not,
    depending on various compile-time settings, suppress this lld check for
    the time being.
    
    MFC after:	1 week
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b7558b0 View commit details
    Browse the repository at this point in the history
  49. bsnmp: make single bit bitfields unsigned to avoid clang 16 warning

    Clang 16 introduced a warning about single bit bitfields in structs,
    which is triggered by a declaration in bsnmp's snmpd.h:
    
        contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                peer->input.stream = 1;
                                   ^ ~
    
    Signed one-bit bitfields can only have values -1 and 0, but the intent
    here is to use the field as a boolean, so make it unsigned.
    
    MFC after:	3 days
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    022f020 View commit details
    Browse the repository at this point in the history
  50. libsa: make single bit bitfields unsigned to avoid clang 16 warning

    Clang 16 introduced a warning about single bit bitfields in structs,
    which is triggered by a declaration in libsa's tftp.c:
    
        stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                                        h->islastblock = 1;     /* very short file */
                                                       ^ ~
        stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                        h->islastblock = 1;     /* EOF */
                                       ^ ~
    
    Signed one-bit bitfields can only have values -1 and 0, but the intent
    here is to use the field as a boolean, so make it unsigned.
    
    MFC after:	3 days
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    781e696 View commit details
    Browse the repository at this point in the history
  51. libarchive: make single bit bitfields unsigned to avoid clang 16 warning

    Clang 16 introduced a warning about single bit bitfields in structs,
    which is triggered by various declarations in libarchive:
    
        contrib/libarchive/libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                        file->dir = 1;
                                  ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5127:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                        isoent->dir = 1;
                                    ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5213:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                isoent->dir = 1;
                            ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5214:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                isoent->virtual = 1;
                                ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7149:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                isoent->virtual = 1;
                                ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7435:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                        iso9660->zisofs.detect_magic = 1;
                                                     ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7495:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                iso9660->zisofs.making = 1;
                                       ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7496:26: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                iso9660->zisofs.allzero = 1;
                                        ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7702:28: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                                iso9660->zisofs.allzero = 1;
                                                        ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7871:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                        zisofs->header_passed = 1;
                                              ^ ~
        contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7894:24: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                                zisofs->initialized = 1;
                                                    ^ ~
    
    Signed one-bit bitfields can only have values -1 and 0, but the intent
    here is to use the fields as booleans, so make them unsigned.
    
    This has also been sent upstream.
    
    MFC after:	3 days
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e3f2068 View commit details
    Browse the repository at this point in the history
  52. Suppress lld 16 errors about multiply defined symbols in rescue

    lld >= 16 became more strict about multiply defined symbols. Since there
    are many of those in crunchgen'd programs, turn off the check when
    linking the rescue binary.
    
    MFC after:	1 week
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7a6df3b View commit details
    Browse the repository at this point in the history
  53. tcp: fix build

    The recent 25685b7 came in conflict with a540cdc.  Remove the
    code that cleans up the old style input queue.  Note that two lines
    below we assert that the new style input queue is empty.  The TCP
    stacks that use the queue are supposed to flush it in their
    tfb_tcp_fb_fini method.
    glebius authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a8dd54e View commit details
    Browse the repository at this point in the history
  54. Move include of site.src.opts.mk to allow more control

    Sometimes a site may have different policy needs,
    include site.src.opts.mk just before bsd.mkopt.mk to allow
    more control.
    
    Reviewed by: imp
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d99dc48 View commit details
    Browse the repository at this point in the history
  55. Include bsd.linker.mk to get LINKER_TYPE and VERSION in rescue

    To be able to use these make variables, you also have to include
    bsd.linker.mk, apparently.
    
    Fixes:		458f472
    MFC after:	1 week
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    393f2c3 View commit details
    Browse the repository at this point in the history
  56. geom: use bool for one-bit wide bit-field

    A one-bit wide bit-field can take only the values 0 and -1.  Clang 16
    introduced a warning that "implicit truncation from 'int' to a one-bit
    wide bit-field changes value from 1 to -1".  Fix by using c99 bool.
    
    Reported by:	Clang, via dim
    Reviewed by:	dim
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    314fc11 View commit details
    Browse the repository at this point in the history
  57. renice: Avoid segfault if -n flag is given without argument.

    Fixes:		65ee0a8
    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	kevans
    Differential Revision:	https://reviews.freebsd.org/D39623
    dag-erling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    bf5375e View commit details
    Browse the repository at this point in the history
  58. xargs: improve foundeof check for -E

    4aeb638 got it almost correct (we can't use strcmp() here as
    current argument isn't guaranteed to be NUL-terminated), but we also
    need to check that current argument length is equal to that of eofstr.
    
    PR:		270867
    Reviewed by:	bapt
    Differential Revision:	https://reviews.freebsd.org/D39583
    Yuri Pankov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    8a317ff View commit details
    Browse the repository at this point in the history
  59. unionfs: remove LK_UPGRADE if falling back to the standard lock

    The LK_UPGRADE operation may have temporarily dropped the upper or
    lower vnode's lock.  If the unionfs vnode was reclaimed during that
    window, its lock field will be reset to no longer point at the
    upper/lower vnode lock, so the lock operation will use the standard
    lock stored in v_lock.  Remove LK_UPGRADE from the flags in this case
    to avoid a lockmgr assertion, as this lock has not been previously
    owned by the calling thread.
    
    Reported by:	pho
    Tested by:	pho
    Reviewed by:	kib, markj
    Differential Revision:	https://reviews.freebsd.org/D39272
    Jason A. Harmening authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4d11bee View commit details
    Browse the repository at this point in the history
  60. Remove an impossible condition from unionfs_lock()

    We hold the vnode interlock, so vnode private data cannot suddenly
    become NULL.
    
    Tested by:	pho
    Reviewed by:	kib, markj
    Differential Revision:	https://reviews.freebsd.org/D39272
    Jason A. Harmening authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    dc6700f View commit details
    Browse the repository at this point in the history
  61. Remove unionfs_islocked()

    The implementation is racy; if the unionfs vnode is not in fact
    locked, vnode private data may be concurrently altered or freed.
    Instead, simply rely upon the standard implementation to query the
    v_vnlock field, which is type-stable and will reflect the correct
    lower/upper vnode configuration for the unionfs node.
    
    Tested by:	pho
    Reviewed by:	kib, markj
    Differential Revision:	https://reviews.freebsd.org/D39272
    Jason A. Harmening authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6a02dc7 View commit details
    Browse the repository at this point in the history
  62. unionfs_mkdir(): handle dvp reclamation

    The underlying VOP_MKDIR() implementation may temporarily drop the
    parent directory vnode's lock.  If the vnode is reclaimed during that
    window, the unionfs vnode will effectively become unlocked because
    the its v_vnlock field will be reset.  To uphold the locking
    requirements of VOP_MKDIR() and to avoid triggering various VFS
    assertions, explicitly re-lock the unionfs vnode before returning
    in this case.
    
    Note that there are almost certainly other cases in which we'll
    similarly need to handle vnode relocking by the underlying FS; this
    is the only one that's caused problems in stress testing so far.
    A more general solution, such as that employed for nullfs in
    null_bypass(), will likely need to be implemented.
    
    Tested by:	pho
    Reviewed by:	kib, markj
    Differential Revision: https://reviews.freebsd.org/D39272
    Jason A. Harmening authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6b1f537 View commit details
    Browse the repository at this point in the history
  63. vfs_lookup(): re-check v_mountedhere on lock upgrade

    The VV_CROSSLOCK handling logic may need to upgrade the covered
    vnode lock depending upon the requirements of the filesystem into
    which vfs_lookup() is walking.  This may involve transiently
    dropping the lock, which can allow the target mount to be unmounted.
    
    Tested by:	pho
    Reviewed by:	markj
    Differential Revision:	https://reviews.freebsd.org/D39272
    Jason A. Harmening authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    65a8727 View commit details
    Browse the repository at this point in the history
  64. libsa: Update comments about SMBIOS specification

    Summary:
    Include details from the SMBIOS 3 specification and some additional
    details for SMBIOS 2.1.
    
    Obtained from:	Juniper Networks, Inc.
    
    Reviewers: jmg, manu
    
    Subscribers: imp, dab
    
    Differential Revision: https://reviews.freebsd.org/D39635
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4f622ba View commit details
    Browse the repository at this point in the history
  65. flash: Add "n25q64" to mx25l driver

    This is for 64Mb Micron N25Q serial NOR flash memory
    
    Obtained from:	Juniper Networks, Inc.
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    67341b2 View commit details
    Browse the repository at this point in the history
  66. meta: Allow TARGET_SPEC_VARS to be overridden

    Reviewed by:	sjg
    Obtained from:	Juniper Networks, Inc.
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    770ad1b View commit details
    Browse the repository at this point in the history
  67. stand: Remove double words in source code comments

    - s/to to/to/
    - s/value value/value/
    
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    871856c View commit details
    Browse the repository at this point in the history
  68. net80211: Remove double words in source code comments

    - s/we we/we/
    
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    afecd25 View commit details
    Browse the repository at this point in the history
  69. last(1): Remove double words in source code comments

    - s/on on/on/
    - s/we we/we/
    
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ffcf113 View commit details
    Browse the repository at this point in the history
  70. kern_sysctl: Remove double words in source code comments

    - s/on on/on/
    
    MFC after:	5 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    be87f12 View commit details
    Browse the repository at this point in the history
  71. meta: print some additional variables on build errors.

    Add CPUTYPE and MACHINE_CPUARCH to the list of variables printed
    when there are build errors.
    
    Protect local.sys.mk from multiple inclusion.
    
    Reviewed by:	sjg
    Obtained from:	Juniper Networks, Inc.
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1aef8a0 View commit details
    Browse the repository at this point in the history
  72. renice: Clean up the tests.

    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	kevans
    Differential Revision:	https://reviews.freebsd.org/D39629
    dag-erling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    fbcae3e View commit details
    Browse the repository at this point in the history
  73. Revert "stand: Remove double words in source code comments"

    The sentence, "The base address that we the boot0 code to to run it."
    is correct.
    
    Reported by:	jrtc27
    
    This reverts commit b12ccd0.
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    36c5fda View commit details
    Browse the repository at this point in the history
  74. mount_nfs.8: Fix a mandoc warning

    - sections out of conventional order: Sh IMPLEMENTATION NOTES
    
    MFC after:	3 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    817a763 View commit details
    Browse the repository at this point in the history
  75. tcpdump: add missing pf reasons and actions

    Reviewed by:	kp
    Sponsored by:	InnoGames GmbH
    Differential Revision:	https://reviews.freebsd.org/D39586
    TuxPowered42 authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    52224bd View commit details
    Browse the repository at this point in the history
  76. netlink: sync interface IFLA attributes

    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    940ed9b View commit details
    Browse the repository at this point in the history
  77. tcp: Blackbox logging and tcp accounting together can cause a crash.

    If you currently turn BB logging on and in combination have TCP Accounting on we can get a
    crash where we have no NULL check and we run out of memory. Also lets make sure we
    don't do a divide by 0 in calculating any BB ratios.
    
    Reviewed by: tuexen
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39622
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2ecf6d4 View commit details
    Browse the repository at this point in the history
  78. mlx5: Make MLX5_COMP_EQ_SIZE tunable.

    When using hardware pacing, this value can be increased, because more SQ's
    means more EQ events aswell. Make it tunable, hw.mlx5.comp_eq_size .
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1d67477 View commit details
    Browse the repository at this point in the history
  79. mlx5: Make mlx5_del_flow_rule() NULL safe.

    This change factors out repeated NULL checks.
    
    No functional change intended.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4a82e6f View commit details
    Browse the repository at this point in the history
  80. mlx5: Fix duplicate free of default flow rule in error case.

    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e3cf186 View commit details
    Browse the repository at this point in the history
  81. mlx5: Implement mlx5_core_modify_cq_by_mask().

    Implement one CQ modify function supporting all firmware versions,
    instead of having more variants of CQ modify.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    83f768e View commit details
    Browse the repository at this point in the history
  82. mlx5: Don't give zero number of pages to the firmware.

    Can happen when using virtual mlx5_core<N> functions, VFs.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    8c4fa1f View commit details
    Browse the repository at this point in the history
  83. mlx5: Implement diagostic counters as sysctl(8) nodes.

    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    07dc4ef View commit details
    Browse the repository at this point in the history
  84. mlx5: Remove unused debugfs node pointers.

    No functional change intended.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d8f4c36 View commit details
    Browse the repository at this point in the history
  85. mlx5en(4): Explain why CQE zipping is off.

    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c90600d View commit details
    Browse the repository at this point in the history
  86. mlx5en(4): Don't wait for receive queue to fill up with mbufs during …

    …open channels.
    
    Failure to get mbufs may be transient.
    Don't permanently fail to open the channels due to lack of mbufs.
    This also makes modifying channel parameters faster.
    
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1c7fd55 View commit details
    Browse the repository at this point in the history
  87. split: Update synopsis and usage; fix examples

    - Mark -d as an optional flag
    - Add a prompt to one of the examples for consistency
    - Add -d to the usage message
    
    Sponsored by:	Klara Inc.
    0mp authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b18f762 View commit details
    Browse the repository at this point in the history
  88. pf: fix incorrect lock define

    PF_TABLE_STATS_ASSERT() should be checking pf_table_stats_lock not
    pf_rules_lock.
    
    Fortunately the define is not yet used anywhere so this was harmless.
    Fix it anyway, in case it does get used.
    
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d7295c5 View commit details
    Browse the repository at this point in the history
  89. tests: fix netlink type parsing.

    Netlink attribute type field is 2 bytes, not one.
    
    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3d53d7d View commit details
    Browse the repository at this point in the history
  90. arm64: Use FULLKERNEL instead of .ALLSRC in .bin target

    Using .ALLSRC may get additional arguments that we may not want
    and could cause the objcopy to fail.
    
    Reviewed by:	emaste
    Obtained from:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D39639
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a521def View commit details
    Browse the repository at this point in the history
  91. tcp: Inconsistent use of hpts_calling flag

    Gleb has noticed there were some inconsistency's in the way the inp_hpts_calls flag was being used. One
    such inconsistency results in a bug when we can't allocate enough sendmap entries to entertain a call to
    rack_output().. basically a timer won't get started like it should. Also in cleaning this up I find that the
    "no_output" side of input needs to be adjusted to make sure we don't try to re-pace too quickly outside
    the hpts assurance of 250useconds.
    
    Another thing here is we end up with duplicate calls to tcp_output() which we should not. If packets go
    from hpts for processing the input side of tcp will call the output side of tcp on the last packet if it is needed.
    This means that when that occurs a second call to tcp_output would be made that is not needed and if pacing
    is going on may be harmful.
    
    Lets fix all this and explicitly state the contract that hpts is making with transports that care about the
    flag.
    
    Reviewed by: tuexen, glebius
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39653
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2dd0793 View commit details
    Browse the repository at this point in the history
  92. renice: Factor out common code in tests.

    Furthermore, prefer test -eq (which ignores whitespace) over a strict string equality test when comparing numerical values.
    
    MFC after:	1 week
    Sponsored by:	Klara, Inc.
    Reviewed by:	thj
    Differential Revision:	https://reviews.freebsd.org/D39650
    dag-erling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7cd5421 View commit details
    Browse the repository at this point in the history
  93. mmc(4): Don't call bridge driver for timings not requiring tuning

    The original idea behind calling into the bridge driver was to have the
    logic deciding whether tuning is actually required for a particular bus
    timing in a given slot as well as doing the sanity checking only on the
    controller layer which also generally is better suited for these due to
    say SDHCI_SDR50_NEEDS_TUNING. On another thought, not every such driver
    should need to check whether tuning is required at all, though, and not
    everything is SDHCI in the first place.
    Adjust sdhci{,_fsl_fdt}(4) accordingly, but keep sdhci_generic_tune() a
    bit cautious still.
    sparcplug authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d1e10fb View commit details
    Browse the repository at this point in the history
  94. gem(4): Remove onboard-only Sun ERI and remnants of SBus support

    These bits are obsolete since 58aa35d.
    This change reverts part of 9ba2b29 as
    well as effectively bd3d982, i. e. the
    SBus-related modifications. This also gets rid of a nasty hack required
    as bus_{read,write}_N(9) doesn't really fit bus_space_subregion(9).
    sparcplug authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    acf9268 View commit details
    Browse the repository at this point in the history
  95. cas.4: Remove remaining sparc64-specific bit

    This was missed in 7025477.
    sparcplug authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3dc3cc8 View commit details
    Browse the repository at this point in the history
  96. Handle errors if WARNS is not defined.

    One conditional outside of ifdef WARNS did not protect against an
    unset WARNS. Default WARNS to 0 in conditional if not defined.
    
    Obtained from:	Juniper Networks, Inc.
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6364b9e View commit details
    Browse the repository at this point in the history
  97. boot0: Expand the description of BOOT_BOOT0_ORG.

    This really shouldn't even be an option given it is hardcoded as a
    constant named ORIGIN in the assembly.  mbr.S also uses 0x600 and
    hardcodes it in both the assembly and the Makefile.
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2995005 View commit details
    Browse the repository at this point in the history
  98. tmpfs: add missing vop_fplookup ops to tmpfs_fifoop_entries

    Reported by:	gbe
    PR:	270917
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    bf62f11 View commit details
    Browse the repository at this point in the history
  99. boot0: Drop the BOOT_BOOT0_ORG option.

    This shouldn't be an option (and I added it in the first place back in
    4ae4202 and
    83f4b92).  However, unlike the other
    knobs I added back then, this really shouldn't be a knob since it is
    hardcoded in the source.
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    0fadf8f View commit details
    Browse the repository at this point in the history
  100. sendmail: Silence -Wdeprecated-non-prototype warnings.

    These will hopefully be fixed upstream eventually, but silence the
    warnings until then.
    
    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39518
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ff53575 View commit details
    Browse the repository at this point in the history
  101. smbfs: Use C89 function definition for cf_getopt.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39519
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5b09f79 View commit details
    Browse the repository at this point in the history
  102. bootpd: Use C89 function definitions.

    Trim a few duplicate (but incomplete) function prototypes as well.
    
    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39520
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e5b3af9 View commit details
    Browse the repository at this point in the history
  103. rpc.rstatd/rwalld: Use more accurate function pointer types.

    Reviewed by:	zlei, rmacklem
    Differential Revision:	https://reviews.freebsd.org/D39521
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a0cf34f View commit details
    Browse the repository at this point in the history
  104. rbootd: Remove an unnecessary (and incomplete) function prototype.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39522
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ffb1c47 View commit details
    Browse the repository at this point in the history
  105. ipf: Use C89 function definitions.

    Reviewed by:	zlei
    Differential Revision:	https://reviews.freebsd.org/D39523
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    002d656 View commit details
    Browse the repository at this point in the history
  106. less: Silence -Wdeprecated-non-prototype warnings.

    This has an active upstream so will presumably be fixed upstream at
    some point.
    
    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39525
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5a7ee10 View commit details
    Browse the repository at this point in the history
  107. locate: Use C89 function definitions.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39526
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2a4d151 View commit details
    Browse the repository at this point in the history
  108. mail: Use a C89 function pointer type for command functions.

    The command function is defined to always take a void *.  Functions
    which accept a pointer to an array of pointers use a local temporary
    'argv' assigned from the void *arg.
    
    Reviewed by:	zlei
    Differential Revision:	https://reviews.freebsd.org/D39527
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    699ac93 View commit details
    Browse the repository at this point in the history
  109. telnet: Use C89 function definitions for two stragglers.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39528
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    04234e5 View commit details
    Browse the repository at this point in the history
  110. cron: Use C89 function definitions.

    Reviewed by:	zlei
    Differential Revision:	https://reviews.freebsd.org/D39529
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6fa0ab2 View commit details
    Browse the repository at this point in the history
  111. rpc.lockd: Use C89 function definitions.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39530
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f823f3e View commit details
    Browse the repository at this point in the history
  112. traceroute: Use C89 function definition for one straggler.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39531
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    23db007 View commit details
    Browse the repository at this point in the history
  113. yp: Use more accurate function pointer types.

    Trim a few duplicate (but incomplete) function prototypes as well.
    
    Reviewed by:	zlei, imp
    Differential Revision:	https://reviews.freebsd.org/D39532
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5a8bcf3 View commit details
    Browse the repository at this point in the history
  114. keyserv: Use C89 function definitions.

    Also use more accurate function pointer types, and trim some duplicate
    (but incomplete) function prototypes.
    
    Reviewed by:	zlei
    Differential Revision:	https://reviews.freebsd.org/D39533
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4c5af39 View commit details
    Browse the repository at this point in the history
  115. pnpinfo: Use C89 function definitions.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39534
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    86b6b87 View commit details
    Browse the repository at this point in the history
  116. loader.efi: Fix some arm64 PE metadata

    - Mark the file as an executable in the COFF header.
    - Provide separate .text and .data sections.
    - Provide sane file and section alignment values.  These values are the
      defaults defined in the PE specification.
    - Set appropriate characteristics for each of .text and .data.
    
    This is required for the MS devkit to load our UEFI image.
    
    Obtained from:	OpenBSD via allanjude
    MFC after:	1 month
    Differential Revision:	https://reviews.freebsd.org/D37765
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    9ea79f3 View commit details
    Browse the repository at this point in the history
  117. mac: Honor order when registering MAC modules.

    Ensure MAC modules are inserted in order that they are registered.
    
    Reviewed by:	markj
    Obtained from:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D39589
    Steve Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    eb02de8 View commit details
    Browse the repository at this point in the history
  118. ee: Drop P_() macro used for pre-C89 compatibility.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39669
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    11797b3 View commit details
    Browse the repository at this point in the history
  119. Configuration menu
    Copy the full SHA
    7f3e90e View commit details
    Browse the repository at this point in the history
  120. ee: Use C89 function definitions.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39670
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2f1e624 View commit details
    Browse the repository at this point in the history
  121. ee: Remove two set but unused variables.

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39671
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    94c4750 View commit details
    Browse the repository at this point in the history
  122. Skipping merge of 238271f

    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d9132e2 View commit details
    Browse the repository at this point in the history
  123. Add `chdb' command to fsdb(8) to set direct block numbers.

    Add the ability to set direct blocks numbers in inodes so that manual
    corrections can be made. No checking of the values is attempted so
    accidental or deliberate bad values can be set.
    
    Submitted by: Chuck Silvers
    MFC after:    1 week
    Kirk McKusick authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    316d3f9 View commit details
    Browse the repository at this point in the history
  124. Bug fixes for fsck_ffs(8).

    Increment a reference count when returning a zero'ed out buffer
    after a failed read.
    
    Zero out a structure before using it.
    
    Only dirty a buffer that has been modified.
    
    Submitted by: Chuck Silvers
    Sponsored by: Netflix
    MFC after:    1 week
    Kirk McKusick authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4f3969e View commit details
    Browse the repository at this point in the history
  125. Skip Pass 5 in fsck_ffs(8) when corrupt cylinder groups remain unfixed.

    Pass 1 of fsck_ffs checks the integrity of all the cylinder groups.
    If any are found to have been corrupted it offers to rebuild them.
    Pass 5 then makes a second pass over the cylinder groups to validate
    their block and inode maps. Pass 5 assumes that the cylinder groups
    are not corrupted and can segment fault if they are corrupted. Rather
    than rerunning the corruption checks a second time in pass 5, this
    fix keeps track whether any corrupt cylinder groups were found but not
    fixed in pass 1 either due to running with the -n flag or by explicitly
    answering `no' when asked whether to fix a corrupted cylinder group.
    If any corrupted cylinder groups remain after pass 1, fsck_ffs will
    decline to run pass 5. Instead it marks the filesystem as unclean
    so that fsck_ffs will need to be run again before the filesystem can
    be mounted.
    
    This patch cleans up and documents the return value from check_cgmagic().
    It also renames the variable / parameter "rebuildcg" to "rebuiltcg".
    This parameter describes whether the cylinder group has been rebuilt
    rather than whether it should be rebuilt.
    
    Reported by: Chuck Silvers
    Reviewed by: Chuck Silvers
    MFC after:   1 week
    Kirk McKusick authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    8d65d24 View commit details
    Browse the repository at this point in the history
  126. sync_vnode(): add assert to check vn_start_write() correctness

    Tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    MFC after:	1 week
    kostikbel authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c15f739 View commit details
    Browse the repository at this point in the history
  127. syncer vnode: add VOP_GETWRITEMOUNT() definition explicitly

    Since syncer vnode vector does not provide a fallback to the default
    one, its VOP_GETWRITEMOUNT() implementation implicitly returned
    EOPNOTSUPP, which means that syncer ignored suspension.
    
    Reported and tested by:	pho
    Sponsored by:	The FreeBSD Foundation
    MFC after:	1 week
    kostikbel authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    72c568a View commit details
    Browse the repository at this point in the history
  128. umtx: allow to configure minimal timeout (in nanoseconds)

    PR:	270785
    Reviewed by:	markj, mav
    Sponsored by:	The FreeBSD Foundation
    MFC after:	1 week
    Differential revision:	https://reviews.freebsd.org/D39584
    kostikbel authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    af5db81 View commit details
    Browse the repository at this point in the history
  129. x86: initialize use_xsave once

    The explanation from https://reviews.freebsd.org/D39637 by stevek:
    The "use_xsave" variable is a global and that is only supposed to be
    initialized early before scheduling gets started. However, with the way
    the ifuncs for "fpusave" and "fpurestore" are implemented, the value
    could be changed at runtime when scheduling is active if "use_xsave"
    was set to 0 by the tunable. This leaves a window of opportunity where
    "use_xsave" gets re-initialized to 1 and a context switch could occur
    with a thread that was not set up to be able to use xsave functionality.
    This can lead to an "privileged instruction fault".
    
    The fix is to protect "use_xsave" from being initialized more than once.
    
    Reported and reviewed by:	stevek
    Sponsored by:	The FreeBSD Foundation
    MFC after:	1 week
    Differential revision:	https://reviews.freebsd.org/D39660
    kostikbel authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    98b68ac View commit details
    Browse the repository at this point in the history
  130. Update/fix Makefile.depend for userland

    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    03ccb08 View commit details
    Browse the repository at this point in the history
  131. dirdeps.mk guard against inclusion from Makefile.depend.options

    A typo in Makefile.depend.options including dirdeps.mk rather than
    dirdeps-options.mk can result in infinite recursion - don't let that happen.
    
    Reviewed by:	stevek
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    0a315eb View commit details
    Browse the repository at this point in the history
  132. Just ensure all target exists

    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d985a2e View commit details
    Browse the repository at this point in the history
  133. Ensure the stage_* targets we use exist

    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7966f1a View commit details
    Browse the repository at this point in the history
  134. Handle libs that create linker scripts as libs

    Eg ncurses creates libncursesw.ald
    This is the only example so far, but if we are staging
    handle it.
    
    Reviewed by:	stevek
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    57f9f1f View commit details
    Browse the repository at this point in the history
  135. Avoid staging conflict for examples/pf

    If we are staging, let examples/pf stage its bits.
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    17db971 View commit details
    Browse the repository at this point in the history
  136. Avoid breaking crunchgen with meta stats

    When using DIRDEPS_BUILD we normally get stats as each dir finishes.
    This upsets crunchen, so keep quiet when _RECURSING_CRUNCH is defined
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    287ab0c View commit details
    Browse the repository at this point in the history
  137. Configuration menu
    Copy the full SHA
    9eded1c View commit details
    Browse the repository at this point in the history
  138. pf: change pf_rules_lock and pf_ioctl_lock to per-vnet locks

    Both pf_rules_lock and pf_ioctl_lock only ever affect one vnet, so
    there's no point in having these locks affect other vnets.
    (In fact, the only lock in pf that can affect multiple vnets is
    pf_end_lock.)
    
    That's especially important for the rules lock, because taking the write
    lock suspends all network traffic until it's released. This will reduce
    the impact a vnet running pf can have on other vnets, and improve
    concurrency on machines running multiple pf-enabled vnets.
    
    Reviewed by:	zlei
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    Differential Revision:	https://reviews.freebsd.org/D39658
    kprovost authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b5ef7e7 View commit details
    Browse the repository at this point in the history
  139. netstat: document that PCB information can't be read from corefiles

    Reviewed by:		glebius, cc
    Sponsored by:		Netflix, Inc.
    Differential Revision:	https://reviews.freebsd.org/D39610
    tuexen authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b24ad80 View commit details
    Browse the repository at this point in the history
  140. tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend o…

    …ff ECN however our syncache is not aware of that flag.
    
    We need to make the syncache aware of the flag and not do ECN if its set. Note that this
    is not 100% full proof but the best we can do (i.e. its still possible that you can get in a
    situation where the peer try's to do ecn).
    
    Reviewed by: tuexen, glebius, rscheff
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39672
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5149eb0 View commit details
    Browse the repository at this point in the history
  141. tzsetup(8): update paths to zone tab and tzdata source

    tzsetup now uses zone1970.tab and zoneinfo source is located in
    contrib/tzdata, update the man page accordingly.
    
    While here, drop obsolete Tn macros and insert vertical breaks (mostly
    before Dl in examples) to improve readability.
    
    Reviewed by:	pauamma_gundo.com (manpages)
    Differential Revision:	https://reviews.freebsd.org/D39643
    Yuri Pankov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    84b26fd View commit details
    Browse the repository at this point in the history
  142. libc: Implement bsort(3) a bitonic type of sorting algorithm.

    The bsort(3) algorithm works by swapping objects, similarly to qsort(3),
    and does not require any significant amount of additional memory.
    
    The bsort(3) algorithm doesn't suffer from the processing time issues
    known the plague the qsort(3) family of algorithms, and is bounded by
    a complexity of O(log2(N) * log2(N) * N), where N is the number of
    elements in the sorting array. The additional complexity compared to
    mergesort(3) is a fair tradeoff in situations where no memory may
    be allocated.
    
    The bsort(3) APIs are identical to those of qsort(3), allowing for
    easy drop-in and testing.
    
    The design of the bsort(3) algorithm allows for future parallell CPU
    execution when sorting arrays. The current version of the bsort(3)
    algorithm is single threaded. This is possible because fixed areas
    of the sorting data is compared at a time, and can easily be divided
    among different CPU's to sort large arrays faster.
    
    Reviewed by:	gbe@, delphij@, pauamma_gundo.com (manpages)
    Sponsored by:	NVIDIA Networking
    Differential Revision:	https://reviews.freebsd.org/D36493
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    20fe8c9 View commit details
    Browse the repository at this point in the history
  143. iwlwifi: rtw88: rtw89: fix gcc warnings

    Fix -Wno-format and unused variables warnings with gcc by adopting
    (to|the) FreeBSD-specific code.
    
    Reported by:	jhb
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Reviewed by:	jhb
    Differential Revision: https://reviews.freebsd.org/D39673
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c2db667 View commit details
    Browse the repository at this point in the history
  144. bsort.3: Fix warnings as reported by mandoc -W warning

    Reported by:	Yuri <[email protected]>
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d494e66 View commit details
    Browse the repository at this point in the history
  145. libc: Add missing object size check to qsort_s(3)

    When sorting, both the C11 standard (ISO/IEC 9899:2011, K.3.6.3.2) and
    the ISO/IEC JTC1 SC22 WG14 N1172 standard, does not define objects of
    zero size as undefined behaviour. However Microsoft's cpp-docs does.
    
    Add proper checks for this. Found while working on bsort(3).
    
    Reviewed by:	kib@ and emaste@
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    Differential Revision:	https://reviews.freebsd.org/D39687
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    457e600 View commit details
    Browse the repository at this point in the history
  146. Cirrus update to new freebsd instance version

    MFC after:	2 weeks
    Pull Request:	freebsd/freebsd-src#718
    QWERTIOX authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    34a95e6 View commit details
    Browse the repository at this point in the history
  147. unionfs.5: Use '.An -nosplit' in the AUTHORS section

    Use '.An -nosplit' in the AUTHORS section to prevent line breaks.
    
    MFC after:	3 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    48e9158 View commit details
    Browse the repository at this point in the history
  148. libc: Sorting is not needed when there are less than two elements

    If there are less than two elements avoid executing the first
    sorting loop. No functional change intended.
    
    Reviewed by:	kib@
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    Differential Revision:	https://reviews.freebsd.org/D39691
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    47feb85 View commit details
    Browse the repository at this point in the history
  149. dpaa2: Avoid dpaa2_cmd race conditions

    struct dpaa2_cmd is no longer malloc'ed, but can be allocated on stack
    and initialized with DPAA2_CMD_INIT() on demand. Drivers stopped caching
    their DPAA2 command objects (and associated tokens) in the software
    contexts in order to avoid using them concurrently.
    
    Reviewed by:		bz
    Approved by:		bz (mentor)
    MFC after:		3 weeks
    Differential Revision:	https://reviews.freebsd.org/D39509
    Dmitry Salychev authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    93fa7be View commit details
    Browse the repository at this point in the history
  150. ObsoleteFiles.inc: add more obsolete files

    ant1 authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    bd39ffe View commit details
    Browse the repository at this point in the history
  151. ofed: Fix a logic inversion from IfAPI conversion

    Reported by:	bartosz.sobczak_intel.com
    Fixes:		3e142e0 ("ofed: Mechanically convert to IfAPI")
    Sponsored by:	Juniper Networks, Inc.
    chmeeedalf authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d20423b View commit details
    Browse the repository at this point in the history
  152. include: add a check-ldirs target

    This target ensures all LDIRS, LSUBDIRS, and LSUBSUBDIRS actually exist.
    
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D39006
    brooksdavis authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    68068a3 View commit details
    Browse the repository at this point in the history
  153. Cirrus-CI: Add blank lines between scripts

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D39679
    brooksdavis authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e7a0521 View commit details
    Browse the repository at this point in the history
  154. Cirrus-CI: Check that make sysent was run

    Run the `make sysent` target and verify that the repo isn't modified
    afterwards.  This ensures that a pushed branch contains all the
    required bits after a change to syscall.master.
    
    Reviewed by:	emaste
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D39680
    brooksdavis authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f1e48cc View commit details
    Browse the repository at this point in the history
  155. Cirrus-CI: Run check-ldirs in include/

    Check that LDIRS defined in include/Makefile actually exist.
    
    Reviewed by:	emaste
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D39681
    brooksdavis authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    2cbb707 View commit details
    Browse the repository at this point in the history
  156. cxgbe/iw_cxgbe: debug routines to dump STAG (steering tag) entries.

    t4_dump_stag to dump hw state for a known STAG.
    
    t4_dump_all_stag to dump hw state for all valid STAGs.  This routine
    walks the entire STAG region looking for valid entries and this can take
    a while for some configurations.
    
    MFC after:	1 week
    Sponsored by:	Chelsio Communications
    np-2020 authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    336374b View commit details
    Browse the repository at this point in the history
  157. We have a TCP_LOG_CONNEND log that should come out at the very last l…

    …og of every connection. This
    
    holds some nice stats about why/how the connection ended. Though with the current code it does not
    come out without accounting due to the placement of the ifdefs. Also we need to make sure the stacks
    fini has ran before calling in from tcp_subr so we get all logs the stack may make at its ending.
    
    Reviewed by: rscheff
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39693
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d1eb204 View commit details
    Browse the repository at this point in the history
  158. tcp: Rack can crash with the new non-TSO fix..

    Turns out the location of the check to see if we can do output is in the wrong place. We need
    to jump off to the compressed acks before handling that case since th is NULL in the
    compressed ack case which is handled differently anyway.
    
    Reviewed by: tuexen
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39690
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6d7eff7 View commit details
    Browse the repository at this point in the history
  159. libmilter: Silence -Wdeprecated-non-prototype warnings.

    Missed this one when tagging other sendmail libraries.
    
    Fixes:		525438e sendmail: Silence -Wdeprecated-non-prototype warnings.
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e4e72c5 View commit details
    Browse the repository at this point in the history
  160. libz: Move NO_WDEPRECATED_NON_PROTOTYPE below include of bsd.lib.mk.

    Also add it to CWARNFLAGS rather than CFLAGS.
    bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    6a7099f View commit details
    Browse the repository at this point in the history
  161. loader: Change version calculation to be more consistent.

    Use 1000 * major + minor when calculating the version number that
    gets set in the Ficl environment or lua loader property. This allows
    for more room if the minor number needs to go above 9.
    
    Add loader.version property to lua loader.
    
    Reviewed by:	imp
    Obtained from:	Juniper Networks, Inc.
    Differential Revision: https://reviews.freebsd.org/D39631
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7c82e59 View commit details
    Browse the repository at this point in the history
  162. tcp: rack the request level logging is a bit too noisy when doing poi…

    …nt logging.
    
    When doing request level BB logging the hybrid_bw_log() does not have proper screening to minimize logging
    when point level logging is in use. Lets fix it properly so you have to have the proper knobs set to get the
    more noisy logging.
    
    Reviewed by: tuexen
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39699
    Randall Stewart authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a18b5f7 View commit details
    Browse the repository at this point in the history
  163. vfs cache: fix vfs.cache.stats.* name typos

    Two vfs.cache.stats names are fixed:
    - s/.dotdothis/.dotdothits/
    - s/.posszaps/.poszaps/
    
    Signed-off-by: Igor Ostapenko <[email protected]>
    [mjg: massaged the header a little bit]
    ihoro authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ef0841b View commit details
    Browse the repository at this point in the history
  164. libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE

    Fixes build of Python:
    /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t'
    errno_t  bsort_s(void *, rsize_t, rsize_t,
    
    Reported by:	vishwin@
    MFC after:	1 week
    Sponsored by:	NVIDIA Networking
    Differential Revision:	https://reviews.freebsd.org/D36493
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1996ac2 View commit details
    Browse the repository at this point in the history
  165. ichiic: use bool for one-bit wide bit-fields

    A one-bit wide bit-field can take only the values 0 and -1. Clang 16
    introduced a warning that "implicit truncation from 'int' to a one-bit
    wide bit-field changes value from 1 to -1". Fix by using c99 bool.
    
    Reported by:	Clang
    Reviewed by:	emaste, wulf
    MFC after:	3 days
    Differential Revision: https://reviews.freebsd.org/D39665
    DimitryAndric authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    cf69eda View commit details
    Browse the repository at this point in the history
  166. LinuxKPI: skbuff.h: fix -Warray-bounds warnings

    Harmonize sk_buff_head and sk_buff further and fix -Warray-bounds
    warnings reports by gcc.  At the same time simplify some code by
    re-using other functions or factoring some code out.
    
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    03cd863 View commit details
    Browse the repository at this point in the history
  167. LinuxKPI: 802.11: fix a -Wenum-compare warning

    We are asserting that two values from different enums are the same.
    gcc warns about these.  Cast the values to (int) to avoid the warning.
    
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    7761f11 View commit details
    Browse the repository at this point in the history
  168. openssh: restore PrintLastLog option

    Upstream's autoconf sets DISABLE_LASTLOG if lastlog.ll_line does not
    exist, but PrintLastLog also works with utmpx and other mechanisms.
    
    Reported upstream at
    https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html
    
    PR:		209441
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    559eced View commit details
    Browse the repository at this point in the history
  169. meta: remove LDFLAGS setting when cross building

    The setting was left over from older clang version and is not
    necessary any more (and also causes link issues.)
    
    Reviewed by:	sjg
    Stephen J. Kiernan authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    fd054eb View commit details
    Browse the repository at this point in the history
  170. Makefile.xtras: fix show-valid-targets

    Use ALL_MACHINE_LIST and leverage .MAKE.DEPENDFILE_PREFERENCE
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    0c44a69 View commit details
    Browse the repository at this point in the history
  171. zfs: add missing vn state transition for .zfs

    Reported by:	des
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    9e6b4c0 View commit details
    Browse the repository at this point in the history
  172. zfs: fix up EINVAL from getdirentries on .zfs

    PR:	270909
    mjguzik authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b0e743e View commit details
    Browse the repository at this point in the history
  173. stand: Remove a double word in a source code comment

    - s/value value/value/
    
    MFC after:	3 days
    gbergling authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f61f0bb View commit details
    Browse the repository at this point in the history
  174. ifnet: factor out interface renaming into a separate function.

    This change is required to support interface renaming via Netlink.
    No functional changes intended.
    
    Reviewed by:	zlei
    Differential Revision: https://reviews.freebsd.org/D39692
    MFC after:	2 weeks
    AlexanderChernikov authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    348e88b View commit details
    Browse the repository at this point in the history
  175. LinuxKPI: fix READ_ONCE() -Wcast-equal warnings

    Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast
    to const in order to satisfy -Wcast-equal by gcc.
    Sadly we cannot do the same to WRITE_ONCE() which still is very
    noisy.
    
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Reviewed by:	hselasky
    Differential Revision: https://reviews.freebsd.org/D39706
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c8089ba View commit details
    Browse the repository at this point in the history
  176. vmrun.sh: Fix a typo in usage()

    MFC after:	3 days
    Sponsored by:	Klara Inc.
    0mp authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a100ec3 View commit details
    Browse the repository at this point in the history
  177. network.subr: adjust regex for wlans_xxxxx rc.conf entries

    Drivers like ath1[012]k will not match the current wlans_*-regex as
    they have digits followed by letters.  Adjust the regex to allow
    this combination in order to be able to configure interfaces with
    names like wlans_ath11k0="..."
    
    MFC after:	3 days
    Reviewed by:	emaste
    Differential Revision: https://reviews.freebsd.org/D39674
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    77a6e49 View commit details
    Browse the repository at this point in the history
  178. iwlwifi: quieten more compiler warnings

    Quieten some more (valid) gcc warnings and disable dead code.
    There are more warnings, some probably a compiler problem, the
    other related to firmware structs which I do not want to adjust
    just locally.  Leave a comment to revisit after a next driver
    update.
    
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d6ec824 View commit details
    Browse the repository at this point in the history
  179. LinuxKPI: 802.11: improve assertion and tkip code

    Move a KASSERT out of a function and make it a CTASSERT with
    appropriate comments.
    
    Skeleton implement two tkip functions, still left TODO, initializing
    variables with dummy values to quiten compiler warnings.  It is
    unclear to me if we should still ever properly implement TKIP
    compat code at this point.  If so the current code gives a good
    idea what needs to be done in addition to allocating references
    to real state along with keyconf.
    
    Sponsored by:	The FreeBSD Foundation
    MFC after:	3 days
    Bjoern A. Zeeb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    c1d0275 View commit details
    Browse the repository at this point in the history
  180. inpcb: Split PCB hash tables

    Currently we use a single hash table per PCB database for connected and
    bound PCBs.  Since we started using net_epoch to synchronize hash table
    lookups, there's been a bug, noted in a comment above in_pcbrehash():
    connecting a socket can cause an inpcb to move between hash chains, and
    this can cause a concurrent lookup to follow the wrong linkage pointers.
    I believe this could cause rare, spurious ECONNREFUSED errors in the
    worse case.
    
    Address the problem by introducing a second hash table and adding more
    linkage pointers to struct inpcb.  Now the database has one table each
    for connected and unconnected sockets.
    
    When inserting an inpcb into the hash table, in_pcbinhash() now looks at
    the foreign address of the inpcb to figure out which table to use.  This
    ensures that queue linkage pointers are stable until the socket is
    disconnected, so the problem described above goes away.  There is also a
    small benefit in that in_pcblookup_*() can now search just one of the
    two possible hash buckets.
    
    I also made the "rehash" parameter of in(6)_pcbconnect() unused.  This
    parameter seems confusing and it is simpler to let the inpcb code figure
    out what to do using the existing INP_INHASHLIST flag.
    
    UDP sockets pose a special problem since they can be connected and
    disconnected multiple times during their lifecycle.  To handle this, the
    patch plugs a hole in the inpcb structure and uses it to store an SMR
    sequence number.  When an inpcb is disconnected - an operation which
    requires the global PCB database hash lock - the write sequence number
    is advanced, and in order to reconnect, the connecting thread must wait
    for readers to drain before reusing the inpcb's hash chain linkage
    pointers.
    
    raw_ip (ab)uses the hash table without using the corresponding
    accessors.  Since there are now two hash tables, it arbitrarily uses the
    "connected" table for all of its PCBs.  This will be addressed in some
    way in the future.
    
    inp interators which specify a hash bucket will only visit connected
    PCBs.  This is not really correct, but nothing in the tree uses that
    functionality except raw_ip, which as mentioned above places all of its
    PCBs in the "connected" table and so is unaffected.
    
    Discussed with:	glebius
    Tested by:	glebius
    Sponsored by:	Klara, Inc.
    Sponsored by:	Modirum MDPay
    Differential Revision:	https://reviews.freebsd.org/D38569
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1692f1c View commit details
    Browse the repository at this point in the history
  181. inpcb: Move inpcb matching logic into separate functions

    These functions will get some additional callers in future revisions.
    
    No functional change intended.
    
    Discussed with:	glebius
    Tested by:	glebius
    Sponsored by:	Modirum MDPay
    Sponsored by:	Klara, Inc.
    Differential Revision:	https://reviews.freebsd.org/D38571
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f0fad88 View commit details
    Browse the repository at this point in the history
  182. inpcb: Avoid inp_cred dereferences in SMR-protected lookup

    The SMR-protected inpcb lookup algorithm currently has to check whether
    a matching inpcb belongs to a jail, in order to prioritize jailed
    bound sockets.  To do this it has to maintain a ucred reference, and for
    this to be safe, the reference can't be released until the UMA
    destructor is called, and this will not happen within any bounded time
    period.
    
    Changing SMR to periodically recycle garbage is not trivial.  Instead,
    let's implement SMR-synchronized lookup without needing to dereference
    inp_cred.  This will allow the inpcb code to free the inp_cred reference
    immediately when a PCB is freed, ensuring that ucred (and thus jail)
    references are released promptly.
    
    Commit 220d892 ("inpcb: immediately return matching pcb on lookup")
    gets us part of the way there.  This patch goes further to handle
    lookups of unconnected sockets.  Here, the strategy is to maintain a
    well-defined order of items within a hash chain so that a wild lookup
    can simply return the first match and preserve existing semantics.  This
    makes insertion of listening sockets more complicated in order to make
    lookup simpler, which seems like the right tradeoff anyway given that
    bind() is already a fairly expensive operation and lookups are more
    common.
    
    In particular, when inserting an unconnected socket, in_pcbinhash() now
    keeps the following ordering:
    - jailed sockets before non-jailed sockets,
    - specified local addresses before unspecified local addresses.
    
    Most of the change adds a separate SMR-based lookup path for inpcb hash
    lookups.  When a match is found, we try to lock the inpcb and
    re-validate its connection info.  In the common case, this works well
    and we can simply return the inpcb.  If this fails, typically because
    something is concurrently modifying the inpcb, we go to the slow path,
    which performs a serialized lookup.
    
    Note, I did not touch lbgroup lookup, since there the credential
    reference is formally synchronized by net_epoch, not SMR.  In
    particular, lbgroups are rarely allocated or freed.
    
    I think it is possible to simplify in_pcblookup_hash_wild_locked() now,
    but I didn't do it in this patch.
    
    Discussed with:	glebius
    Tested by:	glebius
    Sponsored by:	Klara, Inc.
    Sponsored by:	Modirum MDPay
    Differential Revision:	https://reviews.freebsd.org/D38572
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    20946d0 View commit details
    Browse the repository at this point in the history
  183. inpcb: Release the inpcb cred reference before freeing the structure

    Now that the inp_cred pointer is accessed only while the inpcb lock is
    held, we can avoid deferring a crfree() call when freeing an inpcb.
    
    This fixes a problem introduced when inpcb hash tables started being
    synchronized with SMR: the credential reference previously could not be
    released until all lockless readers have drained, and there is no
    mechanism to explicitly purge cached, freed UMA items.  Thus, ucred
    references could linger indefinitely, and since ucreds hold a jail
    reference, the jail would linger indefinitely as well.  This manifests
    as jails getting stuck in the DYING state.
    
    Discussed with:	glebius
    Tested by:	glebius
    Sponsored by:	Klara, Inc.
    Sponsored by:	Modirum MDPay
    Differential Revision:	https://reviews.freebsd.org/D38573
    markjdb authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    df4838d View commit details
    Browse the repository at this point in the history
  184. makefs: set cd9660 Rock Ridge timestamps for . and ..

    DOT and DOTDOT entries have special handling, and previously only Rock
    Ridge PX (POSIX attributes) entries were attached.  Add TF (timestamp)
    entries as well.
    
    PR:		203531
    Reported by:	Thomas Schmitt <[email protected]>
    Reviewed by:	markj
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39662
    emaste authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    b60eacb View commit details
    Browse the repository at this point in the history
  185. Add jobs.mk to allow for target-jobs

    jobs.mk automates -j$JOB_MAX and capturing build log based on target.
    
    Compute a default for JOB_MAX in local.sys.mk
    
    Reviewed by:	stevek, imp
    Differential Revision:	https://reviews.freebsd.org/D39683
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    114a06c View commit details
    Browse the repository at this point in the history
  186. x86: Move i386 ppireg.h to x86

    Differential Revision:	https://reviews.freebsd.org/D39655
    MFC after:		1 month
    lemul authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    22413ca View commit details
    Browse the repository at this point in the history
  187. x86: Move i386 timerreg.h to x86

    Reviewed by:		emaste, jhb
    Differential Revision:	https://reviews.freebsd.org/D39656
    MFC after:		1 month
    lemul authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    e775ae3 View commit details
    Browse the repository at this point in the history
  188. Fix building host tools for host

    Several makefile depend on tools built for host.
    At least when using DIRDEPS_BUILD we can build these for the
    pseudo machine "host" to facilitate building on older host versions.
    
    Ideally we would build these tools in their own directories to avoid
    building more than needed.
    
    For now, setting an appropriate default for BTOOLSPATH will suffice
    
    Reviewed by:	stevek
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision:	https://reviews.freebsd.org/D39708
    sgerraty authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    5e6aa10 View commit details
    Browse the repository at this point in the history
  189. Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm."

    Some points for the future:
     - libc is not the right place for sorting algorithms.
       Probably libutil is better suited for this purpose or
       a dedicated libsort. Should move all sorting algorithms
       away from libc eventually.
     - CheriBSD uses capabilities for memory access, and could
       benefit from a standard memswap() function.
     - Do something about qsort() in FreeBSD's libc like:
       - Mark it deprecated on FreeBSD, as a first step,
         due to missing limits on CPU time.
       - Audit the use of qsort() in the FreeBSD base system
         and consider swapping to other existing sorting
         algorithms.
    
    Discussed with:	brooks@
    
    Differential Revision:	https://reviews.freebsd.org/D36493
    
    This reverts commit a7469c9.
    This reverts commit 7d65a45.
    This reverts commit 8dcf3a8.
    hselasky authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a54d4c2 View commit details
    Browse the repository at this point in the history
  190. dtrace: get rid of uchar_t types

    Callers are specifying uint8_t anyway and this slightly reduces
    dependencies on compatibility typedefs.  No functional change intended.
    
    Reviewed by:	markj, mhorne
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39490
    christosmarg authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    1d79fde View commit details
    Browse the repository at this point in the history
  191. dtrace: expose dtrace_instr_size() to userland and implement it for r…

    …iscv
    
    dtrace_instr_size() is needed by the forthcoming RISC-V port of kinst,
    as well as by libdtrace in D38825 for both amd64 and RISC-V.
    
    Reviewed by:	markj, mhorne
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39489
    christosmarg authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    0bfba32 View commit details
    Browse the repository at this point in the history
  192. dtrace: use dtrace_instr_size() in the riscv dtrace_subr.c

    No functional change intended.
    
    Reviewed by:	mhorne, markj
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39652
    christosmarg authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    51774f0 View commit details
    Browse the repository at this point in the history
  193. dtrace: add register bindings for RISC-V

    Reviewed by:	mhorne, markj
    MFC after:	1 week
    Sponsored by:	The FreeBSD Foundation
    Differential Revision:	https://reviews.freebsd.org/D39611
    christosmarg authored and bsdjhb committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    d520bd8 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2023

  1. Remove a few more references to riscv64sf.

    Fixes:		1ca12bd Remove the riscv64sf architecture.
    bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    2d34617 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50d85e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36176c9 View commit details
    Browse the repository at this point in the history
  4. dpaa2: add console support for FDT based systems

    Add DPAA2 console support for MC and AIOP (latter untested) for FDT
    systems.  ACPI systems are prepared but need some proper bus function
    in order to get the address from MC (and likely a file splitup then).
    This will come at a later stage once other ACPI/FDT bus parts are
    cleared up.
    The work was originally done in July 2022 and finally switched to
    bus_space[1] lately to be ready for main.
    
    Suggested by:	andrew [1]
    Reviewed by:	dsl
    MFC after:	2 weeks
    Differential Revision: https://reviews.freebsd.org/D38592
    Bjoern A. Zeeb authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    839e87f View commit details
    Browse the repository at this point in the history
  5. kern.mk: clang >= 16 already infers ELFv2 for powerpc64

    There is no need to pass -mabi=elfv2 explicitly anymore, and with clang
    16 in fact results in a "unused argument" warning.
    
    MFC after:	3 days
    DimitryAndric authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    92f796a View commit details
    Browse the repository at this point in the history
  6. netstat: fix printing of TCP pcbs with -A

    This change touches both kernel and netstat(1), but either of the changes
    will fix printing pcb addresses with -A.
    
    The thing is that historically netstat(1) treated TCP differently, and
    printed tcpcb address instead of inpcb address.  This is not documented
    anywhere!  With e68b379 these two addresses became the same.  It is
    highly likely they will be the same for a long time, but it might be they
    will start to differ again in a far future.  My proposal is to stop
    treating TCP differently with netstat(1) and right now is a good opportunity
    to do that, since there will be no behavior change at all.  The kernel
    change to tcp_inptoxtp() will go into stable/14 to make it compatible with
    netstat(1) binary from stable/13.  We can drop it later, probably together
    with in_ppcb pointer from inpcb.  The in_ppcb in xinpcb will stay for size
    compatibility.
    
    Reviewed by:		tuexen, rrs
    Differential Revision:	https://reviews.freebsd.org/D39736
    glebius authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    7221138 View commit details
    Browse the repository at this point in the history
  7. cxgbe(4): Dump the firmware log before falling back to a minimal config.

    It might have errors that explain why the attempted configuration
    failed.
    
    MFC after:	1 week
    Sponsored by:	Chelsio Communications
    np-2020 authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    c9d0f18 View commit details
    Browse the repository at this point in the history
  8. Add WITH_NETLINK_SUPPORT description

    Reviewed by:	melifaro
    Differential Revision:	https://reviews.freebsd.org/D39676
    brooksdavis authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    e277d73 View commit details
    Browse the repository at this point in the history
  9. src.conf.5: regen with WITH_NETLINK_SUPPORT desc

    Reviewed by:	melifaro
    Differential Revision:	https://reviews.freebsd.org/D39677
    brooksdavis authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    7c0c0f4 View commit details
    Browse the repository at this point in the history
  10. Remove unused NETLINK build option

    NETLINK was added along side NETLINK_SUPPORT to control building netlink
    specific programs, but it has no consumers so remove it for now.
    
    Reviewed by:	melifaro
    Differential Revision:	https://reviews.freebsd.org/D39678
    brooksdavis authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    d8d153f View commit details
    Browse the repository at this point in the history
  11. Cirrus-CI: Run makeman script

    Run makeman and verify that src.conf.5 has been updated if
    required and that there are no missing definition files.
    
    Reviewed by:	emaste
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D39682
    brooksdavis authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    a66e5f7 View commit details
    Browse the repository at this point in the history
  12. netstat: cleanup

    protopr does not support reading from a core anymore.
    So don't state that it can.
    
    Reviewed by:		glebius, rscheff, rrs
    MFC after:		1 week
    Sponsored by:		Netflix, Inc.
    Differential Revision:	https://reviews.freebsd.org/D39688
    tuexen authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    8b23312 View commit details
    Browse the repository at this point in the history
  13. openssh: Update configure for DISABLE_LASTLOG

    PR:		209441
    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    b1d1fff View commit details
    Browse the repository at this point in the history
  14. makesyscalls.lua: Make more luaish

    x["y"] can be written as x.y, which looks better and is a more typical
    lua idiom.
    
    Sponsored by:		Netflix
    Reviewed by:		kevans
    Differential Revision:	https://reviews.freebsd.org/D39709
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    07be3fb View commit details
    Browse the repository at this point in the history
  15. makesyscalls.lua: Use "sysxxx" consistently

    Find the few places where we use 'sysxxx' and use "sysxxx" instead to be
    more consistent.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    4488755 View commit details
    Browse the repository at this point in the history
  16. makesyscalls.lua: Minor fluff removal

    luacheck pointed out two minor issues: line isn't declared as a global,
    so declare it local. Also remove an unused parameter.
    
    Suggested by:		kevans
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    a8cbccd View commit details
    Browse the repository at this point in the history
  17. syscall.master: Fix comments

    Have more accruate comments. While #if, #else, etc are copied to the
    header files, lines that don't start with # are not.  And #include files
    are only output to sysinc (which winds up at the front of init_sysent.c
    which seems a bit odd). This is all radically undocumented, and likely
    has drifted somewhat from 4.4BSD and what other systems do (they've
    drifted too, fwiw).
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    7fd32f8 View commit details
    Browse the repository at this point in the history
  18. Update meta.sys.mk and related local*mk

    Move the setting of TARGET_SPEC_VARS to local.sys.env.mk
    so meta.sys.mk can do the processing, and include local.meta.sys.mk
    later.
    
    Move the setting of GENDIRDEPS_FILTER*_VARS from local.gendirdeps.mk
    to local.meta.sys.mk so we can automatically set DEP_* at level 1+
    to avoid syntax errors when DEP_* variables are used in conditionals
    in Makefile.depend files.
    
    Update gendirdeps.mk just to get the documentation about the above.
    No functional change.
    
    local.dirdeps.mk be more careful about adding to DIRDEPS to avoid
    unnecessary overhead, and introducing cycles in the graph.
    Also set DEP_MACHINE_CPUARCH.
    
    Reviewed by:	stevek
    Sponsored by:	Juniper Networks, Inc.
    Differential Revision:	https://reviews.freebsd.org/D39737
    sgerraty authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    03ecfc1 View commit details
    Browse the repository at this point in the history
  19. cxgbe(4): Update firmwares to version 1.27.3.0

    These are the changes since the last update (copy-pasted from the
    release notes for Chelsio Unified Wire v3.18.0.0):
    
    ====================
    Version : 1.27.3.0
    Date    : 04/07/2023
    
    Fixes
    -----
    BASE:
    - Fixed a hang if module eeprom reads gives invalid data.
    - KR backlplane no-fec link problem fixed.
    OFLD:
    - iscsi ddp errors fixed.
    - iwarp connection abort in rare cases causing NIC traffic hang fixed.
    
    ENHANCEMENTS
    ------------
    BASE:
    - Cisco GLC-TE 1G modules support added.
    
    ====================
    Version : 1.27.1.0
    Date    : 12/02/2022
    
    Fixes
    -----
    BASE:
    - memwrite dsgl cannot be used for T5.
    OFLD:
    - Enabled FCoE in SO adapters.
    - TOE-TLS crash fixed.
    - iscsi hang fixed.
    
    MFC after:	2 weeks
    Sponsored by:	Chelsio Communications
    np-2020 authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    e43096f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4c116fc View commit details
    Browse the repository at this point in the history
  21. bsdinstall avoid subdir depending on parent

    When not doing tree walks, it is bad for sub-dirs to depend on
    parents.  Move the generation of opt_osname.h to distextract
    and have others that need that depend on it.
    
    In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still works.
    
    Reviewed by:	obrien
    Differential Revision:	https://reviews.freebsd.org/D39742
    sgerraty authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    f61bf27 View commit details
    Browse the repository at this point in the history
  22. Remove stray line

    Forgot to remove this in 559b94a.
    
    Fixes:		559b94a
    Sponsored by:	Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    595d741 View commit details
    Browse the repository at this point in the history
  23. syscall.master: Remove stray 4.2

    Back in 4.3BSD, the system call table wasn't generated, and there was an
    entry:
            "4.2 sigreturn",        /* 139 = old 4.2 sigreturn */
    This got converted to
    139     OBSOL   0 4.2 sigreturn
    in 4.3 RENO. Since it was obsolete, nothing bad happened. In fact,
    there was code in makeyscalls.sh to cope:
            {       comment = $4
                    for (i = 5; i <= NF; i++)
                            comment = comment " " $i
                    if (NF < 5)
                            $5 = $4
            }
    so the generated comment in syscalls.c was almost correct:
            "obs_4.2",                      /* 139 = obsolete 4.2 sigreturn */
    a bug that we have to this very day, despite makesyscalls.sh being
    rewritten in lua.
    
    However, this historical wart is the only place in our current
    syscalls.master file where we have an extra field for the 'not
    generated' class of system calls. Remove the historical wart so that the
    re-write of makesyscalls.lua can be simpler (so, I hope, qemu's bsd-user
    can large swathes of code automatically generated too). This should help
    make things more understandable (changes to simplify makesyscalls.lue
    aren't quite debugged, so have to wait for another day).
    
    There's 3 different obsolete sigreturns (but only 1 that was ever in
    FreeBSD 2.x and newer).
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    d4564dc View commit details
    Browse the repository at this point in the history
  24. syscalls: regenerate

    The 4.2 sigreturn was a bit of a enima so the 4.2 was remove. Regenerate
    to cope the very minor changes in comments and one string.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    2aeebeb View commit details
    Browse the repository at this point in the history
  25. linuxkpi: Fix __sg_alloc_table_from_pages loop

    Commit 3e0856b updated
    __sg_alloc_table_from_pages to use the same API as linux, but modified
    the loop condition when going over the pages in a sg list. Part of the
    change included moving the sg_next call out of the for loop and into the
    body, which causes an off by one error when traversing the list. Since
    sg_next is called before the loop body it will skip the first element
    and read one past the last element.
    
    This caused panics when running PRIME with nvidia-drm as the off-by-one
    issue causes a NULL dereference.
    
    Reviewed by:	bz, hselasky
    Differential Revision:	https://reviews.freebsd.org/D39628
    Fixes:	3e0856b ("linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux")
    amshafer authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    258758a View commit details
    Browse the repository at this point in the history
  26. mpr: fix copying of event_mask

    Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the
    field event_mask was fully copied to the EventMasks field.
    After this commit the event_mask (uint8_t) is 4 times casted to
    EventMask (uint32_t). Because of that 24 bits of each event_mask array
    is lost.
    
    This commits brings back simple copying of field, and after words
    converting 32 bits field to the requested endian.
    
    I don't think we need more sophisticated method,
    as the array is of size 4 (for 32 bits version).
    
    Reviewed by:	imp
    MFC after:	1 week
    Sponsored by:	Klara Inc.
    Differential Revision:	https://reviews.freebsd.org/D39562
    oshogbo authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    af7c06a View commit details
    Browse the repository at this point in the history
  27. mpr: don't use hardcoded value in debug branch

    Pointed out by:	imp
    Sponsored by:   Klara Inc.
    oshogbo authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    7315225 View commit details
    Browse the repository at this point in the history
  28. pf.conf.5: minor improvements

    * Align 'on <interface>' parameter with the BNF, so use 'on <ifspec>'
    * Clarify etherprotospec BNF, to make it clearer that only numbers are
      supported.
    
    Suggested by:	Christian McDonald
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    kprovost authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    a6eb4b0 View commit details
    Browse the repository at this point in the history
  29. tcp: hpts needs to still call output even after input.

    The other stacks it turns out actually expect the output to be called and can become stuck if it is
    not. This is because they run there timer code from there and the input routine does not always
    assure a timer is running. The real longterm fix here might be to go into the other stacks (rack and bbr)
    and make sure that a timer is running after input if you don't do output.. as well as call the timer functions.
    This would cut down on calls from hpts. But I think its too dramatic of a change for the immediate time.
    
    Reviewed by: tuexen, glebius
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39738
    Randall Stewart authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    7d347b4 View commit details
    Browse the repository at this point in the history
  30. riscv: Compile instr_size.c into the kernel when DTrace is configured

    Reported by:	Jenkins
    Fixes:	080e56a ("dtrace: expose dtrace_instr_size() to userland and implement it for riscv")
    markjdb authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    b125867 View commit details
    Browse the repository at this point in the history
  31. newvers: Use correct regexp

    There's no need to quote the # here. Inside of regexp, it's not treated
    like a comment from an awk perspective. And inside if '' it's not
    treated as special by the shell. gawk also warns.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    c878f0c View commit details
    Browse the repository at this point in the history
  32. truss: Kill dead code

    If it doesn't exist, we don't need it in the table...
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    b8bc8b5 View commit details
    Browse the repository at this point in the history
  33. freebsd32: Regen

    Need to regen freebsd32 as well when sys/kern/syscalls.master is
    updated.
    
    Sponsored by:		Netflix
    bsdimp authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    ab47361 View commit details
    Browse the repository at this point in the history
  34. llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set

    A few Makefiles overrode LINKS and MLINKS when WITH_LLVM_BINUTILS was
    set, which caused some llvm- prefixed tools to disappear.  One such case
    was llvm-ranlib, which some ports invoke explicitly.
    
    Use += when adding to LINKS and MLINKS under WITH_LLVM_BINUTILS.
    
    PR:		270955, 270956, 270959
    Submitted by:	jbeich
    Reviewed by:	arichardson
    Fixes: 021385a ("Add WITH_LLVM_BINUTILS to install LLVM binuti...")
    Sponsored by:	The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39747
    emaste authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    0bf9858 View commit details
    Browse the repository at this point in the history
  35. libcbor: update to 0.10.2

    Sponsored by:	The FreeBSD Foundation
    emaste authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    bfe9549 View commit details
    Browse the repository at this point in the history
  36. llvm-strings: Install as strings when WITH_LLVM_BINUTILS=YES

    Reviewed by:	emaste
    Differential Revision:	https://reviews.freebsd.org/D32065
    CRKatri authored and bsdjhb committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    9ff0037 View commit details
    Browse the repository at this point in the history