Commit graph

21256 commits

Author SHA1 Message Date
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
Gordon Bergling
5c2b244c40 make.conf: Fix a typo in the example file
- s/architechture/architecture/

(cherry picked from commit 6300e58ab2)
2022-06-10 14:30:44 +02:00
Bjoern A. Zeeb
1631e83489 iwlwifi: Update man pages with card list
Add list of supported names to iwlwifi.4 and an extended list with
PCI IDs and firmware prefix to iwlwififw.4.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D35227

(cherry picked from commit f553999651)
2022-06-08 16:11:18 +00:00
Bjoern A. Zeeb
4ecb23602e rtw88: update man page for loader tunable for >4GB of main memory
Mention the loader tunable from 6a50157090
that needs to be set for system with more than 4GB of physical memory.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 0881eb9665)
2022-06-03 15:51:52 +00:00
Bjoern A. Zeeb
b7d358ded2 rtw88: add man pages and hook up to build
Add man pages for rtw88 and rtw88fw.  Install a copy of the firmware
license file and hook up the driver and firmware modules to the build.

Sponsored by:	The FreeBSD Foundation
Relnotes:	yes

(cherry picked from commit 20eeed6844)
2022-06-03 15:51:16 +00:00
Vladimir Kondratyev
2c9bb9c618 LinuxKPI: Implement kthread_worker related functions
Kthread worker is a single thread workqueue which can be used in cases
where specific kthread association is necessary, for example, when it
should have RT priority or be assigned to certain cgroup.

This change implements Linux v4.9 interface which mostly hides kthread
internals from users thus allowing to use ordinary taskqueue(9) KPI.
As kthread worker prohibits enqueueing of already pending or canceling
tasks some minimal changes to taskqueue(9) were done.
taskqueue_enqueue_flags() was added to taskqueue KPI which accepts extra
flags parameter. It contains one or more of the following flags:

TASKQUEUE_FAIL_IF_PENDING - taskqueue_enqueue_flags() fails if the task
    is already scheduled to execution. EEXIST is returned and the
    ta_pending counter value remains unchanged.
TASKQUEUE_FAIL_IF_CANCELING - taskqueue_enqueue_flags() fails if the
    task is in the canceling state and ECANCELED is returned.

Required by:	drm-kmod 5.10

MFC after:	1 week
Reviewed by:	hselasky, Pau Amma (docs)
Differential Revision:	https://reviews.freebsd.org/D35051

(cherry picked from commit b6f87b78b5)
2022-06-02 00:50:14 +03:00
Cy Schubert
1d34de61de src.libnames: Replace redundant += with =
The += for unique assignments is equivalent to =. Make these confusing
assignments simply assignments.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35242

(cherry picked from commit e343ebbfbe)
2022-05-25 20:42:53 -07:00
Ed Maste
936d52c10e Hide -fuse-ld= not supported message for non-build targets
In some build configurations a warning about (an absolute path for)
-fuse-ld= not being supported by GCC was emitted during cleandir or
other non-build make targets.

For these non-build targets COMPILER_TYPE is set to "none" but we
treated the .else case for COMPILER_TYPE==clang as implying gcc.
Check instead for COMPILER_TYPE==gcc.

PR:		263913
Reported by:	pstef
Reviewed by:	pstef
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 4143e4fb19)
2022-05-25 20:28:21 -04:00
John Baldwin
5f684c7cb8 Deprecate the 'devclass' argument from *DRIVER_MODULE() macros.
This argument is useless for the vast majority of drivers.  For now,
use __VA_ARGS__ wrapper macros so that that the *DRIVER_MODULE()
macros accept both the old version (with a devclass) and the new
version (which omits the argument and stores NULL in the
driver_module_data structure).  This provides an API compatiblity
shim that can be merged to older stable branches.

Once all drivers relevant to 14.0 (both in and out of tree) have been
updated, the API compat shims can be dropped.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34963

(cherry picked from commit 2a99dd30df)
(cherry picked from commit 0fdf5bc531)
(cherry picked from commit b7d4192598)
2022-05-17 14:17:18 -07:00
Ed Maste
d7620b6ec9 Add deprecation notices to ISA sound cards
ISA sound cards (and ISA itself) are long obsolete.  NYCBUG dmesgd has
no entries for any of these devices after 2005.

Mail to -current and -stable revealed some nostalgic interest, but
no offers to test or requests to pospone the deprecation.

Add deprecation notices to device attach routines and man pages for:

snd_ad1816  Analog Devices AD1816 SoundPort
snd_ess     Ensoniq ESS
snd_gusc    Gravis UltraSound (MAX and newer AFAIK)
snd_mss     Microsoft Sound System
snd_sbc     Creative Sound Blaster

Reviewed by:	cy, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34604

(cherry picked from commit e39ec8933b)
2022-05-16 09:51:23 -04:00
Eugene Grosbein
5c332527d1 ng_pppoe: introduce new sysctl net.graph.pppoe.lcp_pcp
New sysctl allows to mark transmitted PPPoE LCP Control
ethernet frames with needed 3-bit Priority Code Point (PCP) value.
Confirming driver like if_vlan(4) uses the value to fill
IEEE 802.1p class of service field.

This is similar to Cisco IOS "control-packets vlan cos priority"
command.

It helps to avoid premature disconnection of user sessions
due to control frame drops (LCP Echo etc.)
if network infrastructure has a botteleck at a switch
or the xdsl DSLAM.

