Commit graph

21282 commits

Author SHA1 Message Date
Ed Maste
adbcdbee60 vt.4: Provide a hint about Fn + K Scroll Lock combination
Many laptops do not have Scroll Lock and use a function key sequence
to access it.

MFC after:	1 week

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f39f827222)
2022-09-04 19:58:10 -04:00
Doug Moore
7ba58de6b6 rb_tree: update augmentation after element change
For an augmented rb_tree, allow a faster alternative to removing an
element from the tree, tweaking it slightly, and inserting it back
into the tree, knowing that its relative position in the tree is
unchanged. Instead, just change the element and invoke
RB_UPDATE_AUGMENT to fix the augmentation data for all the nodes in
the tree.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36010

(cherry picked from commit 35557a0d91)
2022-08-22 04:21:37 -05:00
Li-Wen Hsu
f300d69252
development(7): Update URLs
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 2541dcaf44)
2022-08-22 10:22:49 +08:00
Alan Somers
baa6a68cbe ip6(4): document IP_ORIGDSTADDR
The option was originally added in r313524, but with incomplete
documentation.

Reviewed by:	karels, gbe (manpages)
Differential Revision: https://reviews.freebsd.org/D35890

(cherry picked from commit a043594c21)
2022-08-19 21:07:55 -06:00
Yuri Pankov
e45f7e9243 acpi(4): mention NONE as possible setting for hw.acpi.power_button_state
Reviewed by:	manpages (gbe)
Differential Revision:	https://reviews.freebsd.org/D29577

(cherry picked from commit 970ffdcefe)
2022-08-16 22:45:01 +02:00
Ed Maste
df38c129b0 Add "heard" to the dictionary
PR:		265671
Reported by:	J.R. Oldroyd
MFC after:	3 days

(cherry picked from commit 711ee05918)
2022-08-11 20:23:41 -04:00
Mitchell Horne
c47c706b52 DB_COMMAND(9): update to mention additional macros
Document the existing alias definitions, and augment the example with
one of these. Also, describe the purpose of the newly added _FLAGS
variations of these command definitions.

Make some small style improvements to appease mandoc -Tlint.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35664

(cherry picked from commit b83d53cb68)
(cherry picked from commit 62bca9c4df)
2022-08-11 11:26:48 -03:00
Konstantin Belousov
f2c6a00a2e tree.3: explain RB_FIND() and RB_NFIND()
(cherry picked from commit 08349b18ea)
2022-08-10 03:44:03 +03:00
Sergey A. Osokin
78209289fe bsd-family-tree: fix a typo for NetBSD 9.3 release date
Reported by:	Adrian Steinmann <ast@NetBSD.org>
Fixes:		a3d933cc4f

(cherry picked from commit ffcec862aa)
2022-08-09 11:14:58 -04:00
Sergey A. Osokin
be8190e8d3 bsd-family-tree: add NetBSD 9.3
Add NetBSD 9.3, it's been released two days ago.

(cherry picked from commit a3d933cc4f)
2022-08-09 11:14:58 -04:00
Sergey A. Osokin
28c4159219 bsd-family-tree: OpenBSD 7.1 and DragonFly BSD 6.2.2
Add two releases to the tree.

(cherry picked from commit 69893a0e8f)
2022-08-09 11:14:58 -04:00
Warner Losh
8b62f3bf91 bsd-family-tree: FreeBSD 13.1
Now that 13.1 has been announced, add today's date UTC as the release
date.

(cherry picked from commit f8f1e9cd1c)
2022-08-09 11:14:58 -04:00
Elliott Mitchell
2c0eeaac0b bsd-family-tree: Update various URLs in file
Been some time since 364fe18b8c when the URL was first in this file.
Update from svnweb to cgit for the URL listed at the end of this file.
In addition, update all URLs to HTTPS. Replace two URLs with links to
archive.org as the original URLs are no longer valid.

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D34730

