Commit graph

13144 commits

Author SHA1 Message Date
Gordon Bergling
c9b27b3dc0 rtnetlink.4: Fix a typo in the manual pag
- s/constists/consists/

(cherry picked from commit fa826f64e1b7167dde2c3cb8cfc4df0d3e503542)
2023-12-23 10:50:25 +01:00
Richard Scheffenegger
1fdbb16f40 tcp: add PRR 6937bis heuristic and retire prr_conservative sysctl
Improve Proportional Rate Reduction (RFC6937) by using a
heuristic, which automatically chooses between
conservative CRB and more aggressive SSRB modes.
Only when snd_una advances (a partial ACK), SSRB may be
used. Also, that ACK must not have any indication of
ongoing loss - using the addition of new holes into the
scoreboard as proxy for such an event.

MFC after: 4 weeks
Reviewed By: #transport, kbowling, rrs
Sponsored By: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28822

(cherry picked from commit 49a6fbe38728173da74d5b497f700178e2a6c830)
2023-12-15 09:25:07 +01:00
Mark Johnston
c07ebf5bec kmsan: Add kmsan_check_uio()
This was handy for some ad-hoc debugging and fits in with other
kmsan_check_*() routines which operate on some kind of data container.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit be5464ae233ada46a778cc82f7107a10a7d5343b)
2023-12-14 09:44:38 -05:00
Dag-Erling Smørgrav
90b5ddeca0 bitstring: Support large bit strings.
Replace int with either size_t or ssize_t (depending on context) in
order to support bit strings up to SSIZE_MAX bits in length.  Since
some of the arguments that need to change type are pointers, we must
resort to light preprocessor trickery to avoid breaking existing code.

MFC after:	3 weeks
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D42698

(cherry picked from commit c56f45f2a9da7d989b79fd6c34b63100609ff9ae)
2023-12-13 17:41:48 +01:00
Mitchell Horne
c27113379e kern_reboot(): don't clear kdb_active
It is possible to reach this function from ddb via the "reset" command.
When this happens, we don't actually exit kdb, meaning we never execute
the latter steps of kdb_break() to restore the system state (e.g.
re-enable scheduler).

Therefore, we should not clear the kdb_active flag in this function, as
the debugger is still active. Put differently, kern_reboot() is not an
authority on kdb state, and should not touch it. The original motivation
for this assignment is not clear; I have checked thoroughly and I am
convinced it is not required by any reset code.

This fixes an edge case where a panic can be triggered during reset from
ddb:
 1. Enter ddb via keyboard break sequence (KERNEL_PANICKED() == false &&
    td->td_critnest > 0)
 2. Execute the "reset" command
 3. kern_reboot() sets kdb_active = false
 4. A witness_checkorder() call via shutdown handler sees !kdb_active
    and panics

Reviewed by:	imp, markj
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D42684

(cherry picked from commit 4e78a766f607192698514d970ff4e9fa91d0482d)
2023-12-08 18:02:45 -04:00
Gordon Bergling
e48c3d3a06 Document library types in the intro(3) manual page
Add a paragraph about library types to the intro(3)
manual page. Document library types, locations
and versioning.

Reviewed by:	emaste, jilles, mhorne, pauamma_gundo.com
Obtained from:	OpenBSD (partial)
Differential Revision:	https://reviews.freebsd.org/D36594

(cherry picked from commit 54611b7cc69cee34e7bcdc2324a9159e7543a125)
2023-12-08 22:56:25 +01:00
Bjoern A. Zeeb
a8c36fd7a3 net80211: remove ieee80211_unref_node()
ieee80211_unref_node() was only used in two error cases in
ieee80211_send_nulldata().  There we do not need to guard against
ni pointer reuse after decrementing the refcount of the ni as we
only update the stats and return.

Update the man page and remove the link for the now gone function.

Note: the last uses of the function were removed in 493d625543.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian, emaste
Differential Revision: https://reviews.freebsd.org/D42035

