Commit graph

3250 commits

Author SHA1 Message Date
Ryan Libby fda32d5860 lock.9: describe lockmgr_{disowned,lock_flags,slock,unlock,xlock}
Describe and link the following functions in the lockgmr API:
 - lockmgr_disowned
 - lockmgr_lock_flags
 - lockmgr_slock
 - lockmgr_unlock
 - lockmgr_xlock

This is not a complete update of lock.9 but at least covers all the main
lock operations.

Reviewed by:	gbe, kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45689
2024-06-23 14:46:31 -07:00
Benedict Reuschling e5a54f19be accf_tls(9): Fix grammar in description (singular/plural) 2024-06-10 08:29:26 +00:00
Benedict Reuschling e335a74b56 accf_http.9: Fix grammar in description (singular/plural) 2024-06-10 08:13:58 +00:00
Michael Tuexen 86c9325d34 tcp: simplify stack switching protocol
Before this patch, a stack (tfb) accepts a tcpcb (tp), if the
tp->t_state is TCPS_CLOSED or tfb->tfb_tcp_handoff_ok is not NULL
and tfb->tfb_tcp_handoff_ok(tp) returns 0.
After this patch, the only check is tfb->tfb_tcp_handoff_ok(tp)
returns 0. tfb->tfb_tcp_handoff_ok must always be provided.
For existing TCP stacks (FreeBSD, RACK and BBR) there is no
functional change. However, the logic is simpler.

Reviewed by:		lstewart, peter_lei_ieee_.org, rrs
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D45253
2024-06-06 08:29:05 +02:00
Elliott Mitchell 037946dc9b kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb665772
Not once has rman_reserve_resource_bound() ever been used.  There are
though several uses of RF_ALIGNMENT.  In light of this remove this
extra and leave the actually used portion in place.

This partially reverts commit 13fb665772.

Reviewed by: imp,jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1224
2024-05-21 17:52:24 -06:00
Ryan Libby da590a3e18 lock.9: LK_TIMELOCK is a lockmgr flag, not lockinit
Reviewed by:	imp, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45246
2024-05-20 09:48:32 -07:00
Alan Somers 3cc1b35bc1 vfs_getopt(9): fix typo
[skip ci]

Reported by:	Claudiu <mscotty@protomail.ch>
MFC after:	2 weeks
2024-05-19 09:49:03 -06:00
Alexander Ziaee 1a720cbec5 man filesystems: fix xrefs after move to section 4
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
2024-05-16 10:25:29 -06:00
Adrian Chadd 1116e8b95c net80211: add a new field specifically for announcing specific ciphers
This dates way, way back with the original net80211 support w/ atheros chips.

The earliest chip (AR5210) had limitations supporting software encryption.
It only had the four WEP slots, and not any keycache entries.  So when
trying to do CCMP/TKIP encryption would be enabled and the key slots
would have nothing useful in them, resulting in garbage encryption/decryption.

I changed this back in 2012 to disable supporting hardware WEP for AR5210
so if_ath(4) / net80211 crypto is all done in software and yes,
I could do CCMP/TKIP on AR5210 in software.

Fast-forward to newer-ish hardware - the Qualcomm 11ac hardware.
Those also don't support pass-through keycache slots! Well, the hardware
does at that layer, but then there's a whole offload data path encap/decap
layer that's turning the frames from raw wifi into ethernet frames (for
"dumb" AP behaviours) or "wifi direct" frames (ie, "windows".)
This hides a bunch of header frame contents required for doing the software
encryption / decryption path.

But then if you enable the raw transmit/receive frame format it ALSO
bypasses the hardware encryption/decryption engine!

So for those NICs:

* If you want to do encryption, you can only use the firmware supported
  ciphers w/ wifi direct or ethernet;
* If you want to use software encrypt/decrypt, you MUST disable all encryption
  and instead use 100% software encryption.

The wpa_supplicant bsd driver code has a specific comment about this and
flips on supporting WEP/TKIP/CCMP, which is understandable but it doesn't
fix the ACTUAL intention of all of this stuff.

So:

* create a new field, ic_sw_cryptocaps
* populate it with the default supported set of ciphers for net80211
  (right now wep, tkip, ccmp)
* Communicate the combination of both ic_sw_cryptocaps and ic_cryptocaps
  to wpa_supplicant via the relevant devcap ioctl.
* Update manpage.

I'll follow this up with a driver_bsd.c change in wpa_supplicant to
trust this again, and then start adding the other cipher support there.

Differential Revision:	https://reviews.freebsd.org/D44820
2024-05-08 17:48:40 -07:00
Jake Freeland cd4bd9750c bitset: Add ORNOT macros
Macros to ANDNOT a bitset currently exist, but there are no ORNOT
equivalents. Introduce ORNOT macros for bitset(9), cpuset(9), and
domainset(9).

Approved by:	markj (mentor)
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	NIKSUN, Inc.
Differential Revision:	https://reviews.freebsd.org/D44976
2024-04-27 19:20:34 -05:00
Mateusz Piotrowski 5626f9e790 style.9: Document the existence of tools/build/checkstyle9.pl
MFC after:	3 days
Sponsored by:	Klara, Inc.
2024-04-26 11:37:01 +02:00
Gleb Smirnoff c68eed82a3 accf_tls: accept filter that waits for TLS handshake header 2024-04-24 17:53:10 -07:00
Mitchell Horne c5989febcc ieee80211_vap(9): fix the title
MFC after:	3 days
2024-04-23 13:00:28 -03:00
Christopher Davidson 96a2e036b7 Update manual page references and macros to align to mandoc syntax
xlocale.3: Comment out reference to atof_l(3), atoi_l(3), atol_l(3), atoll_l(3)
  These manual page references do not exist.