(cherry picked from commit 2b68a79b73)
2022-08-09 11:14:58 -04:00
Ed Maste
3d9d2c27d5 Add ELFCOMPRESS_ZSTD ELF compression constant
ELFCOMPRESS_ZSTD indicates that an ELF section is compressed with zstd.
It is the second compression type, after the existing ELFCOMPRESS_ZLIB.
Zstd generally provides a compelling tradeoff of speed and compression
(other algorithms may compress slightly better but take a lot longer,
or run faster but do not compress nearly as well).

See https://groups.google.com/g/generic-abi/c/satyPkuMisk for details.
ELFCOMPRESS_ZSTD will be supported in a future Clang/LLVM update.  ELF
Tool Chain tools also need updating.

Reviewed by:	Fangrui Song
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 05b6744c44)
2022-08-03 20:35:42 -04:00
Mateusz Piotrowski
a0b1c0c6ea tmpfs.5: Fix typos and linter warnings
MFC after:	3 days

(cherry picked from commit 2b693e4829)
2022-07-25 22:01:23 +02:00
Mateusz Piotrowski
c84f758b2f tmpfs.5: Add fstab line example
MFC after:	3 days

(cherry picked from commit 7c2ec6cdf5)
2022-07-25 22:01:23 +02:00
Xin LI
ec5b775403 libproc: replace home grown crc32 with zlib implementation.
Differential Revision: https://reviews.freebsd.org/D35766

(cherry picked from commit 0bbf270296)
2022-07-23 22:04:56 -07:00
Mateusz Piotrowski
f947192f68 rescure.8: Do not recommend release artifact disc2
The FreeBSD project does not publish disc2 image anymore.

MFC after:	2 weeks

(cherry picked from commit 7963c02c9b)
2022-07-22 02:27:54 +02:00
Mateusz Piotrowski
40a3ae0e0c sysctl.conf.5: Document rc.d/sysctl and rc.d/sysctl_lastload
Also, update the BUGS section. The example describes an issue, which is
not true anymore thanks to sysctl_lastload. Point readers to rcorder(8)
instead.

MFC after:	2 weeks

(cherry picked from commit 383ccaa405)
2022-07-22 02:27:33 +02:00
Mateusz Piotrowski
7beb8ffad4 rc.conf.5: Improve documentation of <name>_oomprotect
Apart from improving readability, this commit mentions that
<name>_oomprotect is ignored in a jail environment. Also, replace
${name}_cmd with the correct ${argument}_cmd and point the reader to
rc.subr(8).

MFC after:	1 week

(cherry picked from commit df1817a81e)
2022-07-22 02:25:23 +02:00
Daniel Ebdrup Jensen
5758cfbb22 rc.conf(5): Add _limits, _login_class, and _oomprotect
Add a few very useful variables that might easily be overlooked, since
they're only documented in rc.subr(8) which might not be the first place
that people look.

At least _oomprotect has existed since 11.0-RELEASE, and doesn't appear
to be very well-known. While the others aren't as new, in my estimation,
a lot more people would use them if they knew about them.

While here, also add a reference to rc.subr(8) and login.conf(5), and
sort the variables alphabetically.

Reported by: 	Daniel Dettlaff <dmilith at gmail.com>
Reviewed by:	ceri, gbe, 0mp, ygy, a.wolk, pauamma

(cherry picked from commit bd6dce978c)
2022-07-22 02:20:42 +02:00
Ceri Davies
51abb759fd rc.conf.5: -Tlint fixes.
(cherry picked from commit 2ce5851295)
2022-07-22 02:13:08 +02:00
Mark Johnston
f82f93ffc1 rc: Add a zpoolreguid rc.d script
If one boots up multiple copies of a template VM image containing a
zpool, the pool GUIDs will be identical, making it impossible to, e.g.,
share datasets between them.

This diff introduces a simple workaround for the problem: one can use
the script to, upon first boot, assign a new GUID to one or more zpools.
This will be useful when building ZFS-based VM images from release(7).

Reviewed by:	mav, allanjude, asomers
Reviewed by:	Pau Amma (docs)
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 227caacc91)
2022-07-19 09:49:44 -04:00
Ed Maste
0c4d13c521 Add SPLIT_KERNEL_DEBUG knob
Prior to 9b6edf364e WITHOUT_KERNEL_SYMBOLS split kernel debug data
into standalone debug files at build time, but did not install those
files.  As of 9b6edf364e it stopped splitting the debug data, leaving
it in the kernel and modules (the default kernel configs include
DEBUG=-g).

