crypto/openssl: update to 3.5.8
This is a security bugfix release. Please see the related merge commit
for more details.
Maintainer note: `quic_ackm.h`'s conflict was resolved by taking
the upstream version of the file verbatim.
Conflicts:
crypto/openssl/include/internal/quic_ackm.h
MFC after: 3 days
Merge commit '248da023ae5ea7292930ac5d715d88b87e2e6f46'
(cherry picked from commit 78e936b2d0b5e6554425009199be31e76bc67c10)
crypto/openssl: update generated content to match 3.5.8 release
This contains 2 new manpages as well as some minor manpage content
changes.
MFC with: 78e936b2d
(cherry picked from commit 0d4d0f3a9f229f9e822b43234b0ff72e7223f19f)
ice: Add led(4) identification support
Expose the firmware-controlled physical port identification LED
through /dev/led/ice*. Use the AdminQ port-identification command to
select blinking mode and restore the netlist-selected original mode
before the interface is stopped.
Sponsored by: BBOX.io
(cherry picked from commit a781965b91ea390f9576ae42c35c842db74aab86)
umtx: use a distribution-fair multiplier for the chain hash
umtxq_hash() multiplies the key by 0x9E370001 and keeps the high bits. That
constant is 0x9E37 * 2^16 + 1, so it degenerates for keys whose spacing carries
trailing zero bits: at a 64 KiB stride it puts 128 of 512 parked waiters onto a
single chain mutex, and at 16 KiB and up it uses only a handful of the 512
chains. Base-system consumers never hit this because libthr places its own wait
words 128 bytes apart, but a Linux-ABI runtime waiting on addresses it allocates
itself lands squarely on the floor. Switch to 0x61C88647, which leaves at most 3
waiters per chain at the same stride; Linux made this exact change in 2016, after
judging the sparse constants "actively bad for hashing".
Approved by: adrian (mentor)
Reviewed by: kib, adrian, emaste
Differential Revision: https://reviews.freebsd.org/D58337
Signed-off-by: Nick Price <nprice at FreeBSD.org>
bxe(4): don't feed a zero page size to ilog2 during ILT init
FreeBSD's bxe hardwires CNIC_SUPPORT() to 0, so bxe_ilt_set_info()
never enters the block that initializes the SRC and TM ILT clients.
Those two clients are left zeroed (page_size 0, flags 0), yet
ecore_ilt_init_page_size() calls ecore_ilt_init_client_psz() for all
four clients unconditionally. For SRC and TM that evaluates
ILOG2(page_size >> 12), i.e. ilog2(0). On an INVARIANTS kernel ilog2()
asserts "ilog argument must be nonzero" and panics the machine the
first time the interface is brought up (bxe_init -> bxe_nic_load ->
bxe_init_hw -> ecore_ilt_init_page_size). On a non-INVARIANTS kernel
it silently programs a bogus page-size register instead.
Restore the else branch that upstream Linux bnx2x carries: when CNIC
is not supported, mark the SRC and TM clients with ILT_CLIENT_SKIP_INIT
and ILT_CLIENT_SKIP_MEM so ecore_ilt_init_client_psz() skips them.
Root-caused from a crash dump on a BCM57810 (device 0x168e): the ILT
clients showed CDU and QM populated and SRC and TM zeroed with no skip
[6 lines not shown]
nanobsd: Remove pandaboard.cfg
Pandaboard (sys/arm/ti/omap4) is removed due to lack of HW.
Remove the pandaboard config file for nanobsd aswell.
Approved by: imp, jlduran, manu(mentor)
Diffrential revision: https://reviews.freebsd.org/D54319
LinuxKPI: 802.11: implement cfg80211_calculate_bitrate()
lkpi_cfg80211_calculate_bitrate_vht() was constantly showing up
in my debug traces as a TODO with rtw89 so I went ahead and implemented
the HT and VHT versions. Realtek seems to limit amsdu sizes based
on the value and ask for it whether needed or not.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
iflib: don't update the admin status in if_media_status()
When _task_fn_admin() is active, it will regularly call
IFDI_UPDATE_ADMIN_STATUS(). So there is no need to do it in
iflib_media_status. This can be fairly expensive on some drivers (long
DELAY busywait loops waiting for a NIC command), and there is no need
to pause a userspace app in this DELAY() if it is happening
asynchronously anyway.
Note the logic to detect if _task_fn_admin() is regularly calling
IFDI_UPDATE_ADMIN_STATUS() was copied from that function.
Reviewed by: erj, kbowling
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54096
gstat: Set errno = 0 before strtoul
The strtoul function sets errno on error, but does not clear it on
success; when using strtoul and checking errno (as one should) for
ERANGE / EINVAL afterwards, it's important to zero errno first.
While here, remove a dead store.
Reviewed by: phk
Fixes: 4fe8c1b67be0 ("Add error and range checking ... ")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59270
inetd: only declare and use the mapped-address netconfig under INET6
In a WITHOUT_INET6 build the only assignment to netid2 is compiled out and
the non-INET6 arm returns early, so netid2 is unconditionally NULL and the
rpcb_set() call guarded by it is dead code. clang does not prove it dead
and reports nbuf2 as uninitialized where it is passed as a const pointer,
No functional change.
MFC after: 1 week
Reported by: clang (-Wuninitialized-const-pointer)
Suggested by: dim
Approved by: ngie (co-mentor)
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D59277
aq(4): arm PHY thermal shutdown only where a sensor exists
aq_fw2x_thermal_arm() reached for a copper PHY register that the fibre
parts do not implement, so arming failed on every init and printed a
warning for a capability the hardware cannot have. Return ENOTSUP when
the firmware does not advertise a temperature sensor, matching
aq_fw2x_get_temp(), and warn only for a genuine failure.
Signed-off-by: Nick Price <nprice at FreeBSD.org>
Accepted-by: adrian
Approved-by: adrian
(cherry picked from commit 6dbf809bafe1421fbf3cdd952748b15437b7c72a)
aq(4): probe the D100 device ID
The D100 device ID was defined and handled by aq_hw_capabilities(), but
had no entry in aq_vendor_info_array[], so the driver never probed it and
the card was left unattached. Add the missing entry; the table lists the
fibre variant last within each group, so it follows D109 rather than
sorting numerically.
Signed-off-by: Nick Price <nprice at FreeBSD.org>
Accepted-by: adrian
Approved-by: adrian
(cherry picked from commit 1a78f5ae3917b770bd958010dae86574b15d97ff)
aq(4): observability controls and sysctl/header hygiene
Fold the driver's observability and infrastructure work.
Make aq_device.h self-contained: it declares struct aq_dev in terms of
iflib, bitstring, socket, and ethernet types but included none of the
headers that define them, compiling only because every includer happened
to pull those first. Include what it uses. No functional change.
Make the debug controls per-instance. The debug and debug_categories
sysctls were registered per device but pointed at file-scope globals, so
writing dev.aq.1.debug also changed dev.aq.0.debug and a card could not
be traced in isolation. Move the level and category mask into struct
aq_dev, reach them through the aq_dev back-pointer in struct aq_hw (wired
up in attach_pre before the first firmware trace and guarded against a
NULL deref), emit through device_printf() so each line carries its unit,
and seed initial values from per-unit device hints so attach can be
traced.
[29 lines not shown]
aq(4): report link transitions and previously silent failures
A link flap left nothing in the log to work from. Both the link up and
link down messages were gated on bootverbose while the message for a
speed change that keeps carrier was not, so a default kernel was silent
about a flap yet loud about a downshift -- the inverse of what an
operator wants. The generic message from if_link_state_change() carries
no speed, so gating the driver's own left the negotiated rate
unrecorded. Report both transitions unconditionally.
Say more than the rate. aq_hw_get_link_state() already negotiates flow
control and throws it away, and Atlantic 2 reports duplex and EEE in the
same link status word the rate comes from; decode them through a new
get_link_info firmware op and name all of it on the up transition. EEE
matters for a flap: low power idle transitions are a common source of
marginal link trouble on multi-gigabit copper, and whether it was active
is otherwise invisible.
Give the down transition a cause. The PHY global fault code was only
[74 lines not shown]
aq(4): mailbox, flow-control and firmware error-handling fixes
Fold the whole-driver-review correctness and hardening fixes for the
firmware and hardware layers.
Advance the firmware-mailbox address per word in aq_hw_fw_downld_dwords():
on B1 silicon each loop iteration waits for the mailbox address register
to differ from the expected address, but it was set once and never moved,
so after the first word every wait returned immediately and read stale
data. Advance it four bytes per word. B0 is unaffected (it polls the
busy bit). The same function also left err set to ETIMEDOUT after
successfully force-recovering the RAM CPU semaphore; the transfer loop is
guarded by "--cnt && !err", so it ran zero iterations and returned a
timeout with an untouched buffer, making the recovery path dead code.
aq_hw_get_mac_permanent() ignored the get_mac_addr() error and then
examined a buffer the firmware op never wrote on failure. A fresh softc
is zero, so the "invalid address" test fired, a random locally
administered MAC was substituted, and err was overwritten with 0 -- a
[48 lines not shown]
aq(4): PHY thermal-shutdown handling and correctness fixes
Fold the thermal-protection work and the correctness fixes that landed
alongside it.
Report and auto-recover from PHY thermal shutdown. The Atlantic PHYs can
autonomously shut down on over-temperature, latching global fault 0x8007
and dropping the link; Atlantic 2 ships this armed, Atlantic 1 disabled.
Arm it on Atlantic 1 at interface init (1E.C478.A via the MAC's MDIO
controller), and recover from a trip automatically: the admin-status poll
detects the fault, logs the shutdown limit and measured temperature, and
holds the link down until the PHY cools, then restores it -- Atlantic 1
needs a PHY reset (1E.2681.0) with the MAC firmware running plus a full
re-init, Atlantic 2 recovers on the re-init alone. New firmware ops
get_phy_fault, phy_reset, thermal_arm, and get_thermal_limit back the
state machine in aq_if_update_admin_status().
Make that Atlantic 1 thermal MDIO path address-correct and fail-safe.
The direct-MDIO helpers hardcoded the Clause-45 port address to 0, but it
[31 lines not shown]
aq(4): interface lifecycle and link-state fixes
aq_if_init() programmed the address captured at attach, so an address set
with "ifconfig ether" or by lagg(4) enslavement was never written to
unicast filter slot 0: the interface transmitted with the new address but
the MAC still filtered on the old one, so it received nothing. Copy the
current if_getlladdr() the way the other iflib drivers do.
The link state could latch UP forever. aq_if_stop() cleared linkup
before calling aq_if_update_admin_status(), which suppressed the
LINK_STATE_DOWN transition the "link was UP" branch would have made.
Announce the down transition directly from aq_if_stop() instead, and do
not poll the admin status there at all: the MAC has just been reset, so a
stale link reading would re-announce the link as up.
The admin task itself had to stop reporting a link on a stopped
interface. iflib runs it while either IFF_DRV_RUNNING or IFF_DRV_OACTIVE
is set, and iflib_stop() sets OACTIVE, so the task kept polling after the
stop and re-announced LINK_STATE_UP behind the driver's back. Treat a
[24 lines not shown]
aq(4): clean up diagnostics and remove dead code
Non-functional cleanup, no change in behavior.
device_printf() already prefixes each line with the device name, so the
inline "atlantic:" token in the status and error messages produced a
doubled prefix and diverged from the trace macros; remove it so all
output carries one uniform "aqN:" prefix. Compile the RX/TX descriptor
tracers only when AQ_CFG_DEBUG_LVL > 2 and make them no-op macros
otherwise, so the default build no longer pays a cross-TU call plus
argument evaluation per descriptor.
Drop enum aq_dev_state, struct aq_rx_filters, and struct aq_vlan_tag,
which have no remaining references now that VLAN state lives in a
bitstr_t. Replace the four identical aq_sysctl_print_{tx,rx}_{head,tail}
handlers, each carrying a dead write path on a read-only oid, with one
aq_sysctl_print_ring_ptr that selects the accessor from arg2. Reduce the
thermal and PHY-recovery comments to single terse lines that keep the
load-bearing register numbers and the A1-vs-A2 recovery difference.
[7 lines not shown]
aq(4): Document the Atlantic 2 (AQC113/114/115/116) devices
List every AQC part aq_vendor_info_array[] probes, each with the
maximum speed aq_hw_capabilities() grants it.
Only the Atlantic 2 parts link at 10 Megabit. The AQC100 and AQC100S
are the only SFP+ controllers; the rest are twisted pair.
Reviewed by: adrian, ziaee
Signed-off-by: Nick Price <nick at spun.io>
Differential Revision: https://reviews.freebsd.org/D58144
(cherry picked from commit 1d89845e90867e2f970c651c342eb07da847b6e9)
aq(4): program the Atlantic 2 multiqueue datapath
Wire up the Atlantic 2 receive datapath: the action-resolver table (ART),
multiqueue RSS, QoS, and interrupt moderation.
RX action-resolver table: Atlantic 2 replaces Atlantic 1's discrete RX
filter registers with an ART -- hardware computes a per-packet
classification tag, then walks {tag, mask, action} rows to drop, assign a
queue, or assign a TC. aq_hw_art_filter_set() installs one row under the
ART semaphore; aq_hw_init_rx_path() enables the resolver, tags L2
unicast/broadcast, installs the unicast/all-multicast and VLAN drop rows,
and assigns every 802.1p priority to TC 0 (mirroring the Atlantic 1
user-priority map, since our RX side is a single 8-ring group in TC 0).
Tag every enabled VLAN filter in the per-filter resolver-tag field -- a
register the BSD ports never write -- because the VLAN drop row matches
resolver tag 0, so without it all tagged receive was dead under VLAN
filtering. Promiscuous mode disables the drop rows rather than toggling
the Atlantic 1 promiscuous bits; all ART callers surface a semaphore
timeout consistently. The Atlantic 1 RX_TCP_RSS_HASH and TPO2
[28 lines not shown]
aq(4): correct Atlantic 2 register access
Four Atlantic 2 register-access corrections found in bring-up.
B0 aggregate octet counters: the B0 firmware statistics interface reports
only aggregate rx/tx good octets, not the per-cast breakdown A0 and
Atlantic 1 provide, so every octet sysctl read a permanent zero while
frame counters advanced. Populate the aggregate octet fields from the B0
buffer; aq_update_hw_stats() accumulates them directly when the per-cast
octets are absent.
Drop the duplicate attach-time MCP reboot: aq_hw_mpi_create() already
reboots the A2 firmware to read its version and caps, then aq_hw_reset()
immediately rebooted it again -- a full MCP restart plus several
transaction-id-bracketed window reads, adding attach latency and a
duplicate banner. Give aq_hw_reset() a reboot flag and pass reboot=false
for A2 at attach; the load-bearing down/stop reboot (which resyncs A2 RX
DMA across ifconfig down/up) keeps reboot=true.
[16 lines not shown]
aq(4): add Atlantic 2 (AQC113) device support
Add support for the Marvell Atlantic 2 (AQC113/114/115/116) controllers,
a new chip generation that is not register-compatible with the Atlantic 1
parts aq(4) supports today. Adapted from the OpenBSD/NetBSD if_aq driver.
Register and device definitions (aq2_hw.h): the firmware handshake
(MIF_BOOT / MCP_HOST_REQ_INT / MIF_HOST_FINISHED), the 0x12000/0x13000
firmware interface windows, and the action-resolver table (ART) that
replaces Atlantic 1's discrete RX filters, plus the Atlantic 2 PCI device
ids and the aq_is_atlantic2() helper. Reserve a chip-feature bit
(AQ_HW_CHIP_ATLANTIC2) and add the aq_hw fields the firmware fills at boot
(ART base index, statistics interface version A0/B0). The per-VLAN-filter
resolver-tag field comes from the Linux driver; the BSD sources never
write it.
Firmware operations (aq_fwa2.c): Atlantic 2 talks to the management CPU
through the 0x12000/0x13000 register windows plus the boot handshake,
rather than Atlantic 1's mailbox in shared RAM. Implement that as a third
[33 lines not shown]
openssh: Fix shosts.equiv path in manual pages
Change the path for the shosts.equiv file to consistently reflect
/etc/ssh/shosts.equiv across all manual pages.
This change stems from 35d4ccfb5576 ("Document FreeBSD defaults and
paths.")
Reviewed by: bcr, emaste
Differential Revision: https://reviews.freebsd.org/D52203
(cherry picked from commit 336cc041a492b03fde96fd89915ae694cf31b551)
ministat.1: Match actual output
Fix a documentation discrepancy, where the implementation was updated to
use uncertainty propagation for the ratio of means, but the example
output in the manual page was left unchanged.
Update the manual page example from 70.7384% to 102.3% to reflect the
actual output.
While here, also update the example in the README.
Reviewed by: ziaee
Fixes: a304ad90e9ae ("Reduce the bogosity of ministat's % difference calculations.")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59157
(cherry picked from commit 595e665cb292a70f9d17b779c8ad0470ff3e3964)
openssh: Fix shosts.equiv path in manual pages
Change the path for the shosts.equiv file to consistently reflect
/etc/ssh/shosts.equiv across all manual pages.
This change stems from 35d4ccfb5576 ("Document FreeBSD defaults and
paths.")
Reviewed by: bcr, emaste
Differential Revision: https://reviews.freebsd.org/D52203
(cherry picked from commit 336cc041a492b03fde96fd89915ae694cf31b551)
ministat.1: Match actual output
Fix a documentation discrepancy, where the implementation was updated to
use uncertainty propagation for the ratio of means, but the example
output in the manual page was left unchanged.
Update the manual page example from 70.7384% to 102.3% to reflect the
actual output.
While here, also update the example in the README.
Reviewed by: ziaee
Fixes: a304ad90e9ae ("Reduce the bogosity of ministat's % difference calculations.")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59157
(cherry picked from commit 595e665cb292a70f9d17b779c8ad0470ff3e3964)