Commit Graph
312484 Commits
Author SHA1 Message Date
Abdelkader Boudih cd7541977e gpioled: defer gpio pin writes to a taskqueue
led(4) invoked the led_t callback with its mutex held, including from the
blink callout, so the callback must not sleep.

PR: 251032

MFC After: 1 week

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D59263
2026-08-29 19:46:23 +01:00
Alexander Motin e5283a9da8 graid3: Add rotation rate support
If all member devices report the same rotation rate, pass it up.
2026-08-29 14:00:02 -04:00
Alexander Motin 2d9c41daac graid: Add rotation rate support
If all member devices report the same rotation rate, pass it up.
2026-08-29 14:00:02 -04:00
Alexander Ziaee f8c6f9f55b vmx.4: Canonicalize SYNOPSIS
MFC after:	3 days
2026-08-29 13:17:35 -04:00
Alexander Ziaee f1da14e0a0 vmx.4: Spinoff HARDWARE + tag SPDX
This section will appear in the Hardware Release Note.

MFC after:	3 days
2026-08-29 13:09:09 -04:00
Fernando Apesteguía edadc3f905 whereis(1): Respect PORTSDIR variable
PORTSDIR is a very common variable that points to the location of a ports
directory. Make whereis(1) respect this variable too.

Reviewed by:	arrowd@, christos@
Approved by:	christos@
Differential Revision:	https://reviews.freebsd.org/D56845
2026-08-29 17:15:43 +02:00
Kevin Bowling 2454371130 e1000: Correct igb(4) DMA coalescing register programming
The disabled path wrote the complement of DMAC_EN to DMACR.  That
set every other field, including reserved bits, the one-shot EXIT_DC
command, watchdog enables, receive threshold, and PCIe Lx selection.

When DMA coalescing was enabled, the requested watchdog and Lx-delay
values were ORed into their reset values rather than replacing the
fields.  PCIEMISC.LX_DECISION was also cleared, preventing
DMACR.DMAC_Lx from controlling PCIe low-power entry.

Disable coalescing by clearing only DMAC_EN and retaining the
documented DMAC_Lx policy and watchdog fields.  On enable, replace the
variable fields under their masks, select DMA requirements for PCIe
low-power entry, and program the loopback and BMC watchdog policies
independently of prior state.

Make igb_init_dmac() the sole owner of this policy, including when
SR-IOV is active, so later IOV initialization cannot overwrite it.
Apply this consistently to I350, I354, and I210 while preserving the
I354-specific timer units.  Leave I210 reserved fields at their
required encodings and do not expose the ineffective control on I211.

Validated on I210 and I350 hardware.  Repeated I210 enable, disable,
and reset cycles preserved the watchdog, Lx, TTLX, and LX_DECISION
fields.  On I350, dmac values of 250, 1000, and 10000 programmed DMACWT
as 0x7, 0x1f, and 0x138, respectively, while retaining a four-tick TTLX
and leaving the reserved and watchdog fields stable.  A real reset
initiated by a sibling function restored the enabled dmac=1000 tuple
and a down interface path restored the disabled tuple.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-29 06:23:00 -07:00
Tai-hwa Liang 46f09c4f09 netstat: filtering out unsupported address families
getifaddrs(3) may return AF_INET6 addresses even when netstat(1)
is built without INET6 support.  Avoid passing these addresses to
process_ifa_addr(), which does not handle AF_INET6 in that case.

This fixes corrupted column width calculations and runaway output
from netstat -i, which could cause periodic daily check output to
generate multi-gigabyte mail messages and exhaust disk space and
memory.

MFC after:	2 weeks
2026-08-29 13:11:41 +00:00
Konstantin Belousov 420428718d tty: gracefully handle proctree_lock locking
Instead of relocking tty to get the proctree_lock and experiencing the
race due to the relock, take the proctree_lock in advance for ioctl
commands that need it.  The affected commands, TIOCNOTTY, TIOCSCTTY,
and TIOCSPGRP, must not be overridden by the specific tty drivers,
so the common handling is cleaner.