Revert 9b6edf364e and introduce a new build-time SPLIT_KERNEL_DEBUG
knob, as some people rely on the pre-9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS
behaviour and that was imp's original intent.

PR:		264433
Reviewed by:	eugen, imp
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35437

(cherry picked from commit 92fc5822a8)
(cherry picked from commit e3709cfe6a)
(cherry picked from commit a7bd57de86)
2022-07-18 11:01:23 -04:00
Ed Maste
10f770d03e Revert "build(7): fix references to svn(1) and svnlite(1)"
This reverts commit 830d566254.
The content change was already cherry-picked, and 830d566254 served
only to introduce a typo.

Reported by:	mhorne
2022-07-17 13:57:24 -04:00
John Baldwin
46b46bb774 hwpmc: Permit the minimum sampling count to be set as a sysctl.
A rarely occurring event (e.g. an event that occurs less than 1000
times during execution of a program) may require a lower minimum
threshold than 1000.  Replace the hardcoded 1000 with a sysctl that
the administrator can use to permit smaller sampling count values.

Reviewed by:	mhorne, mav
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D35400

(cherry picked from commit ca341f3cf5)
2022-07-13 09:19:13 -07:00
Mateusz Piotrowski
b70b138611 ftp: Use /var/spool/ftp as ftp's home consistently
The home directory of the ftp user is /var/spool/ftp according to
hier(7). Update the manual page of ftpd(8) to reflect that.

MFC after:	2 weeks

(cherry picked from commit bad2f716f4)
2022-07-12 10:39:48 +02:00
Dag-Erling Smørgrav
625bc476c6 Catch up with 2004 and improve markup.
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35676

(cherry picked from commit 42db2dbbc5)
2022-07-11 21:44:54 +00:00
Doug Moore
b1290f4746 vm_reserv: use enhanced bitstring for popmaps
vm_reserv.c uses its own bitstring implemenation for popmaps. Using
the bitstring_t type from a standard header eliminates the code
duplication, allows some bit-at-a-time operations to be replaced with
more efficient bitstring range operations, and, in
vm_reserv_test_contig, allows bit_ffc_area_at to more efficiently
search for a big-enough set of consecutive zero-bits.

Make bitstring changes improve the vm_reserv code.  Define a bit_ntest
method to test whether a range of bits is all set, or all clear.
Define bit_ff_at and bit_ff_area_at to implement the ffs and ffc
versions with a parameter to choose between set- and clear- bits.
Improve the area_at implementation.  Modify the bit_nset and
bit_nclear implementations to allow code optimization in the cases
when start or end are multiples of _BITSTR_BITS.

Add a few new cases to bitstring_test.

Discussed with:	alc
Reviewed by:	markj
Tested by:	pho (earlier version)
Differential Revision:	https://reviews.freebsd.org/D33312

(cherry picked from commit 84e2ae64c5)
2022-07-11 00:54:06 -05:00
Doug Moore
689d65d736 tree.3: document RB_AUGMENT
Document the RB_AUGMENT macro, and provide an example of its use.
Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35518

(cherry picked from commit a8380d272a)
2022-07-09 22:57:44 -05:00
Mateusz Piotrowski
65a490aa9a rc.8: Reference the article about rc scripting
MFC after:	3 days

(cherry picked from commit 604bc078a5)
2022-07-08 12:05:49 +02:00
Mateusz Piotrowski
534f445990 tslog.4: Document what TSLOG excels at
Based on an email mhorne@ sent to arch@.

Reviewed by:	debdrup, pauamma_gundo.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34565

(cherry picked from commit 9e337d53de)
2022-07-08 12:05:48 +02:00
Dmitry Morozovsky
830d566254 build(7): fix references to svn(1) and svnlite(1)
Replace them with references to Git.

PR:	254937
Reported by:	m.bueker@berlin.de
Differential Revision:	https://reviews.freebsd.org/D29949