lagg.4: Change the reference for /etc/rc.conf from a reference link
  .Xr -> .Pa based on the context within the manual page it is used.

buf.9: Remove .Xr entries from the file
  The buf.9 manual page contains a commented out .Xr reference.
  The <filmmein> 9 entry is a placeholder and has been removed for
  clarity.

Reviewed by:	mhorne
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1114
2024-04-23 12:50:54 -03:00
Mark Johnston 663a704a58 VOP_BMAP.9: Typo
MFC after:	1 week
Sponsored by:	Klara, Inc.
2024-04-05 11:14:28 -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
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
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 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
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
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
David E. O'Brien 63a6bd2fc8 SYSCTL(9): correct typo 2024-03-15 14:53:10 -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
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
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
Mark Johnston f5b549d098 kmsan: Update kmsan.9 to note arm64 support
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.
2024-02-08 11:35:11 -05:00
Minsoo Choo a67e5e7c98 pmap: Reflect 1f1b228 in man page
Fixes:	1f1b2286fd ("pmap: Convert boolean_t to bool.")
Differential Revision: https://reviews.freebsd.org/D43729
2024-02-03 20:10:22 -05:00
Minsoo Choo f846c5b346 pmap: Reflect commit 1f1b228 in man page
Reviewed by:	mhorne
Fixes:		1f1b2286fd ("pmap: Convert boolean_t to bool.")
Differential Revision:	https://reviews.freebsd.org/D43722
2024-02-03 14:07:44 -05:00
Graham Perrin 712fd5ac91 intro.9: minor changes
A correction: 'and' -> 'an'. Plus, several tweaks for brevity or
clarity.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/813
2024-01-31 14:31:32 -04:00
Warner Losh a26b96a930 style(9): Note larger divergence than implied
Times have changed, and we've diverged somewhat from the original style
guide, while still keeping much of the flavor and flair of its spirit as
the C language has evolved over the last 30 years since 4.4 was
released.

Sponsored by:		Netflix
2024-01-29 16:59:10 -07:00
Minsoo Choo bea67504c6 style(9): Remove $FreeBSD$ recommendation.
Now that stable/12 is now EOL, there's no reason to do this. They've
been proactively removed from the tree.

Reviewed by:	imp, lwhsu
Differential Revision:	https://reviews.freebsd.org/D43641
2024-01-29 16:59:10 -07:00
Gleb Smirnoff 5fc3104ae7 callout: retire callout_async_drain()
This function was used only in TCP before 446ccdd08e.  It was born in
pain in 2016 to plug different complex panics in TCP timers.  It wasn't
warmly accepted in phabricator by all of the reviewers and my recollection
of overall agreement was that "if you need this KPI, then you'd better fix
your code to not need it".  However, the function served its duty well all
the way to FreeBSD 14.  But now that TCP doesn't need it anymore, let's
retire it to reduce complexity of callout code and also to avoid its
further use.

Reviewed by:		jhb, markj, kib, rrs
Differential Revision:	https://reviews.freebsd.org/D43546
2024-01-24 09:33:27 -08:00
Warner Losh 5a1af07a04 firmware(9): Update example
Update the example to include a firmware module in the kernel from npe
to iwn. Npe was deleted 6 years ago so makes a poor example of how to
embed firmware in the kernel.

Sponsored by:		Netflix
2024-01-21 09:20:53 -07:00
Gordon Bergling bce295fcbe PCI_IOV_INIT.9: Fix a typo in the manual page
- s/infrastucture/infrastructure/

MFC after:	3 days
2024-01-20 20:20:32 +01:00
Christos Margiolis 6b6914c1e2 subr_bus: introduce device_set_descf() and modify allocation logic
device_set_descf() is a printf-like version of device_set_desc().

Allocation code has been transferred from device_set_desc_internal() to
device_set_desc_copy() and device_set_descf() to avoid complicating
device_set_desc_internal(). The "copy" argument in
device_set_desc_internal() has been replaced with a flag which is set
when the description string has been allocated with M_BUS.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D43370
2024-01-16 18:49:15 +02:00
Robert Wing c8328f1a7b pmap_init(9): drop MLINKS reference
fix the build
2024-01-12 17:29:15 +00:00
Robert Wing bc1eea0c0b pmap_init(9): sweep references to pmap_init2()
gone since 2005
2024-01-12 13:29:50 +00:00
Robert Wing 55e2a7d3ea pmap_pinit(9): sweep references to pmap_pinit2()
gone since 2004
2024-01-12 13:29:17 +00:00
Tom Hukins ba719a0fec Fix "version introduced" in numerous manual pages
MFC after:	1 week
Pull request:	https://github.com/freebsd/freebsd-src/pull/853
2024-01-08 11:35:16 -05:00
Jens Schweikhardt 359fc7eb32 Typos corrected; dependant, addres. 2024-01-04 19:17:24 +01:00