See also:
https://sourceforge.net/p/mpd/discussion/44692/thread/c7abe70e3a/

Tested by:	Klaus Fokuhl at SourceForge

(cherry picked from commit 2e547442ab)
(cherry picked from commit 28903f396a)
2022-05-16 09:31:56 +07:00
Henri Hennebert
d6a32773ea rtsx: Number of tweaks for RTS5260.
MFC after:	2 weeks

(cherry picked from commit 8290c14420)
2022-05-10 20:56:53 -04:00
John Baldwin
05b766ab84 Disable -Wreturn-type on GCC.
GCC is more pedantic than clang about warning when a function doesn't
handle undefined enum values (see GCC bug 87950).  Clang's warning
gives a more pragmatic coverage and should find any real bugs, so
disable the warning for GCC rather than adding __unreachable
annotations to appease GCC.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34147

(cherry picked from commit 2f6a842484)
2022-05-10 17:11:44 -07:00
John Baldwin
5cf638d004 Disable -Woverflow errors for i386 for GCC 9.
GCC 9 warns about floating point constants overflowing for i386.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26201

(cherry picked from commit 93d6fa53c9)
2022-05-10 14:01:02 -07:00
Alex Richardson
cbbdacf4dc Add missing dep patterns for .pieo
While adding sanitizer support, I noticed that all other extensions were
handled but .pieo was missing.

Reviewed By:	emaste, imp
MFC after:	1 week

Differential Revision: https://reviews.freebsd.org/D31040

(cherry picked from commit 2d78130185)
2022-05-07 12:57:07 +01:00
Ed Maste
2103ecdad8 Update UNIFIED_OBJDIR descriptions
src.conf(5) previously stated they would be removed before FreeBSD 12.0,
but that did not happen.  Change it to "a future version of FreeBSD."

Also pick up LOADER_KBOOT change (enabled on x86) in src.conf regen.

Reported by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b7f53cdcf8)
2022-05-06 21:11:37 -04:00
Konstantin Belousov
3bf38618ee unr(9): allow to avoid internal locking
(cherry picked from commit e59b940dcb)
2022-05-05 01:33:05 +03:00
Ed Maste
94f2607bc9 Add a number of five letter words to the dictionary
(And a four letter root of one of them.)

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

(cherry picked from commit e49b6ead41)
2022-05-03 14:20:44 -04:00
Mark Johnston
c9b2150669 man3: Add links for some bitstring(3) routines
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 15a28c0020)
2022-05-02 09:31:08 -04:00
John Baldwin
d826802c44 bsd.compat.mk: A few cosmetic fixes.
- Add a missing ')' to a warning.

- Consistently use {} when expanding variables.

- Remove a spurious blank line.

Reviewed by:	imp, emaste
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D34172

(cherry picked from commit ffe74ab77f)
2022-04-29 16:07:24 -07:00
John Baldwin
fdc72c5330 Bump Dd for crypto_clonereq.
Fixes:		74d3f1b63d OCF: Add crypto_clonereq().
(cherry picked from commit 822fa6758b)
2022-04-29 15:51:31 -07:00
John Baldwin
6a13905b5a OCF: Add crypto_clonereq().
This function clones an existing crypto request, but associates the
new request with a specified session.  The intended use case is for
drivers to be able to fall back to software by cloning a request and
dispatch it to an internally allocated software session.

Reviewed by:	markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D33607

(cherry picked from commit 74d3f1b63d)
2022-04-29 15:41:27 -07:00
John Baldwin
ec79933e61 Add an internal libiscsiutil library.
Move some of the code duplicated between ctld(8) and iscsid(8) into a
libiscsiutil library.

Sharing the low-level PDU code did require having a
'struct connection' base class with a method table to permit separate
initiator vs target behavior (e.g. in handling proxy PDUs).

Reviewed by:	mav, emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D33544

(cherry picked from commit 6378393308)
2022-04-29 14:13:00 -07:00
Ed Maste
364a69a529 capsicum: briefly describe capabilities in man page
Provide a very brief introduction to capabilities, using a couple of
sentences from David Chisnall's mailing list response[1] to a question
about Linux capabilities and Capsicum.

Mailing list subject (in case the archive URL changes) was
Re: Linux capabilities to Capsicum

[1] https://lists.freebsd.org/archives/freebsd-hackers/2022-April/001032.html

Reviewed by:	oshogbo
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34945

(cherry picked from commit 1f568792c6)
2022-04-25 20:54:38 -04:00
Gordon Bergling
9d62e335f7 tslog(4): Fix a typo in the manual page
- s/schedulling/scheduling/

(cherry picked from commit cebd29c950)
2022-04-23 08:55:04 +02:00
Mitchell Horne
678b669673 mem(4): Improve ioctl section formatting
Add the missing .El which fixes the indentation of the memory range
definitions and operation. Add subsection headings to further clarify
this section. Do the same for the RETURN VALUES section, and mention
explicitly that MEM_EXTRACT_PADDR always returns zero.

Reviewed by:	markj, 0mp, Pau Amma <pauamma@gundo.com>
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D34574

(cherry picked from commit 071b78ce8f)
2022-04-11 11:04:08 -03:00
Mateusz Piotrowski
014485c72f cpufreq.4: Use Xr for drivers with manuals
While here, do not use Pa for drivers.

MFC after:	1 week

(cherry picked from commit 963a032b8d)
2022-04-11 12:15:56 +02:00