(cherry picked from commit 1137943b1c5b225e30b82350ff7fb12c258ea90f)
2023-11-30 00:36:58 +00:00
Igor Ostapenko
acfc2a0500 pf.conf.5: revise divert-to and divert-reply
(cherry picked from commit 7e1affa242ca83710eb64e2c6184263fbea3deb7)
2023-11-27 20:45:49 +01:00
Gordon Bergling
0c0d524e5e SEE ALSO section improvements for tuning(7), tunefs(8) and fsck_ffs(8)
cross-reference ffs(7) in fsck_ffs(8)
cross-reference ffs(7) and tuning(7) in tunefs(8)
cross-reference ffs(7) in tuning(7)

PR:	263433
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D42631

(cherry picked from commit 115459be3132079f38b848749d20c972fa823fbb)
2023-11-22 09:26:23 +01:00
Shawn Anastasio
91e53779b4 powerpc: Implement fpu_kern_enter/fpu_kern_leave
Summary:
Provide an implementation of fpu_kern_enter/fpu_kern_leave for PPC to
enable FPU, VSX, and Altivec usage in-kernel. The functions currently
only support FPU_KERN_NOCTX, but this is sufficient for ossl(1) and many
other users of the API.

This patchset has been tested on powerpc64le using a modified version of
the in-tree tools/tools/crypto/cryptocheck.c tool to check for FPU/Vec
register clobbering along with a follow-up patch to enable ossl(4) on
powerpc64*.

Reviewed by:	jhibbits
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D41540
Relnotes:	yes

(cherry picked from commit a6662c37b6ffee46e18be5f7570149edc64c1d0b)
2023-11-19 17:55:24 -03:00
Luiz Amaral
51a024c42c pfsync: Document the transport over IPv6 feature
On D40102 we implemented support for transport over IPv6 but the
documentation was not updated to reflect the new feature.

Clarify what is available and how it can be used.

MFC after:	1 week
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42505

(cherry picked from commit 81d4c786209bfa3752c25b2564eb363027f5d914)
2023-11-17 10:00:22 +01:00
Kristof Provost
47b2432a5c pf: support SCTP-specific timeouts
Allow SCTP state timeouts to be configured independently from TCP state
timeouts.

Reviewed by:	tuexen
MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D42393

(cherry picked from commit ca9dbde88122beb079b55fb4580b200f73044da6)
2023-11-07 16:46:52 +01:00
Kristof Provost
14cd670053 pf: update pf(4) man page to list DIOCGETSTATESV2
The nvlist based state retrieval ioctl has been replaced by an old-style
ioctl for performance reasons. Document that one.

Reported by:	Michael Gmelin <grembo@freebsd.org>
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42331

(cherry picked from commit 6869f90bf5bbb2f5ae5400e3a435b3680991321d)
2023-11-01 10:05:49 +01:00
Konstantin Belousov
b23756cc78 pthread_mutexattr(3), _condattr(3): reference libthr(3)
(cherry picked from commit 4f03a2cae8ae96446064da4e8a533ab24172bdcb)
2023-10-29 03:47:05 +03:00
Konstantin Belousov
578e911880 pthread_mutexattr_init(3): describe pthread_mutexattr_{set,get}pshared
PR:	274678

(cherry picked from commit 2152c4e2db88b9264c6400f2510440465d39c7b8)
2023-10-29 03:47:05 +03:00
Yuri Pankov
cfdb5e70ad bhyve: Document the hw.vmm.maxcpu tunable and the current limit on vCPUs
Reviewed by:	corvink (original version)
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Differential Revision:	https://reviews.freebsd.org/D40074

(cherry picked from commit da202b0fe616e9314739f01493ae310e37a36d8d)
2023-10-24 11:43:00 -07:00
John Baldwin
bfa1565246 Trim various $FreeBSD$
Approved by:	markj (cddl/contrib changes)
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41961

(cherry picked from commit f53355131f65d64e7643d734dbcd4fb2a5de20ed)
2023-10-24 11:22:23 -07:00
Zhenlei Huang
e022d8e4ed kmsan.9: Mention the loader tunable 'debug.kmsan.disable'
Reviewed by:	gbe (manpages), markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42166

(cherry picked from commit 7ca90db2f3ee15d9d0343d76f06a90efb8426d92)
2023-10-21 22:41:09 +08:00
Zhenlei Huang
c878532881 kasan.9: Mention the loader tunable 'debug.kasan.disable'
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42165