Reviewed by:	kevans (previous version), markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59132
2026-08-29 12:43:07 +03:00
Konstantin Belousov 824f934bf9 tty: make tty_wait_background() aware of proctree_lock ownership
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59132
2026-08-29 12:43:00 +03:00
Konstantin Belousov 9bd3fe5712 tty: add tty_wait_proctree(9)
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59132
2026-08-29 12:42:52 +03:00
Konstantin Belousov a15c71254a condvar.9: document cv_wait_sig_unblock(9)
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59132
2026-08-29 12:42:47 +03:00
Konstantin Belousov 0cc6c44296 condvars(9): add cv_wait_sig_unlock()
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59132
2026-08-29 12:42:40 +03:00
Alan Cox b2e6b6545e arm64 pmap: optimize TLB management by pmap_update_entry()
To date, pmap_update_entry() has unconditionally passed false as
final_only to pmap_s1_invalidate_range().  Passing false means that we
invalidate the intermediate "page walk cache" entries in the TLB as well
as the leaf that is being replaced. However, invalidating intermediate
entries is only necessary when doing a superpage promotion that replaces
a pointer to a page table page by a large page mapping.

Reviewed by:	andrew, kib, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D58917
2026-08-29 01:33:22 -05:00
Alexander Ziaee 59b062ee7d vr.4: Canonicalize SYNOPSIS + tag SPDX
While here, remove superflouous Nd quoting.

MFC after:	3 days
2026-08-28 23:23:40 -04:00
Alexander Ziaee fa89ea4d5f vte.4: Canonicalize SYNOPSIS + tag SPDX
MFC after:	3 days
2026-08-28 23:23:33 -04:00
Alexander Ziaee 4f5a44aa19 vtnet.4: Canonicalize SYNOPSIS + tag SPDX
MFC after:	3 days
2026-08-28 23:10:06 -04:00
Alexander Ziaee 5246f1029e vxlan.4: Canonicalize SYNOPSIS + mechanical nits
+ tag SPDX
+ remove superflouous Nd quoting
+ fix AUTHORS email markup

MFC after:	3 days
2026-08-28 22:59:12 -04:00
Alexander Ziaee eddc4e94b7 wbwd.4: Canonicalize SYNOPSIS, HARDWARE + tag SPDX
MFC after:	3 days
2026-08-28 22:48:13 -04:00
Alexander Ziaee d58130d1fd wdatdw.4: Canonicalize SYNOPSIS + tag SPDX
MFC after:	3 days
2026-08-28 22:48:13 -04:00
Alexander Ziaee b7d15db761 wg.4: Canonicalize SYNOPSIS + mechanical nits
While here:
+ tag SPDX
+ remove superflouous Nd quotes
+ add the usual missing blank comment line preceeding file

MFC after:	3 days
2026-08-28 22:48:13 -04:00
Alexander Ziaee 8abab45ee4 bnxt.4: Canonicalize SYNOPSIS
While here, tag SPDX.

MFC after:		3 days
Reviewed by:		kbowling
Differential Revision:	https://reviews.freebsd.org/D59258
2026-08-28 22:48:13 -04:00
Alexander Ziaee e3ab0403df xdma.4: Canonicalize SYNOPSIS
MFC after:	3 days
2026-08-28 22:48:13 -04:00
Alexander Ziaee 7199b614de wmt.4: Canonicalize SYNOPSIS
While here, tag SPDX.

MFC after:	3 days
2026-08-28 22:48:13 -04:00
Kevin Bowling 2f095faebb e1000: Report corrected LAN management FIFO ECC errors
I350 and I354 report a corrected ECC error in the LAN transmit
management FIFO through LANPERRSTS bit 16.  Unlike the parity status in
the same register, this condition neither interrupts nor stops traffic.

Poll the latch with the other corrected error status, increment a
dedicated counter, and clear only its RW1C bit.  Expose it as
dev.igb.N.memory_errors.corrected_lan_mng_fifo.

Fatal error handling returns before the periodic statistics sweep and
may reset the device.  Drain all I350 and I354 corrected-error status in
the admin task before recovery so the reset does not discard pending
indications.

