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
ng_netflow v9: fix template re-announcement using packet count
Increment fe->sent_packets after export9_send().
Previously, NetFlow v9 templates were only re-announced based on
time, ignoring the packet count parameter (`templ_packets`).
PR: 270083
Reviewed by: glebius pouria
Approved by: glebius (mentor)
MFC after: 1 week
Sponsored by: Subcarpathian BSD User Group