imx_clk_composite_find_best_parent can fail, when it does for all the
clocks checked we attempt to configure an uninitialized best_parent
leading to a panic.
Initialize best_parent and skip reconfiguring the clock if we don't find
a new best_parent to use.
Reviewed By: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46662
lex <=, >=, and != into a single token for correctness and to reduce the
lookahead in the parser
ok henning otto
Reviewed by: zlei
Obtained from: OpenBSD, deraadt <deraadt@openbsd.org>, e6e3ecf338
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46582
In the non-optimized case, an address list containing "any" (ie. { any 10.0.0.1 })
should be folded in the parser to any, not to 10.0.0.1. How long this bug has
been with us is unclear.
ok guenther mcbride
Obtained from: OpenBSD, deraadt <deraadt@openbsd.org>, e3b4bc25a0
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46580
add support to pf for filtering a packet by the interface it was received
on. use the received-on IFNAME filter option on a pf.conf rule to restrict
which packet the interface had to be received on. eg:
pass out on em0 from $foo to $bar received-on fxp0
ive been running this in production for a week now. i find it particularly
usefull with interface groups.
no objections, and a few "i like"s from henning, claudio, deraadt, mpf
Obtained from: OpenBSD, dlg <dlg@openbsd.org>, 95b4320893
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46577
Not only when compiled with INET6.
Suggested by Max Laier.
ok henning@
Reviewed by: zlei
Obtained from: OpenBSD, jsing <jsing@openbsd.org>, 0ba1e6e32b9
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46575
TCP_OFFLOAD_DISABLE is nowhere else used or defined. So remove it.
No functional change intended.
Reviewed by: np
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46669
The bit is reserved for PLM5, causing #PF on KVA access on real
hardware, unlike QEMU.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
AMD64 ARM states that 64bit part of the architectural state is undefined
after 32<->64 mode switching.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Extend its storage to be compliant.
This is currently nop due to padding and nul gdt descriptor right after
the lgdt descriptor.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
SDM is explicit that having CR4.PCID=1 while toggling CR3.PG causes #GP.
To be safe and to avoid some more effects, also turn off CR4.PGE.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Changing paging mode while LME is set seems to be not allowed.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: jThe FreeBSD Foundation
MFC after: 1 week
Literally follow requirements from SDM and execute jmp right after
%cr0 CR0_PG bit is toggled back.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Clarify comments about what happens to source blocks in
swp_pager_meta_transfer. No functional changes.
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D46682
and do not hang waiting forever for an ack from non-existing thread.
PR: 281511
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Function swp_pager_meta_transfer expects that after dropping and
reacquiring an object lock, the swap block it's processing still
exists, and has not been removed from the trie and freed. Rewrite to
avoid depending on that, by scrubbing, removing and freeing it before
releasing the lock.
Reviewed by: alc, markj
Differential Revision: https://reviews.freebsd.org/D46629
In libpcap-1.10.5, two structures that we rely on, pcap_timeval and
pcap_sf_pkthdr, were made private.
c2d8cbb977
Temporarily define them here to fix the build. kp and I will
investigate a permanent solution at EuroBSDCon in Dublin.
Reviewed by: kp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46676
This change updates the crypto powerpc* ASM via the prescribed process
documented in `crypto/openssl/FREEBSD-upgrade`.
This change syncs the ASM with 3.0.15's generated ASM.
MFC after: 1 week
MFC with: a7148ab39c
MFC with: cc717b574d
Differential Revision: https://reviews.freebsd.org/D46604
The Hardware Notes for each release are generated automatically from a
template file and the HARDWARE sections of driver man pages. When man
pages for new drivers are added here, they should usually be added to
the release notes template file.
Suggested by: bz
Sponsored by: Amazon
The purpose of the "bounds" test is to check that the function does not
overread the array bounds. The old unit test, copied from the strlcpy()
one, always ensured that we see the character c memccpy() is looking for
in the source array before the array ends. While this is correct for
strlcpy(), memccpy()'s specification does not guarantee that c is
present within the given size limit.
The updated test handles this case better, ensuring that the source
array ends early if c is not supposed to be present.
Reported by: getz
Approved by: emaste
See also: D46052
Event: GSoC 2024
Differential Revision: https://reviews.freebsd.org/D46051
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