This follows section 6.21.16 of the Intel Atom Processor C2000 Product
Family Integrated GbE Controller Programmer's Reference Manual,
document 537426 revision 1.5.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-28 19:31:22 -07:00
Enji Cooper 19c1fe2d0c crypto/openssl: add manpages missed in related commit
MFC with:	78e936b2d
Fixes:		0d4d0f3a9 ("crypto/openssl: update generated content ...")
Reported by:	Jenkins CI
2026-08-28 19:28:11 -07:00
Kevin Bowling 5b4a7fd937 e1000: Handle I354 internal memory errors
The Atom C2000 integrated GbE programming reference documents the I354
internal memory error architecture.  It shares the I350 PEIND and
ICR.FER routing, DMA and packet-buffer status, LAN parity status, and
required reset recovery.

Extend the existing I350 recovery and corrected error accounting paths
to I354.  Keep the PCIe corrected error mask family-specific.  C2000
PCIEECCSTS ends at the transmit write-data indication in bit 4 and does
not implement the I350 retry buffer indication in bit 5.  Do not expose
the corresponding retry counter on I354.

The PRM overview says a PCIe region failure requires a system reboot,
while the individual PCIEERRSTS fields prescribe CTRL.RST followed by
port reinitialization.  Use the register specific recovery, matching the
existing I350 path; failed reinitialization still leaves the port down.

This follows sections 5.6 and 6.21 of the Intel Atom Processor C2000
Product Family Integrated GbE Controller Programmer's Reference Manual,
document 537426 revision 1.5.

