This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.
Reviewed by: wulf
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/1359
Initially, it was added to cover a conflicting case of ipfw and pf used
together. But there are more drawbacks than benefits:
- A half of these tests are always skipped. That leads to
misunderstanding, while the test suite strives to avoid ambiguous
situations.
- Handling enabled ipfw on the test level is tedious, error-prone, and
less maintainable.
- CI and similar parties already know how to deal with ipfw for the test
suite, like making it open by default. Extra complexity is not needed.
In addition, ipfw+pf use cases are not officially supported.
Reviewed by: kp, markj
Approved by: kp (mentor), markj (mentor)
Differential Revision: https://reviews.freebsd.org/D46655
Add bindings for kenv(2) right now only get() has been created
it allows do dump into a key/value table the kernel environement if
no argument is passed, or it returns the value associated to the
provided key.
Reviewed by: imp, kevans, markj
Accepted by: imp, kevans
Differential Revision: https://reviews.freebsd.org/D46654
ps3 are broken since we moved to clang/elfv2. Fix this by updating the
hypercall glue to the new ABI.
Signed-off-by: Chattrapat Sangmanee <aomsin27@hotmail.co.th>
Reviewed by: jhibbits
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1413
While this approach works for trapping reads of an uninitialized
pointer, it means that any attempt to store to the variable triggers a
KASAN report, which is not what we want. Simply remove the kasan_mark()
call. KMSAN will catch these kinds of bugs automatically anyway.
Reported by: syzbot+c5e279db5763b58e8d69@syzkaller.appspotmail.com
MFC after: 1 week
* add the MMIC element ID
* add a comment showing the source of this table from the 802.11-2016
specification.
Differential Revision: https://reviews.freebsd.org/D46505
Define a pctrie iterator type. A pctrie iterator is a wrapper around a
pctrie that remembers a position in the trie where the last search
left off, and where a new search can resume. When the next search is
for an item very near in the trie to where the last search left off,
iter-based search is faster because instead of starting from the root,
the search usually only has to back up one or two steps up the
root-to-last-search path to find the branch that leads to the new
search target.
Every kind of lookup (plain, lookup_ge, lookup_le) that can begin with
the trie root can begin with an iterator instead. An iterator can also
do a relative search ("look for the item 4 greater than the last item
I found") because it remembers where that last search ended. It can
also search within limits ("look for the item bigger than this one,
but it has to be less than 100"), which can save time when the next
item beyond the limits and that is known before we actually know what
that item it is. An iterator can also be used to remove an item that
has already been found, without having to search for it again.
Iterators are vulnerable to unsynchronized data changes. If the
iterator is created with a lock held, and that lock is released and
acquired again, there's no guarantee that the iterator path remains
valid.
Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D45627
Add clock tree for imx8mp SOC. This provides clocks sufficient for
several sub systems to work including USB and SD/MMC.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46642
Rearrange the IMX clock control module driver so it is more straight
forward to support clock trees from other SOCs in the family.
Move the existing imx8mq_ccm driver to a more generic imx_ccm (based on
rk_cru) and update the previous driver to sub class imx_ccm.
Reviewed by: manu
Sponsored by: The FreeBSD Foundations
Differential Revision: https://reviews.freebsd.org/D46641
Combine two loops, each iterating over the same array of pages to
initialize them, into a single loop.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46609
Upstream new defines, enum values, etc. for coming driver updates which
are non-conflicting with the current state.
The only notable change is the rename of the enum ieee80211_ap_reg_power
but the enum name had not been used so far by any driver in the tree
(only in mac80211.h) but an updated version of ath11k does use it so we
need to correct our initial naming.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Add new enums to netdevice.h (including one which is referenced but
no value of it is used in a driver so we have to add a "dummy" value
to avoid an empty enum).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Add pci_err() as a wrapper to dev_err() as needed by an updated driver.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46660
Ignoring page_pools with the few needed adjustments and ignoring 7622
mt7615 seems to build as well. Add it so once we can connect it to
the build people can start testing and debugging.
(The actual work was done on a newer version of the mt76 drivers but
it seems the to-build-changes equally apply here already).
Requested by: Radu-Cristian Fotescu (freebsd-wireless, 2024-07-31)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
The function ng_ipfw_input() used to enjoy implicit
32->16 bits truncation of its second argument.
Make it explicit to recover from the breakage.
PR: 281082
Reported by: Ruben van Staveren <ruben@verweg.com>
Tested by: Ruben van Staveren <ruben@verweg.com>
MFC after: 3 days
Fixes: 20e1f207cc
If the ZFS key is setup in prompt mode, use zfs to prompt to load the key
during boot to unlock it.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D36081
Rather than attempt to install the tunnel callback every time we add a peer only
do so the first time.
Reviewed by: zlei
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46651
Add a central table of modes and loop over it rather than spelling out
10 essentialy identical strcmp if statemnts. Use the stable to generate
usage as well reducing the number of ifdefs.
Disallow multiple -m options. Previouly multiple were allowed, but only
the last one was used and there was no indication this happened.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D46426
When we install the tunneling function we had the ovpn lock, and then took the
UDP lock. During normal data flow we are called with the UDP lock held and then
take the ovpn lock.
This naturally produces a lock order reversal warning.
Avoid this by releasing the ovpn lock before installing the tunnel function.
This is safe, in that installing the tunnel function does not fail (other than
with EBUSY, which would mean another thread has already installed the function).
On cleanup the problem is more difficult, in that we cannot reasonably release
the ovpn lock before we can remove the tunneling function callback.
Solve this by delaying the removal of the tunnel callback until the ovpn_softc
is cleaned up. It's still safe for ovpn_udp_input() to be caled when all peers
are removed. That will only increment counters (which are still allocated),
discover there are no peers and then pass the message on to userspace, if
any userspace users of the socket remain.
We ensure that the socket object remains valid by holding a reference, which
we release when we remove the ovpn_softc. This removes the need for per-peer
reference counting on the socket, so remove that.
Reviewed by: zlei
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision:: https://reviews.freebsd.org/D46616
Follow the path of what is done with bsnmp, build the modules along
with the main binary, this allows to build the modules at a moment
where all needed libraries are already built and available in the
linker path instead of having to declare all the libraries which a
flua module will be linked to in _prebuild_libs.
Discused with: markj
Reviewed by: markj, jrtc27, kevans, imp
Accepted by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D46610
The destination queue for tracing filters is destroyed during stop or
suspend and the software state needs to reflect this. A new destination
queue will be setup when the adapter resumes operation.
MFC after: 1 week
Sponsored by: Chelsio Communications
The STALE state means the L2T entry is valid in hardware but needs to be
refreshed (ARP/NDP) in software. But stop/suspend wipes the hardware
L2T and STALE entries need to be updated just like VALID entries to match
actual hardware state.
Fixes: c1c524852f cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
MFC after: 1 week
Sponsored by: Chelsio Communications
sys/types32.h: Remove struct timeval32 from libspl's header (#16491)
macOS Sequoia's sys/sockio.h, as included by various bootstrap tools
whilst building FreeBSD, has started to include net/if.h, which then
includes sys/_types/_timeval32.h and provide a conflicting definition
for struct timeval32. Since this type is entirely unused within OpenZFS,
simply delete the type rather than adding in some kind of OS detection.
This fixes building FreeBSD on macOS Sequoia (Beta).
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
MFC after: 1 week
This reverts commit f08247fd88.
This assertion is triggered by
ktls_test:ktls_transmit_aes128_cbc_1_0_sha1_control. Remove the assertion until
we fully understand why.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Ensure that we verify that the inner and outer IP address matches for ICMP error
messages. This is a more detailed test for CVE-2019-5598, which was fixed back
in 2019.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46573
Ensure that we can modify mbufs before we start processing them. There are a
number of paths where pf will m_copyback() or otherwise modify a packet. Ensure
that this is safe to do.
For example, ip6_forward() will m_copym() the packet before handing it to the
output pfil hook. This results in a non-writable mbuf, which would trigger
assertion failures (see previous commit).
Reviewed by: glebius (previous version)
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46628
m_copyback() modifies the mbuf, so it must be a writable mbuf.
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46627
The ARM1176 is an Armv6 CPU. As Armv6 support has been removed we can
also remove ARM1176 support.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45958
The only supported 32-bit Arm architecture is Armv7. Remove old checks
for earlier architecture revisions.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45957
Add a new macro that enables all CPTR_EL2 traps. This helps ensure we
trap all extensions we don't support.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46516
The TTA field moves depending on the HCR_EL2.E2H field. Add a macro to
hold the E2H == 1 case.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46515
Rename register fields that are only valid when HCR_EL2.E2H == 1. Some
fields move around depending on the value of the E2H field.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46514
When FEAT_LPA2 is implemented and the TCR_EL1.DS field is set we can
create blocks at level 1 with a 16kB page size. Add a variable to
tell the kernel this is enabled.
This will be used by other parts of pmap.c with a 4k page kernel so
make it visible there.
Reviewed by: alc, kib, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46395
When VHE is enabled we disabled trapping floating-point instructions to
EL2 in locore.S. As the kernel is running in EL2 then vfp.c will manage
enabling floating-point instructions as needed.
Sponsored by: Arm Ltd