(cherry picked from commit e444a4c677)
2022-07-08 11:58:18 +03:00
Mateusz Piotrowski
bc6859a2ed hier.7: Document /nonexistent
MFC after:	1 week

(cherry picked from commit 606cdb2ef3)
2022-07-07 11:56:19 +02:00
Mateusz Piotrowski
5da06e37e7 hier.7: Remove a.out lib directories
Fixes:		76b4234537 BSD.usr.dist: remove aout
MFC after:	1 week

(cherry picked from commit d5a381f8c7)
2022-07-07 11:56:19 +02:00
Mateusz Piotrowski
549974d685 rc.conf.5: Fix example of how rc.conf.d works
While here, fix a typo.

MFC after:	1 week

(cherry picked from commit 454adf0fa4)
2022-07-05 10:39:02 +02:00
Mateusz Piotrowski
2353343b32 Link pwd.db.5 and spwd.db.5 to passwd.5
Let's make it easier to find documentation for those databases.

MFC after:	3 days

(cherry picked from commit 87f49967d3)
2022-07-03 22:16:11 +02:00
Mateusz Piotrowski
dc90922b80 devfs.5: Replace Nm with Xr devfs 8 where appropriate
MFC after:	3 days

(cherry picked from commit 523477f8c5)
2022-07-03 22:15:32 +02:00
Mateusz Piotrowski
b8aa1e16ab hier.7: Refer to build(7) for details about /usr/obj
MFC after:	3 days

(cherry picked from commit ecd3759719)
2022-07-01 10:46:17 +02:00
Faraz Vahedi
7e6f5e494a assert.3: Document static_assert and _Static_assert
Reviewed by:	imp, 0mp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29833

(cherry picked from commit 33f8d79d76)
2022-06-29 10:22:38 +02:00
Mitchell Horne
13f544bc8e livedump: add event handler hooks
Add three hooks to the livedump process: before, after, and for each
block of dumped data. This allows, for example, quiescing the system
before the dump begins or protecting data of interest to ensure its
consistency in the final output.

Reviewed by:	markj, kib (previous version)
Reviewed by:	debdrup (manpages)
Reviewed by:	Pau Amma <pauamma@gundo.com> (manpages)
MFC after:	3 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34067

(cherry picked from commit eb9d205fa6)
2022-06-27 16:32:06 -03:00
Mitchell Horne
758e72c0a8 Add new vnode dumper to support live minidumps
This dumper can instantiate and write the dump's contents to a
file-backed vnode.

Unlike existing disk or network dumpers, the vnode dumper should not be
invoked during a system panic, and therefore is not added to the global
dumper_configs list. Instead, the vnode dumper is constructed ad-hoc
when a live dump is requested using the new ioctl on /dev/mem. This is
similar in spirit to a kgdb session against the live system via
/dev/mem.

As described briefly in the mem(4) man page, live dumps are not
guaranteed to result in a usuable output file, but offer some debugging
value where forcefully panicing a system to dump its memory is not
desirable/feasible.

A future change to savecore(8) will add an option to save a live dump.

Reviewed by:	markj, Pau Amma <pauamma@gundo.com> (manpages)
Discussed with:	kib
MFC after:	3 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D33813

(cherry picked from commit c9114f9f86)
2022-06-27 16:32:06 -03:00
Mateusz Piotrowski
092cf82121 rc.conf.5: Add missing Ns macros
MFC after:	3 days

(cherry picked from commit 356913f5d8)
2022-06-27 11:50:45 +02:00
Dmitry Chagin
72bc1e6806 cpuset: Byte swap cpuset for compat32 on big endian architectures
Summary:
BITSET uses long as its basic underlying type, which is dependent on the
compile type, meaning on 32-bit builds the basic type is 32 bits, but on
64-bit builds it's 64 bits.  On little endian architectures this doesn't
matter, because the LSB is always at the low bit, so the words get
effectively concatenated moving between 32-bit and 64-bit, but on
big-endian architectures it throws a wrench in, as setting bit 0 in
32-bit mode is equivalent to setting bit 32 in 64-bit mode.  To
demonstrate:

32-bit mode:

