nfsd: Fix handling of RPC messages too large to cache
The NFSv4.1/4.2 session negotiates a limit to the size
of an RPC reply message that can be cached for the session
slot.
This patch fixes the code so that it checks that limit and
does not cache replies larger than the limit, even if the
client requested that it be cached.
This patch is slightly different than what the author
submitted, but retains the check for reply cache size limit.
Reviewed by: rmacklem
MFC after: 1 month
ktls: Check the record type message holds its byte
sosend_generic() read the TLS record type past a TLS_SET_RECORD_TYPE
control message holding only a cmsghdr, and sent that stale byte.
Approved by: markj
Fixes: b2e60773c6b0 ("Add kernel-side support for in-kernel TLS.")
Sponsored by: Netflix
editors/openoffice-devel: upgrade to new snapshot
Upgrade to a newer snapshot of the upstream trunk branch.
Wiki Publisher no longer uses apache-commons-codec or the insecure
apache-commons-httpclient so unbreak and re-enable the WIKI_PUBLISHER_
option.
These patches have been upstreamed:
patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc64_call.s
patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc64_cpp2uno.cxx
patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc64_share.hxx
patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc64_uno2cpp.cxx
patch-jvmfwk_plugins_sunmajor_pluginlib_vendorbase.hxx
patch-set_soenv.in
patch-source__soenv.sh
Use bundled lucene instead of the lucene port and remove DEPRECATED.
MFH: 2026Q4
libthr: Remove deadcode in join_common
The while loop previous can only be break when ret == ETIMEDOUT. They
never produce EBUSY. Remove the deadcode here.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60711
(cherry picked from commit a0e152973613e0d0d55257f4e1f614509b7ec4c9)
libthr: Fix LIBPTHREAD_QUEUE_FIFO range
LIBPTHREAD_QUEUE_FIFO is used in bitwise offset, we set the limit to
0~31 so that it won't cause undefined behavior. Also, create a new
helper function to do getenv++strtol directly and check the boundary of
the valid value.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60487
(cherry picked from commit 5fb07bbcd5d5d9a865d9e7765fb93e9ba5edef1c)
linux: cap mount id to INT_MAX
linux stores mount id as a int32_t, using xor would make it becomes
negative in some cases. As a result, we cap the value to INT_MAX to
prevent getting a negative value from userspace.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D59202
(cherry picked from commit 23626eb9e3d61928358c9c813aa5a17e797ba404)
hyperv: Fix single page invalidation path
A single page invalidation sets addr2 == 0. In the original code, it
falsely flush the whole address in non global pmap. However, the
kernel pmap are all PG_G, which means a single page flush will always be
staled and thus become invalid. As a result, we set parameter based on
their op in a new helper function instead of relying on args. This
affects only on AMD platform as Intel has their PTI implementation.
PR: 291577
Tested by: franco at opnsense.org
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60380
(cherry picked from commit 5b1f1fd624352840cd9666447ff9cdebeaf910d4)
libthr: Fix some bugs in trylock
1. When contester > 2, a release causes kernel set CONTENTION bit but
with no owner. In this case, the userspace should be able to try the
lock instead of fall immediately. We copy this from trylock2.
2. A PI mutex should consult to kernel instead of decided by userspace
itself.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60427
(cherry picked from commit de2c0f157a9cce0b763da9ae97ada870fa4d1824)
devel/svn_load_dirs: deprecate, superseded by svn-vendor.py
Upstream itself documents tools/client-side/svn-vendor.py as the
replacement for svn_load_dirs.pl. devel/subversion no longer bundles
any of tools/client-side/ (dropped in the 1.15.0 rework), so there's
no FreeBSD port shipping the replacement either; anyone who needs it
fetches svn-vendor.py directly from a matching upstream release
tarball.
Co-Authored-By: Claude Sonnet 5 <noreply at anthropic.com>
libthr: Do not rely on UB in counter
counter + 1 > 0 is a undefined behavior and nobody guarantee that it
will be honestly perform by the compiler that counter + 1 will always be
INT_MIN. We switch to INT_MAX check instead to provide a deterministic
result.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60426
(cherry picked from commit 1d21e67e720a08992e81d626cff9d76524a81f22)
uchcom: Set rate to 1 if 0
If userspace provides rate == 0, it causes kernel panic as rate is
directly used as a divident, which cannot be zero. Fix it by set the
rate to 1 if it is passed as 0.
Reviewed by: imp, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59111
(cherry picked from commit 228b1a011660ee1005bc4ab7c97113af8d87fe5c)
dns/register-dnsclient: use mktemp for KRB5CCNAME, destroy ticket on exit, quote vars
KRB5CCNAME was a predictable, fixed path (/tmp/krb5cc_$name), shared by
every invocation and never cleaned up; use mktemp to get a private,
per-run ccache and destroy it via kdestroy in clean_exit. Quote
$KRB5_CLIENT_PRINCIPAL and the tr arguments to avoid word-splitting/glob
expansion and fix the broken backslash-escaped tr "\"[:lower:]\""
quoting, which only worked by accident under sh.
Bump PORTVERSION.
Co-Authored-By: Claude Sonnet 5 <noreply at anthropic.com>
ice: Use the absolute VF number when adding a VSI
The Add VSI AdminQ command requires an absolute hardware VF number, while
vsi->vf_num is relative to its PF. Add the PF's vf_base_id, as the VF Tx
queue context already does.
On an E810 PF with vf_base_id 128, relative VFs 0 and 1 were associated
with hardware VFs 0 and 1 instead of 128 and 129. Their receive queues
became blocked and both native iavf and DPDK receivers dropped traffic.
A PF whose VF base is zero hides the error.
Validated the VSI-to-function mapping and receive traffic on that PF,
including VF reset recovery and local PF/VF forwarding with VSI loopback
enabled.
Fixes: bc761988b724 ("ice: Add host SR-IOV support")
MFC after: 2 weeks
Sponsored by: BBOX.io
ice: Allow VSI loopback in VEB mode
The embedded switch installs local forwarding rules with loopback enabled,
but their source VSI must also permit loopback. Without that permission,
traffic between host-attached VFs can trigger Tx data MDD events instead
of reaching the destination VSI.
Set ICE_AQ_VSI_SW_FLAG_ALLOW_LB when initializing a VSI in VEB mode, matching
the forwarding rules to the VSI permission. Keep MAC anti-spoof checking
enabled.
Validated on E810 with native iavf and DPDK VFs, together with the absolute
VF number correction. Local forwarding and queue/reset recovery passed;
spoofed source MACs were still rejected and isolated.
Fixes: bc761988b724 ("ice: Add host SR-IOV support")
MFC after: 2 weeks
Sponsored by: BBOX.io