libc: drop NO_FP_LIBC support
NO_FP_LIBC was added in 2004 to save space by disabling FP support in
*printf()/*scanf(). The size benefit is negligible on modern systems
and conflicts with assumptions made by current base utilities.
Remove the option and always build libc with floating-point support.
Reported by: Oskar Holmlund <eovholmlund at gmail com>
MFC after: 2 weeks
aq: remove from NOTES; it's unfortunately amd64 only
Unfortunately the aq driver is using readl/writel calls instead
of bus space routines.
This broke, well, everything else.
Fixes: c75eff16ef54aaae7b5dc52ed894cc73a855f469
powerpc: Add ISA 2.06 sub-word atomic set/clear
Add atomic_set/clear_short/char for doing 8-bit and 16-bit operations
more efficiently on "newer" architectures (POWER7 and later).
Piggybacks on b31abc95eb.
ipfw: refactor how we store bpf tap points
Make the tap database belong to ip_fw_chain, but leave the default "ipfw0"
tap per-vnet. This is only slightly better than keeping the database per-
vnet, as the bpf name space is per-vnet. However, we yet have only single
ipfw chain. Whenever multiple chains will coexist, this needs to be
addressed.
Require the chain lock to make modifications to the database.
Move tap allocation to a later ruleset build stage, when all rule numbers
are known already. This fixes a panic introduced by 3daae1ac1d82.
Fixes: 3daae1ac1d82ecdcd855101bab5206e914b12350
ipfw: in a vnet destructor use NET_EPOCH_WAIT()
The lock grab & drop predates epoch(9) introduction to the network
stack and it doesn't provide a true guarantee that all threads that
may use ipfw configuration have finished. Also the lock prevented
from sleepable operations when freeing the rules.
spi: "-S" option for continuous stream from standard input to bus
created to allow addressable leds to be driven by abusing spi bus as waveform generator. this might have other uses for similar "permanent" spi transfers
Differential Revision: https://reviews.freebsd.org/D54734
Reviewed by: adrian
vm/swap_pager.c: silence compiler warning
Initialize pindex in swap_pager_getpages_locked() before the loop
actually calculating it by skipping bogus pages. Compiler is worried
that loop might never assign to it, which actually cannot happen.
Sponsored by: The FreeBSD Foundation
Fixes: d198ad51ea73bbb162336923a387f52b0b1c1f1d
MFC after: 1 week
swap_pager_getpages(): some pages from ma[] might be bogus
Same as vnode_pager_generic_getpages_async(), swap_pager_getpages() must
handle a possibility of the provided page run to include bogus_page on
some positions, when called from sendfile_swapin(). The swap pager is
used for tmpfs vnodes.
In particular, the bogus page must not be used for pindex calculation,
we better not update the flags on it or wait for the flag clearing, and
we must not call vm_page_valid() because the function expects busy page.
This was bisected down to 72ddb6de1028426 (unix: increase
net.local.(stream|seqpacket).(recv|send)space to 64 KiB),
which is somewhat surprising, but apparently reasonable because it
allowed the run of more than one page for page-in from the swap pager,
which now might include valid pages replaced by bogus one.
In collaboration with: pho
Reviewed by: glebius, markj
[3 lines not shown]
ipfw: remove locking workarounds in the table code
Before the "upper half lock" became sleepable the table manipulation code
needed sophisticated workarounds to recover from races, where the lock is
temporarily dropped to do malloc(M_WAITOK). Remove all these workarounds
as they are no longer needed.
Differential Revision: https://reviews.freebsd.org/D54580
ipfw: make the upper half lock sleepable
The so called upper half ipfw lock is not used in the forwarding path. It
is used only during configuration changes and servicing system events like
interface arrival/departure or vnet creation. The original code drops the
lock before malloc(M_WAITOK) and then goes into great efforts to recover
from possible races. But the races still exist, e.g. create_table() would
first check for table existence, but then drop the lock. The change also
fixes unlock leak in check_table_space() in a branch that apparently was
never entered.
Changing to a sleepable lock we can reduce a lot of existing complexity
associated with race recovery, and as use the lock to cover other
configuration time allocations, like recently added per-rule bpf(4) taps.
This change doesn't remove much of a race recovery code, to ease bisection
in case of a regression. This will be done in a separate commit. This
change just removes lock drops during configuration events. The only
reduction is removal of get_map(), which is a straightforward reduce to a
[11 lines not shown]
net: on interface detach purge all its routes before detaching protocols
Otherwise, a forwarding thread may use the interface being detached. This
is a regression from 0d469d23715d, which manifests itself as a reliably
reproducible panic in in6_selecthlim(). Note that there are old bug
reports about such a panic, and I believe this change will not fix them,
as their nature is not due to a screwed up detach sequence, but due to
lack of proper epoch(9) based synchronization between the detach and
forwarding.
Reviewed by: pouria
Reported & tested by: jhibbits
PR: 292162
Fixes: 0d469d23715d690b863787ebfa51529e1f6a9092
Differential Revision: https://reviews.freebsd.org/D54721
mxge(4): avoid clang 21 warning in NO-IP configuration
Building the LINT-NOIP kernel on amd64 with clang 21 results in a
-Werror warning similar to:
sys/dev/mxge/if_mxge.c:1846:44: error: variable 'sum' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
1846 | cksum_offset, sizeof(sum), (caddr_t)&sum);
| ^~~
Indeed, if both `INET` and `INET6` are undefined, `sum` is never
initialized. Initialize it to zero to silence the warning.
Reviewed by: jhibbits
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54730
tdestroy: don't visit one-child node twice
Change tdestroy() to immediately free a node with no right child as
soon as it is encountered. Currently, such nodes are visited twice
before deletion.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54699
Initialize CLOCK_UPTIME for itmer events
Since we move to implement Linux's CLOCK_MONOTONIC with CLOCK_UPTIME, we
broke the some timer support for Linux. Fix this by initializing
CLOCK_UPTIME as a posix clock so we can use in that context.
PR: 292496
MFC After: 5 days
Fixes: 108de784513d
Sponsored by: Netflix
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54746
termios.4: Cross-reference stack(9) for STATUS
If the kernel is built without stack(9) (options STACK),
then the mentioned sysctl(8) kern.tty_info_kstacks will not be found.
MFC after: 3 days
Reviewed by: kib, ziaee
Differential Revision: https://reviews.freebsd.org/D54701
smartpqi: Avoid declaring extern inline functions
Each C file is compiled separately so these functions can't be inlined
except in the file where they are defined. Since these functions aren't
used outside smartpqi_request.c, just do the simple thing and make them
private to that file.
Reported by: gcc
Reviewed by: jrhall
Fixes: c558eca47970 ("smartpqi: update to version 4660.0.2002")
Differential Revision: https://reviews.freebsd.org/D54732
UPDATING: Bump __FreeBSD_version to 1403508 for various LinuxKPI changes
Precautiously bump __FreeBSD_version for various LinuxKPI changes
so they could be detected if needed (which they should not need to,
hopefully).
LinuxKPI: 802.11: add compat.linuxkpi.80211.IF.dump_stas_queues
Extend the normal compat.linuxkpi.80211.IF.dump_stas sysctl by
queue information. This was helpful for debugging various issues,
like selecting the outbound queue, stopping queues for BAR and helped
finding multiple bugs.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 32ea8209825af594cbfa1fc654d45eb9a6aab528)
(cherry picked from commit 6b9c0ac008a9c52b21b05c96ead6def41aa89ead)
LinuxKPI: 802.11: reset hdr after crypto in lkpi_80211_txq_tx_one()
When lkpi_80211_txq_tx_one() calls into the crypto offloading parts to
possibly make space in the headroom, the beginning of our frame moves.
We have to reset hdr after that call as otherwise later classifications
based on the hdr->frame_control will fail or cause wrong classificaiton
of packets.
This makes sure frames will either be directly sent using (*mo_tx)()
or use the correct tid for the correct queue. This helps to get
rtwx8 packets flowing after BA was negotiated.
Sponsored by: The FreeBSD Foundation
Fixes: 11db70b6057e4
(cherry picked from commit f0395993e1ea83705e0da6623843e7d5d03f7269)
(cherry picked from commit 4d255abe992fef69c97ce10991d815eda638c76d)
mt76: set appropriate CONFIG options for the module build
Always set CONFIG_ARCH_DMA_ADDR_T_64BIT as it is true for all
architectures we support. Add an option for CONFIG_NET_MEDIATEK_SOC_WED,
which we currently do not yet support.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 87aa494dfca73204516799033821ab1db184933f)
(cherry picked from commit e2ebe56c50e77f3302c85a8203f8fa4050ae0f54)
LinuxKPI: 802.11: lock down the "txq_scheduled" tailq
For consistency rename the "scheduled_txqs" tailq to
"txq_scheduled" and add a lock per txq ("txq_scheduled_lock[]").
We use the "_bh" locking as this called from the device driver.
This fixes panics due to concurrent access to the tailq, especially
in between "first" and "remove" on the out-direction and between
"insert" and "elem_init" on the in-direction.
This was easily reproducible just running iperf3 at basic rates for
a few seconds to minutes with multiple chipsets, not only rtw89.
Sponsored by: The FreeBSD Foundation
PR: 290636
Reported by: arved, and others before
(cherry picked from commit 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc)
(cherry picked from commit 2e1156f75836a0e5a4026e13d72b54f272e705cb)
LinuxKPI: 802.11: move ieee80211_offload_flags
Move the enum and leave a comment on the struct member for the vif
about the type.
No functional changes.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b10ff7ed37a9b891bec7e1093e44fa7abb2054b4)
(cherry picked from commit a714641fa5380cc320d23181d4b18f7f89ccd183)
LinuxKPI: device: add a pr_debug("TODO") call to device_release_driver()
The logic in device_release_driver() got disabled in 93b14194acaf2
and since left alone. Add a pr_debug() call so we have a chance to
notice if that code is actually still in need to be fixed and re-enabled.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fc9666d0fc0c2541e44bfbcaa5bb1b670395687c)
(cherry picked from commit 0f496780deee49cfd86f4e02db775b706405fef9)