BIT_SET(foo, 0):        0x00000001

64-bit sees: 0x0000000100000000

cpuset is the only system interface that uses bitsets, so solve this
by swapping the integer sub-components at the copyin/copyout points.

Reviewed by:    kib
Sponsored by:   Juniper Networks, Inc.
Differential Revision:  https://reviews.freebsd.org/D35225

(cherry picked from commit 47a57144af)

Fix the build after 47a57144

(cherry picked from commit 89737eb829)

cpuset: Fix the KASAN and KMSAN builds

Rename the "copyin" and "copyout" fields of struct cpuset_copy_cb to
something less generic, since sanitizers define interceptors for
copyin() and copyout() using #define.

Reported by:    syzbot+2db5d644097fc698fb6f@syzkaller.appspotmail.com
Fixes:  47a57144af ("cpuset: Byte swap cpuset for compat32 on big endian architectures")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 4a3e51335e)

Use Linux semantics for the thread affinity syscalls.

Linux has more tolerant checks of the user supplied cpuset_t's.

Minimum cpuset_t size that the Linux kernel permits in case of
getaffinity() is the maximum CPU id, present in the system / NBBY,
the maximum size is not limited.
For setaffinity(), Linux does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where
the upper bound is the maximum CPU id, present in the system, no larger
than the size of the kernel cpuset_t.
Unlike FreeBSD, Linux ignores high bits if set in the setaffinity(),
so clear it in the sched_setaffinity() and Linuxulator itself.

Reviewed by:            Pau Amma (man pages)
In collaboration with:  jhb
Differential revision:  https://reviews.freebsd.org/D34849
MFC after:              2 weeks

(cherry picked from commit f35093f8d6)
2022-06-17 22:35:14 +03:00
Dmitry Chagin
82fa7c3b83 linux(4): Add compat.linux32.emulate_i386 knob.
Historically 32-bit Linuxulator under amd64 emulated the real i386
behavior. Since 3d8dd983 the old i386 Linux world can't be used under
amd64 Linuxulator as it don't know anything about amd64 machine (which
is returned now by newuname() syscall). So, add a knob to allow to swith
the behavior and use i386 Linux binaries on amd64.
Set knob to the new behavior as I think this is common to the modern
Linux distros.

Reviewed by:		Pau Amma (doc), emaste
Differential revision:	https://reviews.freebsd.org/D34708
MFC after:		2 weeks

(cherry picked from commit d5dc757e84)
2022-06-17 22:33:47 +03:00
Dmitry Chagin
5833253dad linux(4): Get rid of Linuxulator kernel build options.
Stop confusing people, retire COMPAT_LINUX and COMPAT_LINUX32 kernel
build options. Since we have 32 and 64 bit Linux emulators, we can't build both
emulators together into the kernel. I don't think it matters, Linux emulation
depends on loadable modules (via rc).

Cut LINPROCFS and LINSYSFS for consistency.

PR:                     215061
Reviewed by:            bcr (manpages), trasz
Differential Revision:  https://reviews.freebsd.org/D30751
MFC after:              2 weeks

(cherry picked from commit e013e36939)
2022-06-17 22:30:22 +03:00
Ed Maste
f918bec0d4 syscons: note incompatibility with UEFI
PR:		264226
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 20b2b464eb)
2022-06-16 08:49:54 -04:00
Ed Maste
8fc8553600 Regen src.conf.5 for recent MFCs 2022-06-13 20:34:43 -04:00
PauAmma
6586828a23 firewire.4: Fix typo
While there, replace dead wiki URL with dev handbook one and fix markup.

Reviewed by:	gbe
Differential Revision:	https://reviews.freebsd.org/D35252

(cherry picked from commit eabfcbbfe1)
2022-06-10 12:08:02 -04:00
Fernando Apesteguía
137b82499a build(7): fix references to svn(1) and svnlite(1)
Replace them with references to Git.

PR:	254937
Reported by:	m.bueker@berlin.de
Approved by:	0mp (mentor)
Differential Revision:	https://reviews.freebsd.org/D29949

(cherry picked from commit e444a4c677)
2022-06-10 12:20:33 -03:00