(cherry picked from commit 2df97575088d2efe71d6ee136a677cf50249f96d)
2023-10-21 22:41:09 +08:00
Bojan Novković
b53fe14843 (s)tty: add support for IUTF8 input flag
This patch adds the necessary kernel and stty code to support setting
the IUTF8 flag for ttys. It is the first of two patches that fix
backspace behaviour for UTF-8 encoded characters when in canonical mode.

Reported by:	christos
Reviewed by:	christos, imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D42066

(cherry picked from commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8)
2023-10-21 17:28:34 +03:00
Doug Rabson
254f85f060 pkgbase: Split out manpages by default
This helps with building small container images using pkgbase.

Reviewed by:	manu bapt
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D41861

(cherry picked from commit 74da9c39c3460213750477204979989b5c39cbcd)
2023-10-20 13:16:47 +01:00
Kajetan Staszkiewicz
6134250f77 pfsync: Provide documentation regarding message version
Reviewed by:	kp
MFC after:	3 days
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42235

(cherry picked from commit 18be782c4e5fcbe4d37a951a6c77c13b3c11b8be)
2023-10-20 10:23:41 +02:00
Olivier Certner
4a85852519 security(7): security.bsd.see*: Be more accurate
Reviewed by:            mhorne, pauamma_gundo.com
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D41108

(cherry picked from commit 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66)
2023-10-17 16:42:59 -03:00
Olivier Certner
b6b76c1c09 groupmember(), realgroupmember(): Return a bool instead of an int
Requested by:           mhorne
Reviewed by:            mhorne
MFC after:              2 weeks
MFC to:                 stable/14 releng/14.0
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40958
Differential Revision:  https://reviews.freebsd.org/D40959

(cherry picked from commit ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6)
(cherry picked from commit 845b7c80887ac84c82ee776836ef86d68ea71c94)
2023-10-17 16:42:59 -03:00
Olivier Certner
f482bc9584 cr_canseeothergids(): Use real instead of effective group membership
Using the effective group and not the real one when testing membership
has the consequence that unprivileged processes cannot see setuid
commands they launch until these have relinquished their privileges.
This is also in contradiction with how the similar cr_canseeotheruids()
works, i.e., by taking into account real user IDs.

Fix this by substituting groupmember() with realgroupmember().  While
here, simplify the code.

PR:                     272093
Reviewed by:            mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40642
Differential Revision:  https://reviews.freebsd.org/D40644

(cherry picked from commit 91658080f1a598ddda03943a783c9a941199f7d2)
(cherry picked from commit 0452dd841336cea7cd979b13ef12b6ea5e992eff)
2023-10-17 16:42:59 -03:00
Olivier Certner
d1fde7841f New realgroupmember()
Like groupmember(), but taking into account the real group instead of
the effective group.  Leverages the new supplementary_group_member()
function.

Reviewed by:            mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40641
Differential Revision:  https://reviews.freebsd.org/D40643

(cherry picked from commit 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559)
(cherry picked from commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833)
2023-10-17 16:42:59 -03:00
Olivier Certner
8d935c419f prison_check(9): Bring up-to-date with hierarchical jails
Reviewed by:            bcr, emaste, pauamma_gundo.com, mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40639

(cherry picked from commit e9fdd494537ca45b14e0917e8bb1595b6460f3a3)
2023-10-17 16:42:59 -03:00
Olivier Certner
7678195065 p_candebug(9): cr_bsd_visible() impacts, misc fixes
Mention cr_bsd_visible(9).  Remove references to cr_canseeothergids(9)
and cr_canseeotheruids(9), as well as indirect references not
immediately useful.

Fix description of credentials checks to match reality.

Re-order errors to match code's check order.

Reviewed by:            bcr, pauamma_gundo.com
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40638

(cherry picked from commit eb94f24fab4b44f13ca045370d9fcf12ca8835f2)
2023-10-17 16:42:58 -03:00
Olivier Certner
fea4e20afb p_cansee(9): Bring up-to-date, misc fixes
Essentially defer to cr_cansee(9), except for the specifics.

Be more specific on the return codes.

Reviewed by:            bcr, pauamma_gundo.com
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40637

