Commit graph

23127 commits

Author SHA1 Message Date
Ed Maste
ae2b84d9ab man4: Fix duplicate if_rtw89.4 MLINK
Fixes: 4262dbc579 ("wifi manuals: Mlink + document description consistency")
Sponsored by:	The FreeBSD Foundation
2025-02-28 08:33:14 -05:00
Alexander Ziaee
4262dbc579
wifi manuals: Mlink + document description consistency
Interfaces all have an mlink to if_$foo. Add these for the missing ones
and remove an incorrect one from rtwn_pci. Wireless network drivers are
all accessible via `apropos -s4 "wireless network driver", except two
which are "wireless network device". I actually prefer the latter, but
make them all consistent upon the more common parlance. Tag SPDX on one
of the files I touched, while here.

MFC after:		3 days
Reviewed by:		bz, carlavilla, mhorne
Approved by:		carlavilla, mhorne (mentors)
Differential Revision:	https://reviews.freebsd.org/D49063
2025-02-27 17:20:22 -05:00
Ed Maste
085c0641a2 bsd.mkopt.mk: Avoid warning from makeman
Setting WITHOUT_X where X is a __REQUIRED_OPTION produces a warning.

This occurred during makeman's `make showconfig` invocatation, but the
warning serves no purpose there, and clutters makeman's output.  Skip
the warning for the showconfig target used by makeman.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49123
2025-02-25 08:10:07 -05:00
Christos Margiolis
cfdee707fb snd_uaudio.4: Move non-uaudio-specific BUGS paragraph to pcm.4
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49019
2025-02-25 13:44:43 +02:00
Christos Margiolis
02d4eeabfd sound: Allocate vchans on-demand
Refactor pcm_chnalloc() and merge with parts of vchan_setnew() (now
removed) and dsp_open()’s channel creation into a new dsp_chn_alloc()
function. The function is responsible for either using a free HW channel
(if vchans are disabled), or allocating a new vchan.

Clean up allocated vchans associated with a given dsp_cdevpriv on
dsp_close() instead of leaving them unused.

hw.snd.vchans_enable (previously hw.snd.maxautovchans) and
dev.pcm.X.{play|rec}.vchans now work as tunables to only enable/disable
vchans, as opposed to setting their number and/or (de-)allocating
vchans. Since these sysctls do not trigger any (de-)allocations anymore,
their effect is instantaneous, whereas before we could have frozen the
machine (when trying to allocate new vchans) when setting
dev.pcm.X.{play|rec}.vchans to a very large value.

Create a new "primary" channel sublist so that we do not waste time
looping through all channels in dsp_chn_alloc(), since we are only
looking for a parent channel to either use, or add a new vchan to. This
guarantees a steady traversal speed, as the parent channels are most
likely going to be just a handful (2). What was currently in place was a
loop through the whole channel list, which meant that the traversal
would take longer the more channels were added to that list.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D47917
2025-02-25 13:43:39 +02:00
Alexander Ziaee
b3de609802
style: Recomend SPDX licenses
While here, take this opportunity to update the copyright and clean
some mdoc errors.

MFC after:		3 days
Reviewed by:		carlavilla, mhorne, imp
Approved by:		imp (srcmgr)
Approved by:		carlavilla, mhorne (mentors)
Differential Revision:	https://reviews.freebsd.org/D49051
2025-02-24 22:48:24 -05:00
Alexander Ziaee
5a0d9605a4
bridge.4: Remove incorrect line + polish
In an AMA on Community Discord, it was revealed that simply setting a
bridge to up is not equivelant to setting it as "inet6 auto_linklocal".
Remove the incorrect line, and while here:

+ reset sysctl list width to indent, saving 2/13 lines on MANWIDTH 59/80
+ tag spdx + break two long lines over 80 characters

MFC after:		3 days
Reported by:		Antranig Vartanian <antranigv@freebsd.am>
Reported by:		Jan Bramkamp <crest+freebsd@rlwinm.de>
Reported by:		Niclas <buero28@icloud.com>
Approved by:		mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D48981
2025-02-24 12:30:53 -05:00
Alexander Ziaee
26eeda7bd6
safexel manuals: Improve apropos and HW relnotes
safe.4:
Improve document description (Nd) for apropos. Remove Nm from sysctls
in synopsis. This was causing this page to get pulled into results for
`apropos sysctl`. Instead, use kernel declaration macros like vt(4).
Convert the HARDWARE tagged list to a column list for better rendering
in HW Relnotes. Tested in man(1) at MANWIDTH 59 and 80.

safexcel.4:
Nd: s/security packet/cryptographic offload/ for apropos.
HARDWARE: Create this section for inclusion in the HW relnotes.

SPDX:			both tagged
MFC after:		3 days
MFC to:			13.5
Reported by:		markj (cryptographic offload, Inside Secure)
Reviewed by:		jhb, markj, mhorne
Accepted by:		markj (src), mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D47706
2025-02-24 11:13:38 -05:00
Kristof Provost
3c0a0de20f pf.conf.5: rephrase log() documentation
after some discussion with henning, document the various log options as
one section; some text was altered to make it read better;

ok henning

Obtained from:	OpenBSD, jmc <jmc@openbsd.org>, cea6f9db1f
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-21 09:11:03 +01:00
Kristof Provost
83f9b68fde pf.conf.5: Don't use greater-equal/less-equal symbols where "<="/">=" are intended.
Also, clean up some usage of predefined strings (which are discouraged by
mandoc_char(7) for portability reasons) and improve spacing in
hostapd.conf(5).

ok schwarze@

Obtained from:	OpenBSD, bentley <bentley@openbsd.org>, e369c2e695
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-21 09:11:03 +01:00
Kristof Provost
71cf41071a pf.conf.5: a shot at documenting the changed log(matches) semantics
Obtained from:	OpenBSD, henning <henning@openbsd.org>, eb4e49a617
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-21 09:11:03 +01:00
Kristof Provost
c2346c3d3a pf: support source-hash and random with tables and dynifs, not just pools
This finally allows to use source-hash for dynamic loadbalancing, eg.
"rdr-to <hosts> source-hash", instead of just round-robin and least-states.

An older pre-siphash version of this diff was tested by many people.

OK tedu@ benno@

Obtained from:	OpenBSD, reyk <reyk@openbsd.org>, 252a05523f
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-20 09:25:51 +01:00
Ed Maste
7f8a5c5a15 upgt: Deprecate ancient 802.11b/g driver
Recently-reported bugs in this driver should be fixed, but also the
hardware it supports is obsolete so mark it for deprecation.

PR:		284876
Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49045
2025-02-19 14:57:43 -05:00
Alexander Ziaee
4152ed2b99
style.mdoc: fix list width alignment instructions
MFC after:	3 days
Reported by:	imp
Reviewed by:	mhorne, imp
Approved by:	mhorne (mentor)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1530
2025-02-14 18:27:26 -05:00
Kristof Provost
618a8766b2 pf.conf.5: document how any matches any non-loopback interface
ok benno

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 527559b86a
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-14 18:47:53 +01:00
Kristof Provost
7e7f88001d pf: use time_t for storing time_t values
No change to the underlying type, so no ABI change.

We define __time_t as uint64_t if __LP64__, otherwise uint32_t,
and only define __LP64__ if long is 64 bits.
In other words: __time_t == long.

ok henning@ deraadt@

Obtained from:	OpenBSD, guenther <guenther@openbsd.org>, 6c1b69a0ff
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D48963
2025-02-14 18:47:52 +01:00
Mark Johnston
d2870b8666 queue: Add atomic variants for *_EMPTY
In some places, these macros are used without a lock, under the
assumption that they are naturally atomic.  After commit
34740937f7 ("queue: New debug macros for STAILQ"), this assumption is
false.

Provide *_EMPTY_ATOMIC for such cases.  This lets us include extra debug
checks for the non-atomic case, and gives us a way to explicitly
annotate unlocked checks, which generally deserve extra scrutiny and
might otherwise raise reports from KCSAN.

Reviewed by:	kib, olce (previous version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D48899
2025-02-14 15:45:11 +00:00
Kristof Provost
8b5cee4027 pf.conf.8: document !received-on
ok dlg benno

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 6dcdbd32ff
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-13 13:38:45 +01:00
Kristof Provost
cdf415ecfd pf.conf.5: make it clear that the default implicit 'pass' rule does not create state
make sense to deraadt@, ok/wording tweak from mikeb.

Obtained from:	OpenBSD, sthen <sthen@openbsd.org>, 610eb54470
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-13 13:38:42 +01:00
Alexander Ziaee
c48ca725a8
make_dev.9: Fix mda_cr typo + polish
The make_dev_args_init structure example said mda_cred, however the
correct form is mda_cr according to the reporter and my git grep.
A new document description has been contributed by jhb. While here,
fix grammar and trivial typos (spacing, colons before examples,
trailing delimiter) and spdx.

MFC after:		3 days
Reported by:		jhb (much polish and document description)
Reported by:		Evgenii Ivanov on Community Discord
Reviewed by:		carlavilla, mhorne, jhb, kib
Approved by:		carlavilla, mhorne (mentors)
Differential Revision:	https://reviews.freebsd.org/D48516
2025-02-11 15:47:47 -05:00
Simon J. Gerraty
e9c2838d93 Add newlog.sh and setops.sh to share/mk
jobs.mk makes use of newlog.sh if found.

Set NEWLOG_SH in local.sys.env.mk to save jobs.mk searching for it.

PR:	284390
Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D48737
2025-02-11 09:42:17 -08:00
Minsoo Choo
ca4eddea97 src: Use gnu17 as the default C standard for userland instead of gnu99
Tracking newer versions of C (and C++) permits assuming newer language
features in the base system.  Some C11 extensions are already used in
the base system but implemented on top of GNU C extensions such as
_Alignas and _Static_assert.  In some cases the fallback versions in
cdefs.h are more limited than the native C11 extensions.

Even though C11 is the next major version of C, C17 is chosen instead
since C17 does not add new features to C but merely fixes defects in
C11.  It is also well supported by a wide range of clang (7.0.0+) and
GCC (8.1+) versions.

Along with changing the default, this change also removes explicit
requests for c11 via the CSTD variable in various Makefiles.

Libraries and binaries for ZFS continue to use c99.

PR:		284039 (exp-run)
Reviewed by:	imp, arichardson, emaste
Differential Revision:	https://reviews.freebsd.org/D43237
2025-02-11 09:16:25 -05:00
Kristof Provost
85c333a947 pf.conf.5: fix ≤
pf.conf expects <=, not ≤ (and the same applies to ≥ and >=).
Make sure the man page reflects this.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-11 11:32:22 +01:00
Kristof Provost
4c4a7a8da4 pf.conf.5: fix range for assigned ports managed by the IANA (see RFC 1700).
ok sthen@

Obtained from:	OpenBSD, sobrado <sobrado@openbsd.org>, 908a1da340
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-11 11:32:22 +01:00
Simon J. Gerraty
c8245ceb47 Update dirdeps.mk et al
Update dirdeps.mk and friends to match latest contrib/bmake/mk

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D48855
2025-02-10 14:20:06 -08:00
Ed Maste
5bb9236d27 src.libnames.mk: Apply -L also for privatelibs
For INTERNALLIBS and regular libs we add -L to specify the library path,
which may be needed if a library is in a non-default path but also means
we can link against those libraries when built independently.  Do the
same for privatelibs as well.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48891
2025-02-09 14:00:29 -05:00
Eygene Ryabinkin
c945a7832f Ports committers: add myself
My commit bit was reinstated 2025/01/28 and I am now mentored by yuri.
First time, commit bit was granted to me in 2010 and I was mentored
by garga and erwin.

Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
Approved by: yuri (mentor)
2025-02-09 14:12:28 +03:00
Mark Johnston
f468366ecc mtw.4: Fix a couple of nits
- Only install it when MK_USB is set to "yes", like we do for other USB
  NIC drivers.
- Create a hardlink named if_mtw.4, like we do for other NIC drivers.

PR:		284638
Fixes:		c14b016242 ("mt7601U: Importing if_mtw from OpenBSD")
2025-02-07 19:50:12 +00:00
Adam Scott
602be8e1a8 keymaps: Add Canadian Mulitlingual Standard
Pull Request: https://github.com/freebsd/freebsd-src/pull/1586
2025-02-07 13:43:40 -05:00
Maxim Konovalov
1a88a6b5c3 arch.7: "imagers" not "images"
Partially revert b7f2a457a8 after
discission with bjk@ and imp@.
2025-02-07 04:10:39 +00:00
Mark Johnston
08e638c089 udp: Add a sysctl to modify listening socket FIB inheritance
Introduce the net.inet.udp.bind_all_fibs tunable, set to 1 by default
for compatibility with current behaviour.  When set to 0, all received
datagrams will be dropped unless an inpcb bound to the same FIB exists.

No functional change intended, as the new behaviour is not enabled by
default.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D48664
2025-02-06 14:15:41 +00:00
Mark Johnston
5dc99e9bb9 tcp: Add a sysctl to modify listening socket FIB inheritance
Introduce the net.inet.tcp.bind_all_fibs tunable, set to 1 by default
for compatibility with current behaviour.  When set to 0, all TCP
listening sockets are private to their FIB.  Inbound connection requests
will only succeed if a matching inpcb is bound to the same FIB as the
request.

No functional change intended, as the new behaviour is not enabled by
default.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D48663
2025-02-06 14:14:49 +00:00
John Baldwin
2f02ab8add man9: Delete standalone bus_delayed_attach_children.9
The description in bus_attach_children.9 has more details as well as
additional context.

This reverts commit 8770f17a95.
2025-02-06 09:06:16 -05:00
Ed Maste
8770f17a95 man9: Remove bus_delayed_attach_children MLINK
bus_delayed_attach_children already existed as a standalone page,
causing pkgbase errors due to duplicate METALOG entries.  Delete the
MLINK for now to fix the build.

Fixes: 192d326bcf ("bus_attach_children.9: New manpage for functions operating on children")
Sponsored by:	The FreeBSD Foundation
2025-02-06 08:22:28 -05:00
artembunichev
8d4a464412 tty.4: correct description of header file
PR:	284596
MFC after:	3 days
2025-02-05 23:41:31 +02:00
John Baldwin
36ecb25e61 bus_generic_print_child.9: Document bus_print_domain
While here, cross-reference BUS_PRINT_CHILD (and fix a stale reference
to DEVICE_PRINT_CHILD which doesn't exist) and expand the text
describing the role of the helper functions.

Differential Revision:	https://reviews.freebsd.org/D48373
2025-02-05 14:49:29 -05:00
John Baldwin
4f711f9085 bus_generic_detach.9: Update for new semantics
bus_generic_detach now deletes children after detaching them.

Reviewed by:	ziaee
Differential Revision:	https://reviews.freebsd.org/D48371
2025-02-05 14:48:51 -05:00
John Baldwin
d684390210 bus_generic_attach.9: Remove manpage for deprecated function
Differential Revision:	https://reviews.freebsd.org/D48369
2025-02-05 14:48:16 -05:00
John Baldwin
192d326bcf bus_attach_children.9: New manpage for functions operating on children
This documents bus_attach_children, bus_delayed_attach_children,
bus_detach_children, bus_enumerate_hinted_children, and
bus_identify_children.

Differential Revision:	https://reviews.freebsd.org/D48368
2025-02-05 14:47:38 -05:00
John Baldwin
3f93f96c26 device_delete_child.9: Reference device_detach.9 and BUS_CHILD_DELETED.9
Refer to device_detach(9) for the description of detaching a device.
Note that descendants of the child device are also deleted (though in
theory a proper detach routine should have already deleted these).
Finally, note that BUS_CHILD_DELETED(9) is invoked on each deleted
device.

Differential Revision:	https://reviews.freebsd.org/D48365
2025-02-05 14:46:23 -05:00
John Baldwin
d7fa71dfed device_probe_and_attach.9: Document more device functions
Split out separate descriptions of device_probe and device_attach and
include extra details (such as the effect of a disabled hint during
device_attach).  Reframe device_probe_and_attach as a recommended
wrapper function around device_probe and device_attach.

While here, add a description of device_detach.

Differential Revision:	https://reviews.freebsd.org/D48364
2025-02-05 14:45:41 -05:00
John Baldwin
0e4c4cc491 share/mk: Remove more support for building profiled libraries
- Remove documentation of profiled library support from bsd.README

- Remove rules to create individual .po files.  The rules to generate
  an archive from these files was already removed, so these .po rules
  aren't used.

Reviewed by:	emaste
Fixes:		3750ccefb8 ("Retire MK_PROFILE infrastructure")
Differential Revision:	https://reviews.freebsd.org/D48819
2025-02-05 09:49:11 -05:00
Maxim Konovalov
b7f2a457a8 arch.7: grammar fixes
The "for hysterical raisons" was a nice one, though.

MFC after:	3 days
2025-02-04 20:26:53 +00:00
Ed Maste
46b91601bb arch.7: Update version reference to 13.0
This document is intended to be a reference for supported FreeBSD
versions, so update text to refer to 13.0 and later.

Sponsored by:	The FreeBSD Foundation
2025-02-04 15:16:07 -05:00
Jose Luis Duran
955f974a1a
mk: Add missing escape character
Add a missing escape character that splits a long line to avoid breaking
the builds.

Reported by:	cy
Approved by:	emaste (mentor)
Fixes:	88d448ec81 ("mk: Move vm stack test debug symbols")
MFC after:	1 week
2025-02-04 15:23:25 +00:00
Jose Luis Duran
88d448ec81
mk: Move vm stack test debug symbols
Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by
placing sys/vm/stack test debug symbols under /usr/lib/debug.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48796
2025-02-04 14:47:24 +00:00
Maxim Konovalov
70ccb89db2 build.7: document check-old-libs target
PR:		284546
MFC after:	3 days
2025-02-03 22:13:39 +00:00
Jesper Schmitz Mouridsen
c14b016242 mt7601U: Importing if_mtw from OpenBSD
Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c
from OpenBSD.

PR: 247545
Approved by:	adrian, wireless
Differential Revision: https://reviews.freebsd.org/D45179
2025-02-03 20:20:52 +01:00
Ed Maste
ce6eed2fcc src.conf.5: regen for WITH(OUT)_SSP description update
Fixes: 0742396986 ("src.conf.5: Update xref for SSP description")
Sponsored by:	The FreeBSD Foundation
2025-01-31 22:09:13 -05:00
John Baldwin
f66a407de2 sys: Add cpu_update_pcb hook
This MD function is invoked before dumping register set notes when
writing out a core dump to ensure that the PCB for a given thread is
up to date.  This provides a centralized place to update the PCB with
values of the current thread for each arch rather than doing this work
in each register set's get method.

Discussed with:	jrtc27
Reviewed by:	kib, markj
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D44910
2025-01-31 15:40:29 -05:00