Commit graph

22369 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
Sergey A. Osokin
3b46583420 bsd-family-tree: add FreeBSD 14
(cherry picked from commit 25f37779bdeba6856f92d0bc94f74582566fcb0f)
2023-12-10 14:57:40 -05:00
Sergey A. Osokin
66182d944c bsd-family-tree: add OpenBSD 7.4
(cherry picked from commit 8c630381b43cc4d83c99305df3f732b0583ff8f2)
2023-12-10 14:57:30 -05:00
Sergey A. Osokin
0e2f61fc03 bsd-family-tree: add macOS 14
(cherry picked from commit 992ec09f37837a3f7d131bc70a66d6e41b814e9b)
2023-12-10 14:56:59 -05: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
Baptiste Daroussin
728de4f0c8 pci_vendors: update to 2023-09-22
(cherry picked from commit dbffadd8c28e3ab7dc8b5d38e3c5d7f96a5ad62d)
2023-12-04 11:24:07 +01:00
Baptiste Daroussin
629c764f0a pci_vendors: update to 2023-08-12
(cherry picked from commit bf986d52458aaefa4d3a1d4668449cbb5c991afe)
2023-12-04 11:23:56 +01:00
Baptiste Daroussin
7cedaf5072 pkgbase: set the prefix of debug files and macros to /usr/src
When the macro PACKAGE_BUILDING is set, then consider we are building package
for pkgbase, this has already been used in Makefile.inc1 and reuse the
PACKAGE_BUILDING macros already used for that purpose in the ports tree

In the future this should be tied to REPRODUCIBLE_BUILD

MFC After:	3 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42569

(cherry picked from commit 030af1b62d7b9a86f5ecdceff5a1fa23e9570be1)
2023-12-02 10:44:04 +01:00
Konstantin Belousov
ef60d8076f Do not install kernel and modules with executable access bit set
(cherry picked from commit a9758e46473babc03bfe06edfec35e0c71fa7780)
2023-12-02 03:14:53 +02: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
Yuri Pankov
5b4b93e607 msgdef: fix NO and SI locales
Fix circular symlinks by providing separate source for nn_NO.ISO8859-1,
nn_NO.ISO8859-15, and sl_SI.ISO8859-2 (re)generated from CLDR.

PR:		260841
Reviewed by:	imp (previous version)
Fixes:	0a36787e4c ("locales: separate unicode from other locales")
Differential Revision:	https://reviews.freebsd.org/D41899

(cherry picked from commit 159599c4a2bbd8fcc4bb7f845afe3e0ea232ab9e)
2023-11-28 14:12:11 +07: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
Kyle Evans
aaa3d65392 crunchgen: fix "keep" for an ELF world, break it out
"keep" currently adds a leading underscore, which hasn't been useful or
accurate since a.out days.  Preserve the symbol name as it's given
rather than mangle it to match ELF-style symbol names.

This was partially fixed back in
6cd35234a0 ("Assume ELF-style symbol names now.") for crunchgen, but
the keeplist wasn't changed to match it.

While we're here, break it out to bsd.crunchgen.mk for later use in
bsdbox.

Reviewed by:	adrian, imp

(cherry picked from commit 8f2848eafa682f1af629f8ee5e32fec607ab0ba1)
2023-11-25 22:07:12 -06: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
John Baldwin
495a104751 Retire old diskless setup scripts
These scripts predate /etc/rc.diskless* and use a different scheme.  A
comment was added to them back in 2002 noting they were 3 years old at
that point.

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

(cherry picked from commit 7736786b08e8c9edb07088db3229695d0afed600)
(cherry picked from commit f97a3f6a017103b2afaf451af055ec4131a455a9)
2023-10-24 10:08:05 -07:00
John Baldwin
a2972d8737 make_*_driver.sh: Don't include $FreeBSD$ in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41950

(cherry picked from commit 97232e04ca07dffeef629c1628f1cc95f062b41a)
2023-10-24 10:02:54 -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
Doug Rabson
8015c5477b pkgbase: put library links and symlinks in the -dev package
Some libraries (e.g. ncurses) install links to the main library for
backwards compatibilty. This change ensures that those links are in the
dev package since the files being linked to are in that package.

PR:		249143
MFC after:	1 week
Reviewed by:	emaste, manu
Differential Revision: https://reviews.freebsd.org/D41841

(cherry picked from commit 4e899378bf5d89c20430d32982d2635657f34c04)
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