powerpc: Don't use cache to zero pages
pmap_zero_page() may be called on uncached pages, so using the cache to
zero uncached pages may trigger a fault.
MFC after: 2 weeks
nda: React to namespace change events
Register for AC_GETDEV_CHANGED. When we receive a namespace
notification, we only create a new device if it was unconfigured. If it
was configured, generate this async event. Rely on the fact that we
reconstruct namespace to just get the data from the identify data and
call disk_resised.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
(cherry picked from commit 86d3ec359a56d1b5d015718bd19ef4bda681a032)
nvme: Notify namespace changes better
When we get a namespace notification, we have to reconstrut the
namespace to get the new identification data from the namespace. For
each namespace in the AEN, we will reconstrict it before we call the
notification. We also flag it as changed for the duration of the change
callback (prior versions of the patch needed to keep track, but we no
longer do, so this bit may be removed). Note when we've seen the
namespace so we can notify when it goes away.
Co-authored-by: imp
Differential Revision: https://reviews.freebsd.org/D33032
(cherry picked from commit 20e94950c54e398049396647da36b9e2c3b639c1)
nvme: Fix backwards sense of error condition
b21e67875bf0c tested for the good condition, not the error condition, so
we'd never do anything else in this function. This was causing certain
logging not to happen, and also prevented forthcoming namespace size
change code from working as well.
Fixes: b21e67875bf0c
Sponsored by: Netflix
(cherry picked from commit 27481c268916b0790c7ad16202a5b012625ce1a8)
LinuxKPI: 802.11: initialize a backpointer on the link_sta
iwlwifi/mld uses the back pointer in iwl_mld_link_sta_from_mac80211().
Initialize it to make BE200 cards work again.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR; 290808
iwlwifi/mld: only get tid after checking that it is a dataqos frame
Like we did for mvm, only get the tid after all the other checks are
done by the function in order to not trigger an assert. Linux will
likely return a random value there which later is not used as the
driver does an early return. In LinuxKPI we do check that the frame
assumptions hold up, which does not go so well for a random frame.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 290808
LinuxKPI: 802.11: implement mtx support for ieee80211_iterate_interfaces
Implement the lockdep_assert_wiphy call for
ieee80211_iterate_active_interfaces_mtx() to avoid a warning when
used and to make sure callers comply with assumptions.
Leave an "IMPROVE" note as we can likely switch another of the multiple
callers to RCU.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: use a _check rather than a _protected version for linksta
Switch to link_sta_dereference_check rather than _protected to access
the value. The actual problem we hit was elsewhere though.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
local-unbound: Read a tab separated resolv.conf
Use [[:space:]] rather than a white space character to delimit the keys
and the values in the resolv.conf file.
PR: 236079
Reviewed by: des
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53811
nvd: handle namespace changes
Signal the new media size when the namespace changes size.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
nvme_sim: signal namespace depature
Signal when the namespace is gone so we can tear down the disk when a
nvme drive is removed.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
nvme: Refactor geom setting to function.
Refactor setting of geometry for the disk to its own function. No
functional changes.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
nda: React to namespace change events
Register for AC_GETDEV_CHANGED. When we receive a namespace
notification, we only create a new device if it was unconfigured. If it
was configured, generate this async event. Rely on the fact that we
reconstruct namespace to just get the data from the identify data and
call disk_resised.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
nvme: Notify namespace changes better
When we get a namespace notification, we have to reconstrut the
namespace to get the new identification data from the namespace. For
each namespace in the AEN, we will reconstrict it before we call the
notification. We also flag it as changed for the duration of the change
callback (prior versions of the patch needed to keep track, but we no
longer do, so this bit may be removed). Note when we've seen the
namespace so we can notify when it goes away.
Co-authored-by: imp
Differential Revision: https://reviews.freebsd.org/D33032
nvme: Fix backwards sense of error condition
b21e67875bf0c tested for the good condition, not the error condition, so
we'd never do anything else in this function. This was causing certain
logging not to happen, and also prevented forthcoming namespace size
change code from working as well.
Fixes: b21e67875bf0c
Sponsored by: Netflix
HBSD: Use the right Makefile variables
The -fno-delete-null-pointer-checks is not a warning, but rather a
normal compiler flag.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to: 15-STABLE
MFC-to: 14-STABLE
Fixes: ca0a80281e4ee936f0bf9df8f40448d37cd6667d
iichid: The IICHID spec defines the response to the RESET command as two bytes of zeros.
Our recent changes to iichid.c has caused us to attempt to read a
full REPORT instead, and at least one keyboard hangs solid when we
do that.
This patch changes us to be spec-compliant.
Differential Revision: https://reviews.freebsd.org/D53803
MFC after: 1 day
Approved by: re(ccperciva)
HBSD: Add various C/C++ hardening flags
One common optimization is to remove NULL pointer checks when the
compiler thinks it's not truly needed. We want to keep those checks in
place (-fno-delete-null-pointer-checks).
Another C/C++ compiler flag enabled by this commit is to check for
potential format string vulnerabilities (-Werror=format-security).
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
MFC-to: 15-STABLE
MFC-to: 14-STABLE