Commit graph

22694 commits

Author SHA1 Message Date
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 4cea05a273:

    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