(cherry picked from commit 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b)
2023-10-17 16:42:58 -03:00
Olivier Certner
2ecbfdaecb cr_cansee(9): cr_bsd_visible() impacts, simplifications
Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9).
Defer to cr_bsd_visible() for controlling sysctl(8) variables.

Reviewed by:            bcr, mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40636

(cherry picked from commit 82f9bc9ea8ed660c61050ad1d92f1a64108c7004)
2023-10-17 16:42:58 -03:00
Olivier Certner
e04b81f8b7 cr_canseeotheruids(9): Revamp, mark as internal
Significantly clarify.  Replace references to cr_canseeothergids(9) by
ones to cr_bsd_visible(9).

Reviewed by:            bcr, mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40635

(cherry picked from commit 4ddd253b38dff8725555355cc1b5238b1bbfd380)
2023-10-17 16:42:58 -03:00
Olivier Certner
60cc4f16d4 groupmember(9): Detail which groups are considered, simplify
Reviewed by:            mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40634

(cherry picked from commit 75a45ca3b34062fe793ae326ad9da614a1a06df1)
2023-10-17 16:42:58 -03:00
Olivier Certner
ad1486b625 cr_canseeothergids(9): Revamp, mark as internal
Significantly clarify.  Replace references to cr_canseeotheruids(9) by
ones to cr_bsd_visible(9).

Reviewed by:            pauamma_gundo.com, mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40633

(cherry picked from commit 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e)
2023-10-17 16:42:58 -03:00
Olivier Certner
d9181d86c6 cr_bsd_visible(9): New man page
Reviewed by:            bcr, pauamma_gundo.com
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40632

(cherry picked from commit 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f)
2023-10-17 16:42:58 -03:00
Olivier Certner
ce4c78b612 cr_canseejailproc(9): New man page
Reviewed by:            pauamma_gundo.com, mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40631

(cherry picked from commit 29d863bb7ffc692998f21fa3e7a91afa1151cf1c)
2023-10-17 16:42:58 -03:00
Olivier Certner
f173bbdbc1 cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename
When these functions were renamed 7 years ago, their man pages were not.
Rename the latter in accordance and fix the names inside them.  Fix
references to them as well.  Add the old man pages to the list of
obsolete files.

Reviewed by:            mhorne
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40630

(cherry picked from commit c59ab75c04fa32bc6d292596ff5e4593a05a6b1b)
2023-10-17 16:42:58 -03:00
Damien Broka
b973cdbb20 axge: Add support for AX88179A
The AX88179A has two firmware modes, one of which is backward
compatible with existing AX88178A/179 driver. The active firmware mode
can be controlled through a register.

Update axge(4) man page to mention 179A support and ensure that, when
bound to a AX88179A, the driver activates the compatible firmware mode.

Reviewed by:	markj
Pull Request:	https://github.com/freebsd/freebsd-src/pull/854
MFC after:	1 week

(cherry picked from commit 6962da914dd511349b219241e92b32329be76fc6)
2023-10-11 09:16:14 -04:00
Ed Maste
272bc4597d Add mitigations(7) describing our vulnerability mitigations
This is an initial take on documenting vulnerability mitigations.

Connect mitigations(7) to the build

Also add some cross references.

Reviewed by:	gbe (earlier)
Sponsored by:	The FreeBSD Foundation
Co-authored-by: Olivier Certner <olce.freebsd@certner.fr>
Differential Revision: https://reviews.freebsd.org/D41794

(cherry picked from commit b6a61ac2d475fba9c45f7f407549a522f60dea18)
(cherry picked from commit 6e5dcc6113da649a79e5bc2c3ea9329bcd1d85d5)
(cherry picked from commit a2b289608d6b54b6e1ce85096560807e551bb5ac)
2023-10-10 09:34:31 -04:00
Bjoern A. Zeeb
e96f025905 iwlwifi: Update iwlwifi.4 and iwlwififw.4 device list
Update the man pages for iwlwifi.4 and iwlwififw.4 to list the
current state of devices supported and which firmware they need.
The list is automatically generated based on a sysctl added to the
iwlwifi driver (so this is the driver's view).  The reader should
not be surprised by the larger number of any/any/any/any entries
for PCI vendor and devices in the firmware table for which other
matching logic happens.  The reader should also not be confused
about "TBD" (to be done) entries for chipsets which the driver
already supports but have no (public) product yet.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 242f314842767c36eaaacca9f433c80d34def39c)
2023-10-06 12:47:41 +00:00
Mateusz Piotrowski
1e853a1196 sbuf.9: Add LIBRARY section
Sponsored by:	Klara, Inc.
MFC after:	3 days

