Merge pull request #320 from ghostbsd/dependabot/pip/contrib/libcbor/doc/source/idna-3.7
build(deps): bump idna from 3.3 to 3.7 in /contrib/libcbor/doc/source
ccdconfig: reference gpart rather than fdisk and disklabel
fdisk and disklabel are legacy tools for legacy disk partitioning
schemes.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43564
(cherry picked from commit 8669e516f0e6f48a5017db9e5f4768275f1deaa8)
MFC: if_bridge: use IF_MINMTU
Replace incorrect constant 576 with IF_MINMTU to check for minumum MTU.
This unbreaks bridging tap interfaces with small mtu.
(cherry picked from commit 319a5d086b50f38618b62c78e83b12931f00b508)
tmpfs: Improve file time tests.
* The empty test case no longer fails because 89f1dcb3eb46 causes empty
files to bypass the bug.
* The bug still exists, so add a test case which exercises it.
* While here, tighten up some of the checks.
A similar patch has been submitted upstream.
PR: 274615
X-MFC-With: 89f1dcb3eb46
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44609
(cherry picked from commit 8311bc5f17dec348749f763b82dfe2737bc53cd7)
kern linker: Do not touch userrefs of the kernel file
A nonzero `userrefs` of a linker file indicates that the file, either
loaded from kldload(2) or preloaded, can be unloaded via kldunload(2).
As for the kernel file, it can be unloaded by the loader but should not
be after initialization.
This change fixes regression from d9ce8a41eac9 which incidentally
increases `userrefs` of the kernel file.
Reviewed by: dfr, dab, jhb
Fixes: d9ce8a41eac9 kern_linker: Handle module-loading failures in preloaded .ko files
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D42530
(cherry picked from commit 39450eba8e6cd5b83def724481127b58ecc1fcc1)
kern linker: Do not unload a module if it has dependants
Despite the name, linker_file_unload() will drop a reference and return
success when the module file has dependants, i.e. it has more than one
reference. When user request to unload such modules then the kernel
should reject unambiguously and immediately.
PR: 274986
Reviewed by: dfr, dab, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D42527
(cherry picked from commit f43ff3e15c8b4b161ce09c8ab008abc4222db26b)
cxgbe tom: Handle a race condition when enabling TLS offload
Use a separate state for when a request to set RX_QUIESCE has been
sent but the resulting TCB reply has not been received. In
particular, this correctly handles the case where data has been
received and queued in the receive queue before the quiesce request
takes effect.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44435
(cherry picked from commit 9978c6289d621ac9edc95acb4e0f527a62a49b03)
kldxref: Properly handle reading strings near the end of an ELF file
If a string is at or near the end of an input file and the amount of
remaining data in the file is smaller than the maximum string size,
the pread(2) system call would return a short read which is treated as
an error. Instead, add a new helper function for reading a string
which permits short reads so long as the data read from the file
contains a terminated string.
Reported by: jrtc27
Reviewed by: jrtc27
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44419
(cherry picked from commit 785600d0fb13d6f0b4595bf4dbbc048113dda71d)
arm busdma: Fix parameter types to exclusion_bounce_check
These are bus addresses not CPU virtual addresses.
Reviewed by: andrew
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D44343
(cherry picked from commit 66658b0f2775824b2a80fb56ca15e6ceae2f8240)
.github: Switch to v4 of actions/checkout
GitHub is emitting a warning that v3 is deprecated due to using
Node.js 16.
(cherry picked from commit e6dccf00500d7e9e2311b372e28897df7c0421dd)
nvmecontrol: Update the test for a valid firmare revision slot
Reported by: Coverity Scan
CID: 1539214
Fixes: 7485926e09a0 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
(cherry picked from commit 1b38f851d809950cfe112c705029f40edd0579b3)
nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
In particular, don't try to byteswap the values as 64-bit integers and
always print a non-empty version as a string.
Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44121
(cherry picked from commit 7485926e09a08fbfe83a9bc908e7d43aaca4c172)
netlink: Don't use a zero-length array
Define SNL_DECLARE_FIELD_PARSER* macros to create a parser that has
no output attributes only input fields and use this to define the
snl_donemsg_parser.
This removes the need for the zero-length nla_p_donemsg[] variable.
Zero length arrays are not valid in ISO C.
Reviewed by: jrtc27, melifaro
Differential Revision: https://reviews.freebsd.org/D43918
(cherry picked from commit 69945c49fea7ac2352c1fd7d22f70f2e3861ba81)
ipfw: Skip to the start of the loop when following a keep-state rule
When a packet matches an existing dynamic rule for a keep-state rule,
the matching engine advances the "instruction pointer" to the action
portion of the rule skipping over the match conditions. However, the
code was merely breaking out of the switch statement rather than doing
a continue, so the remainder of the loop body after the switch was
still executed. If the first action opcode contains an F_NOT but not
an F_OR (such as an "untag" action), then match is toggled to 0, and
the code exits the inner loop via a break which aborts processing of
the actions.
To fix, just use a continue instead of a break.
PR: 276732
Reviewed by: jhb, ae
MFC after: 2 weeks
(cherry picked from commit 62b1faa3b7495de22a3225e42dabe6ce8c371e86)
riscv: Add missing includes for DDB
The #ifdef DDB code in parse_metadata was dead code without opt_ddb.h.
While here, update the call to db_fetch_ksymtab for changes in commit
02bc014a200a.
Reviewed by: mhorne
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D43919
(cherry picked from commit 962b0bcbd924d308016237abc991280f15777e7f)
acpi: Don't assume a resource is reserved in acpi_delete_resource
This fixes a panic if a driver uses bus_set_resource to add a resource
that fails to reserve and then deletes the resource via
bus_delete_resource.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43891
(cherry picked from commit e05436d577de98944b97b9cf510b29c4d2091b3f)
pci_host_generic: Include the bridge's device name in rman descriptions
The rman description strings now match those used in the PCI-PCI
bridge driver. Using more specific names removes ambiguity in devinfo -u
output on systems with multiple host to PCI bridges.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43890
(cherry picked from commit 51f8ac224f3b87555ea17c7e7c4015a2a2b8b191)