mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
Merge branch 'freebsd/current/main' into hardened/current/master
This commit is contained in:
commit
8559dbdcfb
@ -94,11 +94,11 @@ admin_passthru_head()
|
||||
admin_passthru_body()
|
||||
{
|
||||
if [ -c "${TEST_DEV_PATH}" ] ; then
|
||||
atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV}
|
||||
atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV}
|
||||
else
|
||||
atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV}
|
||||
atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV}
|
||||
fi
|
||||
atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV}
|
||||
atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV}
|
||||
}
|
||||
|
||||
atf_test_case devlist
|
||||
@ -142,11 +142,11 @@ io_passthru_head()
|
||||
io_passthru_body()
|
||||
{
|
||||
if [ -c "${TEST_DEV_PATH}" ] ; then
|
||||
atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV}
|
||||
atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV}
|
||||
else
|
||||
atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV}
|
||||
atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV}
|
||||
fi
|
||||
atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV}
|
||||
atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV}
|
||||
}
|
||||
|
||||
atf_test_case logpage
|
||||
|
@ -2763,6 +2763,10 @@ lkpi_ic_wme_update(struct ieee80211com *ic)
|
||||
* we do use a per-[l]vif event handler to be sure we exist as we
|
||||
* cannot assume that from every vap derives a vif and we have a hard
|
||||
* time checking based on net80211 information.
|
||||
* Should this ever become a real problem we could add a callback function
|
||||
* to wlan_iflladdr() to be set optionally but that would be for a
|
||||
* single-consumer (or needs a list) -- was just too complicated for an
|
||||
* otherwise perfect mechanism FreeBSD already provides.
|
||||
*/
|
||||
static void
|
||||
lkpi_vif_iflladdr(void *arg, struct ifnet *ifp)
|
||||
@ -2771,8 +2775,9 @@ lkpi_vif_iflladdr(void *arg, struct ifnet *ifp)
|
||||
struct ieee80211_vif *vif;
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
/* NB: identify vap's by if_init; left as an extra check. */
|
||||
if (ifp->if_init != ieee80211_init || (ifp->if_flags & IFF_UP) != 0) {
|
||||
/* NB: identify vap's by if_transmit; left as an extra check. */
|
||||
if (if_gettransmitfn(ifp) != ieee80211_vap_transmit ||
|
||||
(if_getflags(ifp) & IFF_UP) != 0) {
|
||||
NET_EPOCH_EXIT(et);
|
||||
return;
|
||||
}
|
||||
|
@ -257,6 +257,19 @@ vm_radix_iter_step(struct pctrie_iter *pages)
|
||||
return (VM_RADIX_PCTRIE_ITER_STEP_GE(pages));
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize an iterator pointing to the page with the greatest pindex that is
|
||||
* less than or equal to the specified pindex, or NULL if there are no such
|
||||
* pages. Return the page.
|
||||
*
|
||||
* Requires that access be externally synchronized by a lock.
|
||||
*/
|
||||
static __inline vm_page_t
|
||||
vm_radix_iter_lookup_le(struct pctrie_iter *pages, vm_pindex_t index)
|
||||
{
|
||||
return (VM_RADIX_PCTRIE_ITER_LOOKUP_LE(pages, index));
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the iterator to point to the page with the pindex that is one greater
|
||||
* than the current pindex, or NULL if there is no such page. Return the page.
|
||||
|
@ -879,6 +879,9 @@ amdiommu_find_unit(device_t dev, struct amdiommu_unit **unitp, uint16_t *ridp,
|
||||
int error, flags;
|
||||
bool res;
|
||||
|
||||
if (!amdiommu_enable)
|
||||
return (ENXIO);
|
||||
|
||||
if (device_get_devclass(device_get_parent(dev)) !=
|
||||
devclass_find("pci"))
|
||||
return (ENXIO);
|
||||
@ -943,6 +946,9 @@ amdiommu_find_unit_for_ioapic(int apic_id, struct amdiommu_unit **unitp,
|
||||
device_t apic_dev;
|
||||
bool res;
|
||||
|
||||
if (!amdiommu_enable)
|
||||
return (ENXIO);
|
||||
|
||||
bzero(&ifu, sizeof(ifu));
|
||||
ifu.type = IFU_DEV_IOAPIC;
|
||||
ifu.devno = apic_id;
|
||||
@ -992,6 +998,9 @@ amdiommu_find_unit_for_hpet(device_t hpet, struct amdiommu_unit **unitp,
|
||||
int hpet_no;
|
||||
bool res;
|
||||
|
||||
if (!amdiommu_enable)
|
||||
return (ENXIO);
|
||||
|
||||
hpet_no = hpet_get_uid(hpet);
|
||||
bzero(&ifu, sizeof(ifu));
|
||||
ifu.type = IFU_DEV_HPET;
|
||||
@ -1001,8 +1010,9 @@ amdiommu_find_unit_for_hpet(device_t hpet, struct amdiommu_unit **unitp,
|
||||
res = amdiommu_ivrs_iterate_tbl(amdiommu_find_unit_scan_0x11,
|
||||
amdiommu_find_unit_scan_0x11, amdiommu_find_unit_scan_0x10, &ifu);
|
||||
if (!res) {
|
||||
printf("amdiommu cannot match hpet no %d in IVHD\n",
|
||||
hpet_no);
|
||||
if (verbose)
|
||||
printf("amdiommu cannot match hpet no %d in IVHD\n",
|
||||
hpet_no);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
@ -1041,7 +1051,7 @@ amdiommu_find_method(device_t dev, bool verbose)
|
||||
|
||||
error = amdiommu_find_unit(dev, &unit, &rid, &dte, &edte, verbose);
|
||||
if (error != 0) {
|
||||
if (verbose)
|
||||
if (verbose && amdiommu_enable)
|
||||
device_printf(dev,
|
||||
"cannot find amdiommu unit, error %d\n",
|
||||
error);
|
||||
|
Loading…
Reference in New Issue
Block a user