(cherry picked from commit 5a82fc7859f746d95811e43b3a117b8eea297749)
2023-10-06 09:55:14 +02:00
Ed Maste
48316eed02 pf: add note about changes ported from OpenBSD after 4.5
The last comprehensive sync with OpenBSD's pf corresponds to
OpenBSD 4.5, but many changes have been ported over since then.

Reviewed by:	kp, gbe, Kajetan Staszkiewicz <vegeta@tuxpowered.net>
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42002

(cherry picked from commit 3e609fd481c07802fe837ed834c3710b8c19493c)
2023-10-01 09:06:44 -04:00
Ed Maste
6dc3961c2a arch.7: fix final 12.x release as 12.4
arm (pre-v6/v7) and sparc64 listed 12.x as the final release.  12.4 is
the final 12.x release so we can fix the version number.

(cherry picked from commit d06328c37bbcf3d3d3c7601372d29237996a6f6a)
2023-09-29 08:21:05 -04:00
Li-Wen Hsu
0fa87cf27e
ports(7): Update the default setting of MASTER_SITE_INDEX
MFC after:	3 days

(cherry picked from commit 855e0457396c7addb1df6fc1d14200cc8de286c0)
2023-09-27 08:55:16 +08:00
Archimedes Gaviola
9200ca25d9 udl.4: note that "device videomode" is also required
Reviewed by:	emaste

(cherry picked from commit 9888a79adad22ba06b5aff17d05abac0029c537a)
2023-09-24 09:17:44 -04:00
Robert Clausecker
b6864ba42d share/man/man7/simd.7: document simd-enhanced memchr(3), strnlen(3)
Sponsored by:	The FreeBSD Foundation
Approved by:	mjg
MFC after:	1 week
MFC to:		stable/14
Differential Revision: https://reviews.freebsd.org/D41598

(cherry picked from commit 2a4096b012449d09e9bc3e912f762e4786092a3c)
2023-09-23 14:21:38 -04:00
Robert Clausecker
6aac2b2514 share/man/man7/simd.7: document simd-enhanced strspn(3)
Sponsored by:	The FreeBSD Foundation
Approved by:	mjg
MFC after:	1 week
MFC to:		stable/14
Differential Revision: https://reviews.freebsd.org/D41567

(cherry picked from commit a559ef1ac85947df1bff82b867bbfc07a8085092)
2023-09-23 14:20:28 -04:00
Robert Clausecker
903c95aa61 share/man/man7/simd.7: document simd-enhanced strcspn(3)
Sponsored by:	The FreeBSD Foundation
Approved by:	mjg
MFC after:	1 week
MFC to:		stable/14
Differential Revision:	https://reviews.freebsd.org/D41557

(cherry picked from commit 5fe2597b23191d49856b1739eef29e383872faf9)
2023-09-23 14:20:27 -04:00
Mateusz Piotrowski
eabe10a91b tmpfs.5: Document option export
This is a no-op option supported for the sake of NFS.

MFC after:	7 days

(cherry picked from commit b2bd87bb01a97b5b025614a6bfccb8e109c201cd)
2023-09-22 14:41:29 +02:00
Mateusz Piotrowski
89d3765452 tmpfs.5: Document option union
As noted in 59169d9156,
tmpfs(5) supports the union option just fine.

MFC after:	7 days

(cherry picked from commit 1d225179fd5d7eb932486a94abb8b76be7e44241)
2023-09-22 14:41:29 +02:00
Mateusz Piotrowski
72ac353efe tmpfs.5: Document option nomtime
Fixes:	c1e84733ac tmpfs: add nomtime mount option,
MFC after:	7 days

(cherry picked from commit 6a1de1912d5216512a73dd97c4ee454d44b8fffb)
2023-09-22 14:41:29 +02:00