rmlock: Micro-optimize read locking
Reapply c84bb8cd771c. markj's original commit log:
rmlock: Micro-optimize read locking
Use get_pcpu() instead of an open-coded pcpu_find(td->td_oncpu). This
eliminates some memory accesses and results in a shorter instruction
sequence. Note that get_pcpu() didn't exist when rmlocks were added.
Reviewed by: jah, mjg
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34377
That optimization was subsequently reverted by
afb44cb01018 ("rmlock: Temporarily revert commit c84bb8cd771c")
due to triggering panics on arm64. The issue was diagnosed as arm64's
get_pcpu() using a register asm variable, allowing the compiler to
reorder accesses that were intended to be constrained by the pseudo
[9 lines not shown]
msdosfs: avoid buffer overflow in win2unixfn()
On UTF-8 mounts, since f983cb362de7, a high surrogate in the last
character of a long name slot is joined with the low surrogate kept
from the logically following slot and converted into a 4-byte UTF-8
sequence. If the other 12 characters convert to 3 bytes each, the slot
fills all 40 bytes of name[], and the terminating NUL is written past
its end.
Size name[] for 4 bytes per character, the most win2unixchr() returns.
Reported by: llm-postcr
Fixes: f983cb362de7 ("fs/msdosfs: add support for file namws with surrogate pairs")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
kern: Enable respond to terminal
Shells like fish starts to query Device Capability from the kernel
terminal emulator. We already have the reply infras for each
protocols. The remaining part for this is to enable actual write.
Previously, we have lock issue from the respond side as
ttydisc_rint_done calls wakeup and takes the lock again.
The respond function now acts like queueing the response only, allo
of the output is handled in outwakeup. wakeup now handle queueing
after locking, which makes respond gets rid of locking from the parent.
After this, fish is able to run in the tty.
Reviewed by: dumbbell
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D62192
ixgbe: Rearm the assigned MSI-X vector for each TX queue
iflib passes a TX queue index to ifdi_tx_queue_intr_enable. With
more TX queues than RX queues, using that index in the RX queue
array can read past the allocation.
Use the vector saved in the TX queue at interrupt assignment. This
is the same vector ixgbe_configure_ivars() programs for that ring.
MFC after: 1 week
Sponsored by: BBOX.io
Don't fetch the rwhich database from external package repositories.
This isn't needed for pulling in externally-built dependancies, and
downloading and processing it is quite expensive.
(cherry picked from commit 7f90e65a2b6a25b1d0f38eb03daca2e440a2de4d)
Don't fetch the rwhich database from external package repositories.
This isn't needed for pulling in externally-built dependancies, and
downloading and processing it is quite expensive.
linuxkpi: sleep at least the requested time
msleep(), usleep_range() and msleep_interruptible() passed C_HARDCLOCK
to pause_sbt(), which measures the timeout from the last hardclock
tick, so they could return up to a tick early. Linux guarantees the
minimum.
Approved by: adrian
Differential Revision: https://reviews.freebsd.org/D62181
uplcom: write the baud rate directly on PL2303HXN
uplcom encodes a divisor for any rate that is not in its table. The
PL2303HXN (G series) does not take divisors, so output stalled at such
rates. Linux writes the rate directly for these chips.
Differential Revision: https://reviews.freebsd.org/D62460
security/opkssh: Update to 0.20.0
- Fix bad stat(1) syntax in policy/files/permschecker.go.
- Home policies (~/.opk/auth_id) did not work: opkssh calls "sudo"
without a path, and sshd runs the AuthorizedKeysCommand with
PATH=/usr/bin:/bin:/usr/sbin:/sbin, so sudo from security/sudo was
not found. A new patch calls %%LOCALBASE%%/bin/sudo, and post-patch
now substitutes %%LOCALBASE%% as well.
- New patch for the etc/opk/providers path that
"opkssh client provider add" prints.
- pkg-message now describes the permissions of the configuration
directory (including policy.d), the log file /var/log/opkssh.log and
the sudoers rule for home policies, as upstream's install-linux.sh
sets them up. An upgrade message explains the stricter policy
parsing in 0.20.0, which can stop rows from matching that matched
before.
ChangeLogs:
[11 lines not shown]
security/opkssh: Update to 0.20.0
- Fix bad stat(1) syntax in policy/files/permschecker.go.
- Home policies (~/.opk/auth_id) did not work: opkssh calls "sudo"
without a path, and sshd runs the AuthorizedKeysCommand with
PATH=/usr/bin:/bin:/usr/sbin:/sbin, so sudo from security/sudo was
not found. A new patch calls %%LOCALBASE%%/bin/sudo, and post-patch
now substitutes %%LOCALBASE%% as well.
- New patch for the etc/opk/providers path that
"opkssh client provider add" prints.
- pkg-message now describes the permissions of the configuration
directory (including policy.d), the log file /var/log/opkssh.log and
the sudoers rule for home policies, as upstream's install-linux.sh
sets them up. An upgrade message explains the stricter policy
parsing in 0.20.0, which can stop rows from matching that matched
before.
ChangeLogs:
[10 lines not shown]
bootptest: use getifaddrs(3) to find an interface
The getif() restored in 6c3c05c5f131 is not really functional. Put it
back into history and implement [supposedly] desired functionality with
getifaddrs(3). Put getether() into history as well.
Reported by: llm-postcr
Fixes: 6c3c05c5f131637b95574faead1bf3219978ad1d
bootpgw: use getifaddrs(3) to find interface closest to 'your' address
The daemon is supposed to relay BOOTP packets between interfaces, and
of course routing replies back to original interface was incorrect.
Bring back a fresh implementation of getif() into handle_reply() that
uses a more modern API, but makes selection using the old logic.
Reported by: llm-postcr
Fixes: d4452259e75f3891b77302270e6f69057e2d9f2e
audio/speech_tools: New port, the Edinburgh Speech Tools Library 2.5.1
The Edinburgh Speech Tools Library is a collection of C++ classes,
functions and related programs for manipulating the objects used in
speech processing: waveforms, parameter files, utterances, grammars.
It includes CSTR's fork of the SIOD Scheme interpreter, wagon, and
audio output support. It is the foundation of Festival (and of the
voice-building tools of festvox and flite), which so far bundled its
own copy.
Built with meson from upstream's latest commit, and tested with
upstream's test suite -- whose script outputs are also compared with
the expected ones. Besides the libraries, headers and programs, a
configured copy of the old make-framework is installed under
lib/speech_tools (ESTDIR), as Festival's build expects it.
FreeBSD-specific changes:
- textproc/rxp is used instead of the bundled XML parser, whose
sources are not even extracted;
[12 lines not shown]
audio/speech_tools: Start with festival's patches to its bundled copy
The upcoming audio/speech_tools port fixes some of the same problems,
which audio/festival has been patching in its bundled copy of the
Edinburgh Speech Tools. Copy those patches over unchanged -- so that
their history can be followed -- before adapting them to the new port
in the next commit:
patch-speech__tools_main_sig2fv__main.cc -> patch-main_sig2fv__main.cc
patch-voxware
patch-speech_tools_include_EST_unix.h
audio/festival keeps using its copies until it is updated to use the
new port.
PR: 299348
Co-Authored-By: Claude Opus 5.5 (effort medium)