Commit Graph

22758 Commits

Author SHA1 Message Date
Konstantin Belousov
91da6becae pthread_sigqueue(3): document
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44867
2024-04-23 19:51:25 +03:00
Mitchell Horne
c5989febcc ieee80211_vap(9): fix the title
MFC after:	3 days
2024-04-23 13:00:28 -03:00
Christopher Davidson
96a2e036b7 Update manual page references and macros to align to mandoc syntax
xlocale.3: Comment out reference to atof_l(3), atoi_l(3), atol_l(3), atoll_l(3)
  These manual page references do not exist.

lagg.4: Change the reference for /etc/rc.conf from a reference link
  .Xr -> .Pa based on the context within the manual page it is used.

buf.9: Remove .Xr entries from the file
  The buf.9 manual page contains a commented out .Xr reference.
  The <filmmein> 9 entry is a placeholder and has been removed for
  clarity.

Reviewed by:	mhorne
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1114
2024-04-23 12:50:54 -03:00
Ed Maste
4329887454 src.conf: regen after 91d35fb663, WITHOUT_CAPSICUM removal
Sponsored by:	The FreeBSD Foundation
2024-04-23 08:48:18 -04:00
Ed Maste
91d35fb663 Remove WITHOUT_CAPSICUM build support
Capsicum is non-optional as of c24c117b96 ("Remove
WITHOUT_{CAPSICUM,CASPER} options").

`#ifndef WITHOUT_CAPSICUM` is left in the source for the benefit of
downstream consumers, but is never defined in FreeBSD.

Reviewed by:	oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D42077
2024-04-23 08:26:28 -04:00
Lexi Winter
05a95d19cb alc(4): disable MSI-X by default on Killer cards
Several users with alc(4)-based "Killer" Ethernet cards have reported
issues with this driver not passing traffic, which are solved by
disabling MSI-X using the provided tunable.

To work around this issue, disable MSI-X by default on this card.

This is done by having msix_disable default to 2, which means
"auto-detect".  The user can still override this to either 0 or 1 as
desired.

Since these are slow (1Gbps) Ethernet ICs used in low-end systems, it's
unlikely this will cause any practical performance issues; on the other
hand, the card not working by default likely causes issues for many new
FreeBSD users who find their network port doesn't work and have no idea
why.

PR:		230807
MFC after:	1 week

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1185
2024-04-22 22:36:35 -06:00
Lexi Winter
c3dd71ab4c share/examples: move examples into appropriate packages
Allow a new variable SE_xxxPACKAGE to be used to place an example group
into a package.

Move the following examples into existing appropriate packages:

- bhyve examples into FreeBSD-bhyve
- bootforth examples into FreeBSD-bootloader
- csh examples into FreeBSD-csh
- ipfw examples into FreeBSD-ipfw
- jail examples into FreeBSD-jail
- pf examples into FreeBSD-pf
- ppp examples into FreeBSD-ppp
- printing examples into FreeBSD-lp
- uefisign examples into FreeBSD-efi-tools
- ypldap examples into FreeBSD-yp
- hast examples into FreeBSD-hast

Move all other examples into the new 'FreeBSD-examples' package.

This removes a significant number of files from the FreeBSD-utilities
package.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1176
2024-04-22 22:36:35 -06:00
Brooks Davis
e5700dab1e src.conf.5: rebuild after WITH_NVME changes
WITH_NVME is no longer marked broken on armv7, riscv64, or powerpc.

Fixes:		2fda3ab0ac WITH_NVME: Remove from broken.
Differential Revision:	https://reviews.freebsd.org/D44850
2024-04-22 21:28:27 +01:00
Enji Cooper
b571bcea54 bsd.subdir.mk: improve SUBDIR.${MK_FOO} advice
- Remove superfluous whitespace by removing trailing whitespace
  before `\` (line continuation character)
- Quote `SUBDIR.` to clarify the fact that this is a variable
  reference--not the end of a sentence.
2024-04-21 09:30:09 -07:00
Mark Johnston
bf454ca88b wg: Add netmap support
When in netmap (emulated) mode, wireguard interfaces prepend or strip a
dummy ethernet header when interfacing with netmap.  The netmap
application thus sees unencrypted, de-encapsulated frames with a fixed
header.

In this mode, netmap hooks the if_input and if_transmit routines of the
ifnet.  Packets from the host TX ring are handled by wg_if_input(),
which simply hands them to the netisr layer; packets which would
otherwise be tunneled are intercepted in wg_output() and placed in the
host RX ring.

The "physical" TX ring is processed by wg_transmit(), which behaves
identically to wg_output() when netmap is not enabled, and packets
appear in the "physical" RX ring by hooking wg_deliver_in().

Reviewed by:	vmaffione
MFC after:	1 month
Sponsored by:	Klara, Inc.
Sponsored by:	Zenarmor
Differential Revision:	https://reviews.freebsd.org/D43460
2024-04-20 12:04:42 -04:00
Denis Bodor
54e231b373 Add support for i2c-tiny-usb: usb to iic bridge
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
2024-04-19 16:40:23 -06:00
Simon J. Gerraty
f697b9d03d Update sys.dirdeps.mk set default DEP_*
Even at level 0 it is handy to default DEP_*
used by Makefile.depend* to aid the first include if
in a leaf dir.

Reviewed by: stevek
2024-04-18 14:07:24 -07:00
Mateusz Piotrowski
806bd5e006 organization.dot: Fix typos
MFC after:	3 days
2024-04-18 22:02:55 +02:00
Dimitry Andric
2fd73b7126 share/mk/bsd.cpu.mk: add F16C feature for i386 and amd64 architectures
As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.

Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the __F16C__ define.

PR:		278417
Reviewed by:	brooks, emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44848
2024-04-18 20:42:21 +02:00
Mitchell Horne
f115e03a47 intro(7): add link to new networking(7)
It improves the discoverability of the page.

Sponsored by:	The FreeBSD Foundation
2024-04-18 14:58:33 -03:00
Alexander Ziaee
9dfe484e12 hier.7: polish entry to system manual
Entries reworded to improve grammar or add keywords:
- document description: substitute layout for index for first-glance
- /etc/freebsd/update.conf
- /usr/share/vi/

Entries that have been wordshuffled for brevity or consistency:
- /{bin,libexec,nonexistent,sbin,tmp}/
- /boot/dtb/overlays/
- /boot/{defaults,efi,kernel,lua}/
- /usr/libexec/
- /var/{db,games,lib,log/{bsdisks.log,spool/,tmp/}}
- /usr/share/sysroot/VERSION/MACHINE.MACHINE_ARCH/ (unfold a little)
- /usr/local/share/doc/freebsd/ (unfold a little)

Entries that have macro or linking adjustments:
- /{boot,boot/efi,dev,etc,home,sbin,usr/bin}/ (overview or intro pages)
- /media/ (bsdisks is from ports, but afaik pulled by every desktop)
- /usr/share/{lib/,lib/dtrace/,libdata/games/,man/}/ (intro pages)
- /var/log/messages (syslog(3) -> syslogd(8))

Entries that have been added:
- /dev/{cuaU0,vmm,zvol}/
- /usr/share/{atf,bhyve}/
- /usr/share/libexec/hyperv/ (thanks @rtprio)
- /local/<subdirectories>/
- /var/log/debug.log (thanks @pauamma)
- /var/spool/{lock,lpd}

Please forgive my earlier mistakes fixed in this commit:
- /{dev,/usr/share/{calendar,misc}} : accidentally reverted description
- /etc/local-unbound.conf/ (wrong link)
- /usr/{freebsd-dist,lib32,libdata},/var/log/{dmesg.today,lpd-errs} (typos)
- /{usr/libdata/gcc/,var/log/bsdisks.log} (removed, unnecessary)

PR:		261349
Reviewed by:	mhorne
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1131
2024-04-18 14:54:29 -03:00
Alexander Ziaee
75eda0096b networking.7 : create network quickstart guide
Now that the handbook has been moved to ports, I think it's very nice to
have a network quickstart guide in-band, in base, in the system manual.
If the user uses any of the following terms "man -k
{network,networking,wifi,quickstart}" this page will come up, which is I
think a very common use case for new users.

Currently, this document explains connecting to a basic Ethernet
network, a basic wifi network, scanning for wifi networks, and airplane
mode, as well as linking to other sections, including the handbook

Co-authored-by: Graham Perrin <grahamperrin@gmail.com>
Reviewed by: imp, bcr, freebsd@igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/833
2024-04-17 09:56:44 -06:00
Warner Losh
2fda3ab0ac WITH_NVME: Remove from broken.
NVME works everywhere, so we can eliminate this. We may remove the
option altogether.

Sponsored by:		Netflix
Discussed with:		ken, jhb
2024-04-16 21:30:19 -06:00
Lexi Winter
3075939da4 src.libnames.mk: fix LIBPFCTL definition
Following the convention used in the rest of this file, ${LIBPFCTLDIR}
should refer to the directory, and ${LIBPFCTL} to the library itself.

Instead, both values were assigned to ${LIBPFCTL}, and ${LIBPFCTLDIR} was
not set at all.

This appears to be a simple typo and not a deliberate choice, so fix it
by assigning the directory name to ${LIBPFCTLDIR} instead.
2024-04-15 23:27:05 +02:00
Alexander Ziaee
e7ff917057 style.mdoc.5: maintenence
- description: increase visibility by s/file/manual page/
- examples: s/No Doing Something/Doing Something/
- examples: remove depreciated .Li macro
- examples: remove extra newline (one display block)
- see also: link roff language reference for mandoc

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1130
2024-04-12 16:29:25 -06:00
Alexander Ziaee
cc0af6d5a6 intro.1: 2024 edition
Modernize intro.1, attempting to preserve style and brevity,
including a paragraph about installing more commands, a FILES
section explaining where the commands are located and why, and
adding section number to HISTORY for clarity.

Advances: #248562
Reviewed by: imp, mhrone
Pull Request: https://github.com/freebsd/freebsd-src/pull/1136
2024-04-12 10:58:36 -06:00
Christos Margiolis
44e128fe9d sound: Implement asynchronous device detach
Hot-unplugging a sound device, such as a USB sound card, whilst being
consumed by an application, results in an infinite loop until either the
application closes the device's file descriptor, or the channel
automatically times out after hw.snd.timeout seconds. In the case of a
detach however, the timeout approach is still not ideal, since we want
all resources to be released immediatelly, without waiting for N seconds
until we can use the bus again.

The timeout mechanism works by calling chn_sleep() in chn_read() and
chn_write() (see pcm/channel.c) in order to send the thread to sleep,
using cv_timedwait_sig(). Since chn_sleep() sets the CHN_F_SLEEPING flag
while waiting for cv_timedwait_sig() to return, we can test this flag in
pcm_unregister() (called during detach) and wakeup the sleeping
thread(s) to immediately kill the channel(s) being consumed.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
PR:		194727
Reviewed by:	dev_submerge.ch, bapt, markj
Differential Revision:	https://reviews.freebsd.org/D43545
2024-04-11 20:06:50 +02:00
Christos Margiolis
e8c0d15a64 sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)
Currently the snd_clone framework creates device nodes on-demand for
every channel, through the dsp_clone() callback, and is responsible for
routing audio to the appropriate channel(s). This patch gets rid of the
whole snd_clone framework (including any related sysctls) and instead
uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and
audio routing. This results in a significant reduction in code size as
well as complexity.

Behavior that is preserved:

- hw.snd.basename_clone.
- Exclusive access of an audio device (i.e VCHANs disabled).
- Multiple processes can read from/write to the device.
- A device can only be opened as many times as the maximum allowed
  channel number (see SND_MAXHWCHAN in pcm/sound.h).
- OSSv4 compatibility aliases are preserved.

Behavior changes:

Only one /dev/dspX device node is created (on attach) for each audio
device, as opposed to the current /dev/dspX.Y devices created by
snd_clone. According to the sound(4) man page, devices are not meant to
be opened through /dev/dspX.Y anyway, so it is best if we do not create
device nodes for them in the first place. As a result of this, modify
dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of
/dev/dspX.Y.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
Reviewed by:	dev_submerge.ch, bapt, markj
Differential Revision:	https://reviews.freebsd.org/D44411
2024-04-11 20:06:30 +02:00
Mark Johnston
54416d2d78 src.conf.5: Regenerate 2024-04-10 11:17:56 -04:00
John Baldwin
16e846fa1e sys: Enable NVMe drivers on all architectures
The NVMe drivers are portable and are already included statically in
GENERIC on other architectures such as aarch64 and riscv64.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44690
2024-04-09 15:02:58 -07:00
Lexi Winter
493908c4b4 periodic/daily/801.trim-zfs: Add a daily zfs trim script
As mentioned in zpoolprops(7), on some SSDs, it may not be desirable to
use ZFS autotrim because a large number of trim requests can degrade
disk performance; instead, the pool should be manually trimmed at
regular intervals.

Add a new daily periodic script for this purpose, 801.trim-zfs.  If
enabled (daily_trim_zfs_enable=YES; the default is NO), it will run a
'zpool trim' operation on all online pools, or on the pools listed in
'daily_trim_zfs_pools'.

The trim is not started if the pool is degraded (which matches the
behaviour of the existing 800.scrub-zfs script) or if a trim is already
running on that pool.  Having autotrim enabled does not inhibit the
periodic trim; it's sometimes desirable to run periodic trims even with
autotrim enabled, because autotrim can elide trims for very small
regions.

PR:		275965
MFC after:	1 week
Reviewed by:	imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/956
2024-04-09 15:55:11 -06:00
Stephen J. Kiernan
22ca6db50f config.mk: Add MK_VIMAGE knob
Default to VIMAGE as yes.
Add VIMAGE to __DEFAULT_DEPENDENT_OPTIONS (to define VIMAGE_SUPPORT)

Only output VIMAGE to opt_global.h when VIMAGE support is wanted.

Obtained from:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39636
2024-04-09 13:05:56 -04:00
Dag-Erling Smørgrav
7f479dee48 sys/queue.h: Add {LIST,TAILQ}_REPLACE().
MFC after:	1 week
Obtained from:	NetBSD
Sponsored by:	Klara, Inc.
Reviewed by:	cperciva, imp
Differential Revision:	https://reviews.freebsd.org/D44679
2024-04-08 20:16:46 +02:00
Gleb Smirnoff
e943eceb92 ng_bridge: document the limitation brought in f961caf218 2024-04-08 10:48:22 -07:00
David Marker
86a6393a7d ng_bridge: allow to automatically assign numbers to new hooks
This will allow a userland machinery that orchestrates a bridge (e.g. a
jail or vm manager) to not double the number allocation logic.  See bug
278130 for longer description and examples.

Reviewed by:		glebius, afedorov
Differential Revision:	https://reviews.freebsd.org/D44615
PR:			278130
2024-04-08 10:48:22 -07:00
Mark Johnston
fd56d24725 tarfs.5: Provide some guidance on zstd frame sizes
Reviewed by:	des, emaste
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44636
2024-04-05 11:43:58 -04:00
Mark Johnston
663a704a58 VOP_BMAP.9: Typo
MFC after:	1 week
Sponsored by:	Klara, Inc.
2024-04-05 11:14:28 -04:00
Juraj Lutter
bb4e55242e Add OpenBSD 7.5 to bsd-family-tree
Summary: Add OpenBSD 7.5 to bsd-family-tree

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D44643
2024-04-05 15:33:48 +02:00
Christos Margiolis
c0d8f58629 Revert "sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)"
This reverts commit dc831e93ba.

After several reports in the mailing lists, this commit breaks
pulseaudio. Revert until the issue is resolved.
2024-04-05 12:33:41 +02:00
Christos Margiolis
365067e98e Revert "sound: Implement asynchronous device detach"
This reverts commit 9eff58c6d5.

We are reverting dc831e93ba ("sound: Get rid of snd_clone and use
DEVFS_CDEVPRIV(9)"), so revert this commit as well since it depends
dc831e93ba.
2024-04-05 12:33:23 +02:00
Mark Johnston
d1801babad tarfs.5: Document the importance of zstd framing
Reviewed by:	des, kib
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44628
2024-04-04 10:54:25 -04:00
Christopher Davidson
81727a3dd3 bhnd_erom.9: remove self-reference
Change .Xr to .Fn, which quiets a mandoc warning.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135
2024-04-03 13:56:11 -03:00
Christopher Davidson
f9ea7b6e82 device_add_child.9: remove self-reference
Change .Xr to .Nm, which quiets a mandoc warning

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135
2024-04-03 13:56:07 -03:00
Christopher Davidson
f8ce29b631 cfumass.4: remove self-reference
Change .Xr to .Nm, which quiets a mandoc warning.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135
2024-04-03 13:56:03 -03:00
David E. O'Brien
6e77fccf34 SYSCTL_ADD_CONST_STRING(9): HISTORY
Add information of where one may use this API.
2024-04-02 23:25:39 -07:00
David E. O'Brien
fde4074640 Add SYSCTL_ADD_CONST_STRING(9)
Catch up with 10a1e981d (2019-03-19) so that one can do
'man SYSCTL_ADD_CONST_STRING' and not get
"No manual entry for SYSCTL_ADD_CONST_STRING".

Reviewed by: sjg
2024-04-02 23:19:49 -07:00
Maxim Konovalov
ad5ec5136b bsd-family-tree: remove EoL whitespace 2024-03-31 18:36:03 +00:00
Maxim Konovalov
07b17a1692 bsd-family-tree: add NetBSD 10.0 2024-03-31 18:35:02 +00:00
Christos Margiolis
9eff58c6d5 sound: Implement asynchronous device detach
Hot-unplugging a sound device, such as a USB sound card, whilst being
consumed by an application, results in an infinite loop until either the
application closes the device's file descriptor, or the channel
automatically times out after hw.snd.timeout seconds. In the case of a
detach however, the timeout approach is still not ideal, since we want
all resources to be released immediatelly, without waiting for N seconds
until we can use the bus again.

The timeout mechanism works by calling chn_sleep() in chn_read() and
chn_write() (see pcm/channel.c) in order to send the thread to sleep,
using cv_timedwait_sig(). Since chn_sleep() sets the CHN_F_SLEEPING flag
while waiting for cv_timedwait_sig() to return, we can test this flag in
pcm_unregister() (called during detach) and wakeup the sleeping
thread(s) to immediately kill the channel(s) being consumed.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
PR:		194727, 278055, 202275, 220949, 272286
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D43545
2024-03-31 22:13:43 +08:00
Christos Margiolis
dc831e93ba sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)
Currently the snd_clone framework creates device nodes on-demand for
every channel, through the dsp_clone() callback, and is responsible for
routing audio to the appropriate channel(s). This patch gets rid of the
whole snd_clone framework (including any related sysctls) and instead
uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and
audio routing. This results in a significant reduction in code size as
well as complexity.

Behavior that is preserved:

- hw.snd.basename_clone.
- Exclusive access of an audio device (i.e VCHANs disabled).
- Multiple processes can read from/write to the device.
- A device can only be opened as many times as the maximum allowed
  channel number (see SND_MAXHWCHAN in pcm/sound.h).
- OSSv4 compatibility aliases are preserved.

Behavior changes:

Only one /dev/dspX device node is created (on attach) for each audio
device, as opposed to the current /dev/dspX.Y devices created by
snd_clone. According to the sound(4) man page, devices are not meant to
be opened through /dev/dspX.Y anyway, so it is best if we do not create
device nodes for them in the first place. As a result of this, modify
dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of
/dev/dspX.Y.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D44411
2024-03-31 13:20:17 +08:00
Christos Margiolis
d46a6a77e8 pcm.4: Showcase default device change using mixer(8)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44556
2024-03-29 23:59:55 +08:00
Stephen J. Kiernan
3abd36c68f sys.mk: Define HOST_CC as CC by default.
This allows for setting a different compiler for building hostprogs
when cross compiling.

Obtained from:	Juniper Networks, Inc.
Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D44536
2024-03-27 18:21:50 -04:00
Dag-Erling Smørgrav
d9a9f23d0b diff: Integrate libdiff from OpenBSD GoT.
This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.

Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.

The libdiff implementation currently only supports a subset of input and
output options supported by diff.  When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.

Based on work originally done by thj@ with contributions from kevans@.

Sponsored by:	Klara, Inc.
Reviewed by:	thj
Differential Revision:	https://reviews.freebsd.org/D44302
2024-03-27 11:03:33 +01:00
Ka Ho Ng
04b90ac0f9 epoch(9): Remove the under-development note
There has not been planned changes so far to the interface. Remove the
section as it may not be relevant anymore.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius
Differential Revision:	https://reviews.freebsd.org/D44501
2024-03-26 10:38:41 -04:00
Gordon Bergling
8a56ef8d75 mem.4: Correct the HISTORY section
The history section (added in CSRG) claimed both first appeared in v6.
Looking at the manuals in the TUHS archive, /dev/mem was in v1
and /dev/kmem was introduced in v5.

Reviewed by:	imp
Obtained from:	OpenBSD
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D44486
2024-03-24 06:10:39 +01:00
Gordon Bergling
619e6f1f92 cxgbe.4: Remove double word
- s/of of/of/

MFC after:	3 days
2024-03-23 18:01:47 +01:00
Gordon Bergling
2c3466172a intr_event.9: Remove double word
- s/of of/of/

MFC after:	3 days
2024-03-23 17:57:37 +01:00
Antoine Brodin
a200093c21 share/man/man9/Makefile: fix buildworld 2024-03-23 07:17:59 +00:00
Konstantin Belousov
88f2c58d1a cdevpriv(9): document devfs_foreach_cdevpriv()
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-03-23 08:59:00 +02:00
Gleb Smirnoff
a77605a8d9 man9: mlink for counter_ratecheck(9) 2024-03-22 14:36:54 -07:00
Ed Maste
537bdafbc2 rights.4: add note about rights not being simple bitmasks
PR:		277057
Reviewed by:	oshogbo, asomers
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44473
2024-03-22 10:02:31 -04:00
Bojan Novković
c21bc6f3c2 ddb: Add CTF-based pretty printing
Add basic CTF support and a CTF-powered pretty-printer to ddb.

The db_ctf.* files expose a basic interface for fetching type
data for ELF symbols, interacting with the CTF string table,
and translating type identifiers to type data.

The db_pprint.c file uses those interfaces to implement
a pretty-printer for all kernel ELF symbols.
The pretty-printer works with symbol names and arbitrary addresses:
pprint struct thread 0xffffffff8194ad90

Pretty-printing currently only works after the root filesystem
gets mounted because the CTF info is not available during
early boot.

Differential Revision:	https://reviews.freebsd.org/D37899
Approved by: markj (mentor)
2024-03-22 04:03:33 +01:00
Christopher Davidson
3f72f36cf2 assert.3: Update manual page based on mandoc -Tlint
Execute the mandoc -Tlint option on assert(3). This results in two areas
of updates:

Remove invalid Rs block
Remove invalid Re block

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1132
2024-03-21 15:24:02 -03:00
Mitchell Horne
5d956e11ed KASSERT(9): describe history of MPASS
The macro originates from BSD/OS, with a different etymology than what
is presented. Add a brief HISTORY section to capture this.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44439
2024-03-21 12:24:35 -03:00
Mitchell Horne
83a426d13a KASSERT(9): add assertion message guidelines
Add some text describing how to create useful assertion messages.
Improve and add to the EXAMPLES.

See the discussion prompting this on -hackers:
https://mail-archive.freebsd.org/cgi/mid.cgi?57o4rnnq-013s-3nsn-59n5-4ssn1pq81s94

Reviewed by:	emaste
Discussed with:	imp, bz
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44434
2024-03-21 12:24:16 -03:00
Mitchell Horne
cc1268a926 BSD.usr.dist: remove empty /usr/libdata/gcc directory
I am unsure of its exact historical usage, but, we no longer ship GCC
with FreeBSD, and it should have been removed.

Reviewed by:	imp, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44440
2024-03-21 12:22:57 -03:00
Alexander Ziaee
501f7e7bf8 em.4: add interfaces to name section
Improving first-glance comprehension that this manual page applies to
igb/lem interfaces provided by the em(4) driver.

While here, tag SPDX, link the framework, and shuffle a sentence to fix
linter warning.

Co-authored-by: mhorne
Reviewed by:	mhorne
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1134
2024-03-21 11:16:24 -03:00
Mark Johnston
f29af8618b libfdt: Make an internal FDT library available
This will be used by bhyve to build a device tree when booting arm64
guests.

Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D40994
2024-03-21 01:05:05 -04:00
Ed Maste
f50322c1dc random(9): bump removal to FreeBSD 15.0
It has not yet been removed, and still has some in-tree consumers.

PR:		277655
Sponsored by:	The FreeBSD Foundation
2024-03-18 16:03:49 -04:00
Gordon Bergling
e29be07861 tcp_rack.4: Update the SEE ALSO section
Correct the surname of one of authors of RFC 8985 and add RFC 5681 and
RFC 6937 (PRR: Proportional Rate Reduction for TCP).

Reviewed by:	tuexen
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44399
2024-03-18 19:25:11 +01:00
Brooks Davis
66957ade1e bsd.opts.mk: drop transtion aid for NO_* options
Setting NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS was deprecated in 2014 and made an error prior to the
13.0.0 release in commit d3a5bf95f2.
Likewise, NO_WERROR was made an error prior to 13.0.0 in commit
7fa2f2a62f.

Remove this transition aid making these variables no-ops as setting them
will result in an error on all supported releases.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44345
2024-03-15 23:00:46 +00:00
David E. O'Brien
63a6bd2fc8 SYSCTL(9): correct typo 2024-03-15 14:53:10 -07:00
Warner Losh
d2a824c29d share/mk: Don't install only differing in case files on case insensitive fs
MacOS has case insensitive filesystems by default. So trying to link
between foo.X and FOO.X causes an error of some sort since we unlink the
old foo file destroying the newly installed foo due to the insensitive
nature of the FS. Assume that this is true on darwin/macos, though it is
only try by default there.

Perhaps install should grow smarts to know when this is the case, though
that looked much trickier. There didn't seem to be a flag to check. This
would be better, imho, since we could still write the METALOG data
correctly (images created from these metalogs are imperfect due to this
relatively issue...).

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44347
2024-03-15 09:01:25 -06:00
Warner Losh
a00f9e4e81 scsi: Stop installing both cam.4 and CAM.4
There's no real benefit from installing both cam.4 and CAM.4. The latter
is not an kernel option. This hits a pathological case in mlinks: we're
trying to link to another file and the second link fails on
case-preserving, case-insensitive filesystems, like on MacOS by default.
Since we don't need both, avoid this pathological case.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44346
2024-03-15 09:01:25 -06:00
Baptiste Daroussin
0e2bf3002f src.conf(5): regen after addition of nuageinit 2024-03-15 09:22:43 +01:00
Baptiste Daroussin
a42d6f7601 nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by:	OVHCloud
MFC After:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D44141
2024-03-15 09:22:16 +01:00
Simon J. Gerraty
f974ced38a Update dirdeps.mk et al
bmake-20240309 includes updates to dirdeps and meta mode makefiles
2024-03-13 22:51:08 -07:00
John Baldwin
9dbf5b0e68 new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE
The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44131
2024-03-13 15:05:54 -07:00
John Baldwin
2baed46e85 new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE
The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44130
2024-03-13 15:05:54 -07:00
John Baldwin
d77f2092ce new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE
The public bus_map/unmap_resource() API still accepts both forms, but
the internal kobj methods no longer pass the argument.
Implementations which need the type now use rman_get_type() to fetch
the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44129
2024-03-13 15:05:54 -07:00
John Baldwin
fef01f0498 new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE
The public bus_adjust_resource() API still accepts both forms, but the
internal kobj method no longer passes the argument.  Implementations
which need the type now use rman_get_type() to fetch the value from
the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44128
2024-03-13 15:05:54 -07:00
John Baldwin
b30a80b655 rman: Add rman_get/set_type
This permits associating a resource type (e.g. SYS_RES_MEMORY) with a
struct resource.

I considered adding a new field to struct rman to store the type and
only providing rman_get_type as an accessor.  However, changing
'struct rman' is an ABI breakage.  I might revisit this in main, but
the current approach is MFC'able.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44122
2024-03-13 15:05:53 -07:00
Michael Galassi
d0168b32bc vmm.4: Add verbiage about need to load module from loader.conf
PR:		277530
MFC after:	1 week
Co-authored-by:	Mateusz Piotrowski <0mp@FreeBSD.org>
2024-03-06 16:50:24 +01:00
Sergey A. Osokin
885590b4f1 bsd-family-tree: add FreeBSD 13.3
MFC after:	3 days
2024-03-05 08:38:09 -05:00
Gordon Bergling
7701b99355 tcp_rack.4: Remove a mentioned paper
The paper "T-RACKs: A Faster Recovery Mechanism for
TCP in Data Center Networks" has nothing to do with
our TCP RACK implementation, so remove it.

Reported by:	tuexen
MFC after:	3 days
2024-03-05 03:03:50 +01:00
Brooks Davis
2956f5885c Add an UNDEFINED_VERSION option
When enabled (current default) link with --undefined-version to allow
symbol maps to contain symbols not defined by libraries.  When disabled,
link with --no-undefined-version to disallow these bugs.

WITHOUT_UNDEFINED_VERSION is currently broken.  Once it is fixed it
should be made the default and this option should likely be removed.

Reviewed by:	dim, emaste
Differential Revision:	https://reviews.freebsd.org/D44169
2024-03-01 23:22:11 +00:00
Alexander Ziaee
f19875b66b hier.7: various improvements usr/src and /var
Forth batch of word smithing: /usr/src and /var: Improved wording and a
few missing files added.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/831
2024-03-01 15:22:37 -07:00
Alexander Ziaee
a5b07274fc hier.7: various improvements usr (no src)
Third batch of word smithing: /usr but not /usr/src: Improved wording
and a few missing files added.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/831
2024-03-01 15:22:37 -07:00
Alexander Ziaee
94dedfdfa9 hier.7: various improvements m-s
Second batch of word smithing: /media, /mnt, /nonexistant, /rescue,
/sbin: Improved wording and a few missing files added

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/831
2024-03-01 15:22:37 -07:00
Alexander Ziaee
03ee091489 hier.7: various improvements
First batch of word smithing: /boot, /dev and /etc. Improved wording and
a few missing files added, though /dev is by no means complete.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/831
2024-03-01 15:22:36 -07:00
Warner Losh
9478c7f5f8 firmware: document new native file loading.
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D43611
2024-02-29 09:36:40 -07:00
Baptiste Daroussin
db1d086b73 usb_vendors: add new usb_vendors
usb_vendors is a local copy of usb.ids (similar to pci_vendors)
It is now used by usbconfig(1) when listing the devices.
2024-02-29 13:02:46 +01:00
Simon J. Gerraty
8aea77bc3b Add share/mk/local.dirdeps-targets.mk
To include site.dirdeps-targets.mk
2024-02-27 13:37:50 -08:00
Baptiste Daroussin
cce3a70a77 pci_vendors: update to 2024.02.02 2024-02-27 14:01:11 +01:00
Christos Margiolis
8bfb23abf8 pcm.4: Fix lint warnings
Ignore the "manual not found" warnings for snd_ai2s(4) and
snd_davbus(4).

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D43996
2024-02-27 00:28:53 +01:00
Florian Walpen
dc15f02506 snd_hdspe(4): Optional unified pcm device.
Add a sysctl tunable to unify all physical ports of an HDSPe sound card
into one pcm device, with up to 14 (AIO) or 36 (RayDAT) channels. This
makes all ports available in multi-channel audio software.

Differential Revision:	https://reviews.freebsd.org/D43798
2024-02-25 21:39:36 +00:00
Gordon Bergling
6e9a717069 tcp_rack.4: Fix a link in the SEE ALSO section
The URL of the paper at arxiv.org has changed so link the
PDF-file directly.

MFC after:	3 days
2024-02-25 10:16:25 +01:00
Li-Wen Hsu
1b09a310b7
Add link from if_iwlwifi(4) to iwlwifi(4)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2024-02-23 02:45:22 +08:00
Warner Losh
0da51f1f6a Add missing .endif
Last second move from inside the prior block to outside bites me.

Noticed by: jrtc23
Fixes: dcb621efd6
Sponsored by:		Netflix
2024-02-22 10:17:34 -07:00
Warner Losh
dcb621efd6 loader: Mark BEARSSL broken on powerpc
When BEARSSL is enabled, we pull in libsecureboot, which has EFI
dependencies which don't exist on powerpc. This needs to be detangled,
but until then mark it as broken.

Sponsored by:		Netflix
2024-02-22 10:08:12 -07:00
Ed Maste
9dd5023e95 iwm.4: add iwlwifi cross-reference
iwlwifi(4) supports a superset of the devices supported by iwm(4).  The
latter may be retired in the future (if there is no reason to prefer it
for the set of devices supported by both).

Sponsored by:	The FreeBSD Foundation
2024-02-20 11:47:51 -05:00
Brooks Davis
99ea675731 lib{c,sys}: move auxargs more firmly into libsys
Continue to filter the public interface (elf_aux_info()), but entierly
relocate the private interfaces (_elf_aux_info(),
__init_elf_aux_vector(), and __elf_aux_vector) to libsys.

This ensures that rtld updates the correct (only) copy of
__elf_aux_vector.  After 968a18975a
updates were confused and __getosreldate was failing, causing
the system to fall back to compat compat12 syscalls in some cases.

Return to explicitly linking libc to libsys and link libthr with libc
and libsys (in that order).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D43910
2024-02-19 22:44:08 +00:00
Bojan Novković
849599e28a committers-src: Add bnovkov@ with markj@ and jhb@ as mentors
Add mentorship information for bnovkov@.

Approved by:  markj (mentor)
Differential Revision: https://reviews.freebsd.org/D43963
2024-02-19 16:55:31 +01:00
Warner Losh
63e9c97664 loader: Add new option WITH_LOADER_BIOS_TEXTONLY
This option will omit all the graphics support, the teken terminal
library, video mode support, etc and support a simple, basic, text-only
video console for the x86 BIOS boot loader. It uses the FreeBSD 12
version of vidconsole.c. It defaults to NO.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D43912
2024-02-17 23:29:07 -07:00
Dimitry Andric
73ff7384e0 Optionally create full debuginfo for llvm-related executables
Commit de6feefdb7 limited the amount of debuginfo generated for clang
and other llvm-related executables. This was done to save disk space and
memory during building, but it makes debugging any of these executables
much harder.

Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate
full debuginfo instead. This is off by default, but could for example be
enabled for release builds or snapshots, so llvm executables are easier
to debug.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D43839
2024-02-17 00:15:32 +01:00
Ed Maste
2c5ff9118c rights.4: Remove sentence implying that rights are a mask
Capability rights passed to cap_rights_* are (now) not simple bitmaks
and cannot be ORed together in general (although it will work for
certain subsets of rights).

Remove sentence that implied rights are masks.  We already have the
sentence "The complete list of capability rights is provided below" so
listing the rights without an introductory sentence seems fine.

PR:		277057
2024-02-15 10:00:52 -05:00
Christopher Davidson
bbd29c4394 wlan(4) - remove an(4) reference
Fixes: 663b174b5b ("an: Remove driver")
Pull request: https://github.com/freebsd/freebsd-src/pull/1120
2024-02-14 09:11:00 -05:00
Edward Tomasz Napierala
b4b61ead7e dot.profile: handle symlinked $HOME
Reapply 4cea05a273c875b5d5d4c41bfa6f2f0a60fa4a66:

    Make sh(1) recognize the default $HOME.  By default /home
    is a symlink; without this change, when you log in, sh(1)
    won't realize the current directory (eg '/usr/home/test')
    is the same as $HOME ('/home/test').

/home is no longer a symlink by default, but new users may be added on
systems that started out with an earlier version of FreeBSD (and still
have /home as a symlink) or admins may do so.

This test is not particularly expensive, so just restore it.

Suggested by:	danfe, brooks
2024-02-13 13:24:22 -05:00
Ho-Kun Lin
dcde2454bc
Grammar fix in share/doc/IPv6/IMPLEMENTATION
Event:		Advanced UNIX Programming Course (Fall’23) at NTHU
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1003
2024-02-13 15:16:01 +08:00
Assume-Zhan
0789c3bd2c
share/examples/sound: Fix spelling "controller"
Event:		Advanced UNIX Programming Course (Fall’23) at NTHU.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/994
2024-02-13 14:18:04 +08:00
YuZhong-Chen
edc7b46ebe
Fix typo in share/examples/sunrpc/dir/rls.c
Event:		Advanced UNIX Programming Course (Fall’23) at NTHU.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/974
2024-02-13 12:36:58 +08:00
YuZhong-Chen
ee40f9e860
Fix typo in share/examples/sound/ossinit.h
Event:		Advanced UNIX Programming Course (Fall’23) at NTHU.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/974
2024-02-13 12:36:05 +08:00
Ed Maste
f1bd7311fb style.lua.9: remove mention of $FreeBSD$
Also restore a comment line in an example which previously started with
-- $FreeBSD$ but was removed in 6ef644f588.  The example shows the of
a module require statement block following the license header.
2024-02-12 10:38:40 -05:00
Collin Funk
fd1066bed6 .profile: Don't bother checking for /home symlink
Since FreeBSD 14.0, user directories are created directly under /home.
This check should no longer be needed.

This reverts commit 4cea05a273.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1102
2024-02-12 09:24:49 -05:00
Christos Margiolis
5960ab73d8 snd_uaudio.4: document sysctls
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D43649
2024-02-12 13:07:51 +02:00
Christos Margiolis
dcc47cd49e snd_uaudio.4: remove useless .Tn macro
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D43651
2024-02-12 13:07:51 +02:00
Simon J. Gerraty
41f9823eda rc.subr.8 note when DebugOn will be called 2024-02-10 12:31:10 -08:00
Jessica Clarke
89c3cc20d6 committers-src: Extremely belatedly add myself 2024-02-10 06:07:14 +00:00
Simon J. Gerraty
aa3b7a2fbc /etc/rc add trace debug and verify
Debugging boot issues can be helped by
logging each rc.d script as it is run
and being able to selectively enable/disable set -x
debug.sh provides an elaborate framework for debugging shell scripts.

For secure systems, we want to be paranoid about what we read
during boot.

dot()	simply reads (.) arg file if it exists
vdot()	if mac_veriexec is active, ignore unverified files
	otherwise behaves much the same as dot()
safe_dot()  in safe_eval.sh allows reading an untrusted file;
	limiting the input to simple variable assignments.

In load_rc_config allow caller to provide an option to indicate how to
handle its arg:
	-v use vdot()
	-s use sdot() which will try to use vdot() and fallback to safe_dot()
	The default is to read using dot()

rc_run_scripts()
	encapsulate the running of rc.d scripts
	so that we can easily call it more than twice.

We vdot local.rc.subr to pick up extensions (like
run_rc_scripts_final) and overrides.

We also allow rc.subr.local or rc.conf to set rc_config_xtra
eg (rc_config_xtra=XXX for historic compatibility)

rc use set -o verify around the reading in of rc.subr
This has no effect if mac_veriexec is not active, but if it is; ensures
rc.subr has not been tampered with.

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D43671
2024-02-09 09:15:58 -08:00
Gleb Smirnoff
0bd8eb3e08 unix: retire LOCAL_CONNWAIT
This socket option was added in 6a2989fd54 together with LOCAL_CREDS.
Both options originate from NetBSD.  The LOCAL_CREDS seems to be used by
some software and is covered by our test suite.

The main problem with LOCAL_CONNWAIT is that it doesn't work as
documented. A basic test shows that connect(2) indeed blocks, but
accept(2) on the other side does not wake it up.  Indeed, I don't see what
code in the accept(2) path would go into the peer socket of a unix/stream
listener's child and would make wakeup(&so->so_timeo).  I tried the test
even on a FreeBSD 6.4-RELEASE and it produced the same results as on
CURRENT.

The other thing that puzzles me is why that option would be useful even if
it worked? Because on unix/stream you can send(2) immediately after
connect(2) and that would put data on the peer receive buffer even before
listener had done accept(2). In other words, one side can do connect(2)
then send(2), only after the remote side would make accept(2) and the
remote would see the data sent before the accept(2).  Again this
undocumented feature of unix(4) is present on all versions from FreeBSD 6
to CURRENT.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D43708
2024-02-08 09:00:41 -08:00
Mark Johnston
f5b549d098 kmsan: Update kmsan.9 to note arm64 support
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.
2024-02-08 11:35:11 -05:00
Martin Matuska
a4e5e0106a zfs: merge openzfs/zfs@229b9f4ed
Notable upstream pull request merges:
 #15769 082338875 Add 'zpool status -e' flag to see unhealthy vdevs
 #15804 a0d3fe72b libzdb: Initial breakout of libzdb
 #15847 229b9f4ed LUA: Backport CVE-2020-24370's patch

Obtained from:	OpenZFS
OpenZFS commit:	229b9f4ed0
2024-02-08 16:51:08 +01:00
Brooks Davis
49076f376a libc: don't directly link libsys
It is sufficent to add it as a filter.

Reported by:	kib
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D43781
2024-02-07 19:50:47 +00:00
Konstantin Belousov
3747af1699 Revert "hier.7: add /lib/casper directory"
This reverts commit 407345752d.
No longer needed since helpers are moved to /lib.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D43758
2024-02-06 19:27:50 +02:00
Brooks Davis
0d4f7723bc libc: link libsys as a auxiliary filter library
At runtime, when rtld loads libc it will also load libsys.  For each
symbol that is present in both, the libsys one will override the libc
one.  It continues to be the case that program need only link against
libc (usually implicitly).  The linkage to libsys is automatic.

Reviewed by:	kib, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
2024-02-05 20:34:56 +00:00
Brooks Davis
e9d961055a libsys: plumb in to build
libsys provides the FreeBSD kernel interface (auxargs, system calls,
vdso).  It can be linked directly for programs using a non-standard
libc and will later be linked as a filter library to libc providing
the actual system call implementation.

Reviewed by:	kib, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
2024-02-05 20:34:56 +00:00
Minsoo Choo
a67e5e7c98 pmap: Reflect 1f1b228 in man page
Fixes:	1f1b2286fd ("pmap: Convert boolean_t to bool.")
Differential Revision: https://reviews.freebsd.org/D43729
2024-02-03 20:10:22 -05:00
Minsoo Choo
f846c5b346 pmap: Reflect commit 1f1b228 in man page
Reviewed by:	mhorne
Fixes:		1f1b2286fd ("pmap: Convert boolean_t to bool.")
Differential Revision:	https://reviews.freebsd.org/D43722
2024-02-03 14:07:44 -05:00
Alexander Ziaee
7bd6cbbf69 vt.4: explain console fonts
Add explaination about console fonts, how to convert them, which subset
of things support them and how to use them.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1063
2024-02-02 21:21:45 -07:00
Graham Perrin
521013e7e8 urndis(4): retrospective, address for hselasky
PR:		273530
Fixes:		08c9016bc6 Add a manpage for the urndis driver.
Signed-off-by:	Graham Perrin <grahamperrin@gmail.com>
Reviewed-by:	imp, zlei
Pull-request:	https://github.com/freebsd/freebsd-src/pull/834
2024-02-02 21:05:26 -07:00
Ricardo Branco
b75fa3a2de procfs: Add self & exe symlinks like NetBSD does
NetBSD calls "curproc" "self" and "exe" "file" for proc. Reduce
gratuitous differnces by including them as well.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/976
2024-02-02 18:34:59 -07:00
Jessica Clarke
fbae308319 bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation
Not all of the tree is happy for realinstall to be done in parallel. In
particular, Makefile.inc1 uses .WAIT to force etc to be installed after
earlier subdirectories, since etc calls into share/man's makedb to run
makewhatis on the tree and needs all manpages to have been installed.
Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from
ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before
rtld-elf32, otherwise creating the link will fail.

In general, core behavioural differences like this between NO_ROOT and
"normal" builds are also dangerous and confusing.

If this optimisation is deemed important, it should be reintroduced in a
more limited and robust manner that doesn't break the above situations.
Until then value correctness over slight efficiency gains on high core
count machines, the same machines where you're more likely to encounter
issues from this optimisation.

This reverts commits cd19ecdbdc ("Similar to r296013 for NO_ROOT,
force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") and
b9c6f31681 ("Add more STANDALONE_SUBDIR_TARGETS.").

Found by:	CheriBSD Jenkins
Reviewed by:	bdrewery, brooks
Fixes:		cd19ecdbdc ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.")
Fixes:		b9c6f31681 ("Add more STANDALONE_SUBDIR_TARGETS.")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43705
2024-02-02 21:17:23 +00:00
Lexi Winter
4339f1e667 share/examples/IPv6/USAGE: remove
This document dates from the KAME days and, among other things,
references the 'prefix' command which has not existed for a long time.
Since IPv6 configuration is now documented in the Handbook, remove this
obsolete file.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1094
2024-02-02 08:30:18 -07:00
Graham Perrin
712fd5ac91 intro.9: minor changes
A correction: 'and' -> 'an'. Plus, several tweaks for brevity or
clarity.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/813
2024-01-31 14:31:32 -04:00
Jessica Clarke
41eb4a4ca2 share/man: Add mandoc.db files to METALOG
Otherwise these are omitted for -DNO_ROOT builds, whether for disk
images or dist tarballs.

Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D43676
2024-01-30 22:17:34 +00:00
Florian Walpen
6c892b79de snd_hdspe(4): Per device sysctl for sample rate.
Some hardware setups require a specific sample rate due to devices being
connected to digital ports (AES, S/PDIF, ADAT). Add a per device sysctl
"sample_rate" to let the user override sample rate requests from the pcm
infrastructure, when needed.

Differential Revision:	https://reviews.freebsd.org/D43659
2024-01-30 15:07:57 +00:00
Zsolt Udvari
7aa4e4eb36 Add uzsolt@ to committers
Committer's Guide, steps for new committers, step 5.

Approved by:	bofh (mentor), diizzy (mentor)
Differential Revision:	https://reviews.freebsd.org/D43630
2024-01-30 08:44:14 +01:00
Warner Losh
a26b96a930 style(9): Note larger divergence than implied
Times have changed, and we've diverged somewhat from the original style
guide, while still keeping much of the flavor and flair of its spirit as
the C language has evolved over the last 30 years since 4.4 was
released.

Sponsored by:		Netflix
2024-01-29 16:59:10 -07:00
Minsoo Choo
bea67504c6 style(9): Remove $FreeBSD$ recommendation.
Now that stable/12 is now EOL, there's no reason to do this. They've
been proactively removed from the tree.

Reviewed by:	imp, lwhsu
Differential Revision:	https://reviews.freebsd.org/D43641
2024-01-29 16:59:10 -07:00
Florian Walpen
fb87726303 snd_hdspe(4): Per device sysctl for period.
Let the user choose a period (interrupt cadence in samples), in the
official RME drivers this setting is available as "Buffer Size".
Override the period propagated through blocksize by pcm channel latency
settings (see sound(4)), since these are unreliable and differ between
playback and recording channels.

Differential Revision: https://reviews.freebsd.org/D43527
2024-01-28 20:20:26 +00:00
Gleb Smirnoff
5fc3104ae7 callout: retire callout_async_drain()
This function was used only in TCP before 446ccdd08e.  It was born in
pain in 2016 to plug different complex panics in TCP timers.  It wasn't
warmly accepted in phabricator by all of the reviewers and my recollection
of overall agreement was that "if you need this KPI, then you'd better fix
your code to not need it".  However, the function served its duty well all
the way to FreeBSD 14.  But now that TCP doesn't need it anymore, let's
retire it to reduce complexity of callout code and also to avoid its
further use.

Reviewed by:		jhb, markj, kib, rrs
Differential Revision:	https://reviews.freebsd.org/D43546
2024-01-24 09:33:27 -08:00
Gordon Bergling
ad92f3d9d0 meta2deps.py: Fix a typo in a source code comment
- s/follwing/following/

MFC after:	3 days
2024-01-22 22:00:36 +01:00
Warner Losh
bf531bcc5f altq: Remove stale driver references
Remove xr to an(4) and npe(4) since they no longer exist in the tree.

Sponsored by:		Netflix
2024-01-21 10:01:45 -07:00
Warner Losh
5a1af07a04 firmware(9): Update example
Update the example to include a firmware module in the kernel from npe
to iwn. Npe was deleted 6 years ago so makes a poor example of how to
embed firmware in the kernel.

Sponsored by:		Netflix
2024-01-21 09:20:53 -07:00
Gordon Bergling
bce295fcbe PCI_IOV_INIT.9: Fix a typo in the manual page
- s/infrastucture/infrastructure/

MFC after:	3 days
2024-01-20 20:20:32 +01:00
Gabriel M. Dutra
1abc64bfbd committers-ports.dot: add myself (dutra) as a new ports committer
Add entries about new ports committer (dutra)
Update Mentor and Mentee Information

Approved by:	dbaio(mentor), garga(mentor)
Differential Revision:	https://reviews.freebsd.org/D43502
2024-01-18 18:02:19 -03:00
Christos Margiolis
6b6914c1e2 subr_bus: introduce device_set_descf() and modify allocation logic
device_set_descf() is a printf-like version of device_set_desc().

Allocation code has been transferred from device_set_desc_internal() to
device_set_desc_copy() and device_set_descf() to avoid complicating
device_set_desc_internal(). The "copy" argument in
device_set_desc_internal() has been replaced with a flag which is set
when the description string has been allocated with M_BUS.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D43370
2024-01-16 18:49:15 +02:00
Christos Margiolis
ebc9b69c77 pcm.4: mention snd_uaudio auto-load
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43397
2024-01-16 18:49:02 +02:00
Kristof Provost
baf9b6d042 pf: allow pflow to be activated per rule
Only generate ipfix/netflow reports (through pflow) for the rules where
this is enabled. Reports can also be enabled globally through 'set
state-default pflow'.

Obtained from:	OpenBSD
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43108
2024-01-16 09:45:54 +01:00
Kristof Provost
f92d9b1aad pflow: import from OpenBSD
pflow is a pseudo device to export flow accounting data over UDP.
It's compatible with netflow version 5 and IPFIX (10).

The data is extracted from the pf state table. States are exported once
they are removed.

Reviewed by:	melifaro
Obtained from:	OpenBSD
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43106
2024-01-16 09:45:53 +01:00
Florian Walpen
d7fde2c9ec snd_hdspe(4): One pcm device per physical ADAT port.
ADAT connections transport 8, 4 or 2 audio channels depending on the
sample rate. Instead of splitting each physical ADAT port into 4
(potentially unmapped) stereo pcm devices, create just one pcm
device of variable channel width for every ADAT port.
Depending on the sample rate and channel width selected, the pcm
channels may be only partially mapped to ADAT channels and vice versa.

Added flexibility of the new channel mapping is also prerequisite to
introduce more pcm device layouts in follow-up commits.

Reviewed by:	br
Differential Revision:	https://reviews.freebsd.org/D43393
2024-01-15 10:26:41 +00:00
Marius Strobl
03e8d25b1f geom_map(4): Garbage collect disconnected driver
The last MIPS user has been removed in c09981f1 2 years ago, the last
ARM one in 58d5c511 even 5.5 years ago.
2024-01-14 22:22:21 +01:00
Robert Wing
c8328f1a7b pmap_init(9): drop MLINKS reference
fix the build
2024-01-12 17:29:15 +00:00
Robert Wing
bc1eea0c0b pmap_init(9): sweep references to pmap_init2()
gone since 2005
2024-01-12 13:29:50 +00:00
Robert Wing
55e2a7d3ea pmap_pinit(9): sweep references to pmap_pinit2()
gone since 2004
2024-01-12 13:29:17 +00:00