MFC after:	2 weeks
Sponsored by:	BBOX.io
2026-08-28 19:01:59 -07:00
Enji Cooper 0d4d0f3a9f 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
2026-08-28 18:41:30 -07:00
Enji Cooper 78e936b2d0 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'
2026-08-28 18:28:12 -07:00
Enji Cooper 248da023ae crypto/openssl: remove large test input file
This file was added between 3.5.7 and 3.5.8. Given that we don't yet leverage
the OpenSSL tests, there's no sense in merging this file to mainline branches..
2026-08-28 18:21:30 -07:00
Alexander Motin 7dc4284615 gstripe: Increase children I/O sizes
Originally gstripe created a separate child I/O for every accessed
stripe, making it very inefficient for small stripe sizes.  Later
introduced "fast" mode reduced that count for read/write requests
by copying the data to/from temporary contiguous buffers, wasting
memory bandwidth and CPU time.  This commit implements alternative
method, utilizing unmapped I/O mechanism to assemble children I/Os
from pages of the original I/O, avoiding any copying.  This method
though has some limitations, such as stripe size can not be smaller
than CPU page size, or buffer and offset page phases should match
(may be page aligned, but not necessarily).  But those limitations
are not an issue in many cases, since ZFS, for example, can often
align its buffers (BTW, dd doesn't).  Plus, unlike "fast" method,
this one can receive (and even prefers) unmapped I/Os.

While there, re-implement also BIO_DELETE.  Since they don't have
any data, there is no any reason to create more than one child I/O
per disk.  It also dramatically improves performance there.

And for dessert, add rotation rate attribute support, reporting one
if all the children report the same. ZFS is using it more and more.
2026-08-28 20:32:15 -04:00
Alexander Ziaee 7ac9459426 wpi.4: Canonicalize SYNOPSIS
MFC after:	3 days
2026-08-28 16:23:27 -04:00
Alexander Ziaee 58f13a881f ntpdate: Add a deprecation notice to syslog
Suggested by:		cy, emaste
Reviewed by:		cy
Differential Revision:	https://reviews.freebsd.org/D55929
2026-08-28 15:50:01 -04:00
Alexander Ziaee 59f363d0c2 nvme.4: Canonicalize LOADER TUNABLES
Improve style for consistency with the rest of the manual
and add the tunables to the search database.

MFC after:		3 days
Reviewed by:		seuros
Differential Revision:	https://reviews.freebsd.org/D59165
2026-08-28 15:01:05 -04:00
Alexander Ziaee 8f6987731f xen.4: Canonicalize SYNOPSIS
Move the prose about support that was here to the second sentence of
DESCRIPTION. Remove the note about i386 since i386 is dead in 15.0.
The rest of the manual still contains details about i386 and could
use some TLC by a Xen user.

MFC after:	3 days (to 15 only)
2026-08-28 13:51:49 -04:00
Alexander Ziaee e959ad03a2 xl.4: Canonicalize SYNOPSIS
While here, remove Nd overquoting.

MFC after:	3 days
2026-08-28 13:51:49 -04:00
Alexander Ziaee a6ad4a8ad7 xnb.4: Canonicalize SYNOPSIS
While here, tag SPDX and remove Nd overquoting.

MFC after:	3 days
2026-08-28 13:51:49 -04:00
Oskar Holmlund a9fd65d511 TI AM335x: update clock names
Due to upstream has changed to use clock-output-names we need
to update the names in our code aswell.

Approved by: imp(earlier revison), manu(mentor)
Tested by: Rick Richard
Differential revision: https://reviews.freebsd.org/D46713
2026-08-28 19:50:05 +02:00
Alexander Ziaee f542fe4430 ix.4: Canonicalize SYNOPSIS
While here, fix markup on one of the items.

MFC after:	3 days
2026-08-28 13:19:45 -04:00
Alexander Ziaee 48027536c9 zyd.4: Canonicalize SYNOPSIS and HARDWARE
MFC after:	3 days
2026-08-28 13:04:49 -04:00
Oskar Holmlund 541aa93794 TI AM335x: Remove clock_common.*
These helper function will not be needed anymore
because the way that clocks are parsed from the DTS is reworked.

Approved by: imp, manu(mentor)
Tested by: Rick Richard
Differential revision: https://reviews.freebsd.org/D46712
2026-08-28 18:34:55 +02:00
Christian Weisgerber da8b3e70ab stty(1): list DISCARD control character 2026-08-28 16:15:25 +00:00
Ahmad Khalifa ad9b4cc631 update email address in my copyright notices 2026-08-28 17:30:18 +03:00
Bojan Novković bf05236727 pf: Send syncookies from the receiving thread
pf sends outbound packets by offloading them to a single per-vnet SWI handler
through the `V_pf_sendqueue` mbuf queue. A large DDoS attack may overwhelm
that per-vnet queue with syncookie packets and cause contention in the SWI
handler that negatively affects other pf operations.

Fix this by sending the initial syncookie challenge from the context
of the receiving thread. This avoids the syncookie-induced contention on
the `pf_intr` mbuf queue.

Sponsored by:	Klara, Inc.
Sponsored by:	Entersekt
MFC after:	3 weeks
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D59068
2026-08-28 15:56:26 +02:00
Konstantin Belousov ddf62c83fc sys/tests/kern/pdopenpid: pdopenpid(2) is allowed in cap mode
Adjust test to check for ECAPMODE using grandchild instead of child.
Childrens can be opened even in cap mode.  Add test for the later.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58989
2026-08-28 14:55:11 +03:00
Konstantin Belousov 1ac08a43cf pdfork.2: document cap mode, namely pdopenpid(2) and pdptrace(2) errors
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58989
2026-08-28 14:55:11 +03:00
Konstantin Belousov 1d20ebb7bf Regen 2026-08-28 14:55:11 +03:00
Konstantin Belousov 73c92a978c pdopenpid(2): allow in capability mode with restrictions
The pdopenpid() syscall is allowed to open processes which are either
direct children of the caller, or are debuggees already attached to the
calling process. This is reasonable because we could have controlled the
child on fork anyway.

The procdesc-less debuggee can legitimately appear due to ptrace
FOLLOW-FORK mode.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58989
2026-08-28 14:55:11 +03:00
Konstantin Belousov 7006cb7bd2 pdptrace(2): allow debugging in capability mode
The pdopenpid(2) syscall is allowed in capability mode. Add the chicken
switch security.bsd.ptrace_in_cap_mode, which disables it without
reboot, if needed.

The descriptor passed to pdptrace(2) must have the CAP_PTRACE
capability enabled. This capability is not enabled by default by
pdfork()/pdopenpid(), and the calls do not return a procdesc suitable
for debugging. The opening code must prepare for debugging in advance by
passing the PD_PTRACE_CAP flag to pdfork()/pdopenpid().

For ptrace(2), allow PT_CLEARSTEP and PT_GET_CHILDREN for the current
thread and process in cap mode as well.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58989
2026-08-28 14:55:11 +03:00
Konstantin Belousov 68d4b31127 kern: add p_canopen()
The function defines the policy for allowing to open a pid.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D58989
2026-08-28 14:55:10 +03:00