Fix typo in comment describing `feature_present(3)`
feature_present(3) checks `kern.features`, not `kern.feature`, for
feature existence.
Extremely naive readers, like GitHub's Copilot (Lite effort) take
comments at face value without actually looking at the code to make sure
the comment is correct. This can lead to very incorrect conclusions [1].
1. https://github.com/freebsd/atf/pull/242#discussion_r4746930972
MFC after: 1 week
math/speedcrunch: update the port to the latest version 1.2.0
The project had moved to GitHub and now assumes CMake 3.16 or
later, C++17-capable compiler, and Qt 6.4 or newer.
Restoring Qt 5 support is unfortunately not feasible as it would
take a fair amount of work; the build system and several parts of
the UI now use Qt 6-exclusive APIs directly. While most features
could probably be adapted to Qt 5.15, that would require lots of
compatibility code and ongoing testing of both versions.
Requested by: Helder Correia (upstream maintainer)
PR: 301006 (independent submission)
libiconv/gbk2k: Handle GB18030SUPP correctly.
According to https://en.wikipedia.org/wiki/GB_18030#Mapping, the code
above 0x90308130 is mapped linearly to unicode 0x10000 to 0x10FFFF. It
is not handled in our iconv implemenation. We implement such mapping in
here and add some tests.
Reviewed by: kevans
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61153
libiconv: Respect RFC 3629
RFC 3629 limits UTF-8 to U+10FFFF, which our iconv doesn't follow but
has been correctly handled in libc. As iconv is the default locale
implementation now. We should respect the standard in here.
Reviewed by: kevans
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61152
acpi/tz: Resync cooler device after resume
A acpi_fan under tz domain can inconisist after resume. The device now
switch between D3 and D0 in suspend and resume. However, if a tz turn
off the cooler before resume, the device will still run after resume as
there is no mechanism in tz to resync activity and the cooler can
by default enter D0.
Reported by: llm-postcr
devel/jech-dht: Update 0.27 => 0.28
Changelog:
* Fix an off-by-one error when computing the time to wake up.
* Avoid starvation of one address family (IPv4 or IPv6) when
the other address family is not functional.
https://github.com/jech/dht/blob/dht-0.28/CHANGES
While here, take maintainership.
PR: 301251
membarrier(2): do not call smp_rendezvous_cpus() with an empty mask
If the caller migrates while the mask is computed and no other thread
of the process is running, the mask is empty, and smp_rendezvous_cpus()
panics.
PR: 301240
Fixes: 4a69fc16a583 ("Add membarrier(2)")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
membarrier(2): issue the leading fence before reading other CPUs' state
There are two problems:
- The old fence ran after the mask was computed, so a store the caller
made before the syscall could still be in its store buffer when it read
another CPU's state. A thread switched in right after that read then got
neither the IPI nor the store.
- MEMBARRIER_CMD_GLOBAL had no fence before its first pass, which marks
idle CPUs done immediately.
Fixes: 4a69fc16a583 ("Add membarrier(2)")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
acpi/fan: Always call _FSL
Fan device can adjust the fan level itself and propogate to the APCI
Table. This however is opaque to the driver as there is no interrupt
to notify us that the fan level is chaged.
This can cause problem if we want to set the same value as the cached
one, which is all in all short-circuited.
As a result, we call _FSL unconditionally. Also, the condition is also
racy if two writes reach kernel. The value doesn't reflect the last
one. Therefore, we enlarge the critical section and use sx to protect
frequently read case.
Reported by: llm-postcr
Fixes: 116216477e8a ("acpi: Add acpi_fan")
snp(4): for snp_read(), check tty_gone() under tty lock before cv_wait()
Otherwise snp_read() might lose the wakeup from a gone tty.
Keep the unlocked tty_gone() check on entry, so that a non-blocking
read on a gone tty with an empty snoop queue returns EIO instead of
EWOULDBLOCK.
A sleeping reader whose wakeup races with the tty going away now returns
the output captured before that, instead of EIO.
Reported by: llm-postcr
Fixes: d8569724dc0d ("snp(4): wake up the readers and pollers when the tty is gone")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week