aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9
Commit message (Collapse)AuthorAgeFilesLines
* sctp, tcp, udp: improve deferred computation of checksumsTimo Völker5 days1-9/+23
| | | | | | | | | | | | | | | | | | | | | | When the SCTP, TCP, or UDP implementation send a packet, it does not compute the corresponding checksum but defers that. The network layer will determine whether the network interface selected for the packet has the requested capability and computes the checksum in software, if the selected network interface doesn't have the requested capability. Do this not only for packets being sent by the local SCTP, TCP, and UDP stack, but also when forwarding packets. Furthermore, when such packets are delivered to a local SCTP, TCP, or UDP stack, do not compute or validate the checksum, since such packets never have been on the wire. This allows to support checksum offloading also in the case of local virtual machines or jails. Support for epair, vtnet, and tap interfaces will be added in separate commits. Reviewed by: kp, rgrimes, tuexen, manpages MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D51475
* kern: rename crsetgroups_fallback, document it in ucred(9)Kyle Evans5 days1-2/+17
| | | | | | | | | | | | | | | | As of FreeBSD 15.0, crsetgroups() *only* sets supplementary groups, while crsetgroups_and_egid() will do both using an array of the same style that previous versions used for crsetgroups() -- i.e., the first element is the egid, and the remainder are supplementary groups. Unlike the previous iteration of crsetgroups(), crsetgroups_and_egid() is less prone to misuse as the caller must provide a default egid to use in case the array is empty. This is particularly useful for groups being set from data provided by userland. Reviewed by: olce Suggested by: olce Differential Revision: https://reviews.freebsd.org/D51647
* style.9: Fix "parantheses" typos in the new C++ sectionTrond Endrestøl6 days1-2/+2
| | | | | | PR: 288564 Fixes: 4b02ad9d5063 ("style.9: Add a C++ section") Sponsored by: The FreeBSD Foundation (commit)
* kern: start tracking cr_gid outside of cr_groups[]Kyle Evans6 days1-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the (mostly) kernel side of de-conflating cr_gid and the supplemental groups. The pre-existing behavior for getgroups() and setgroups() is retained to keep the user <-> kernel boundary functionally the same while we audit use of these syscalls, but we can remove a lot of the internal special-casing just by reorganizing ucred like this. struct xucred has been altered because the cr_gid macro becomes problematic if ucred has a real cr_gid member but xucred does not. Most notably, they both also have cr_groups[] members, so the definition means that we could easily have situations where we end up using the first supplemental group as the egid in some places. We really can't change the ABI of xucred, so instead we alias the first member to the `cr_gid` name and maintain the status quo. This also fixes the Linux setgroups(2)/getgroups(2) implementation to more cleanly preserve the group set, now that we don't need to special case cr_groups[0]. __FreeBSD_version bumped for the `struct ucred` ABI break. For relnotes: downstreams and out-of-tree modules absolutely must fix any references to cr_groups[0] in their code. These are almost exclusively incorrect in the new world, and cr_gid should be used instead. There is a cr_gid macro available in earlier FreeBSD versions that can be used to avoid having version-dependant conditionals to refer to the effective group id. Surrounding code may need adjusted if it peels off the first element of cr_groups and uses the others as the supplemental groups, since the supplemental groups start at cr_groups[0] now if &cr_groups[0] != &cr_gid. Relnotes: yes (see last paragraph) Co-authored-by: olce Differential Revision: https://reviews.freebsd.org/D51489
* mbuf.9: describe checksum offloading for SCTPMichael Tuexen8 days1-11/+23
| | | | | | | | | | This describes the current status of the implementation. While there, be a bit more precise on how long the checksum computation is delayed. Reviewed by: Timo Völker, bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51590
* style.9: Add a C++ sectionJohn Baldwin9 days1-3/+157
| | | | | | | | | | | | | | This section adds several style guidelines for C++ in FreeBSD's base system both enumerating some differences relative to the C KNF style and addressing some unique C++ idioms not addressed by the existing KNF style. This section is not exhaustive but does include an initial set of guidelines. Reviewed by: ivy, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D50983
* domainset(9): Split domainset validation logic into a separate functionBojan Novković10 days1-1/+15
| | | | | | | | | | | This change splits the validation and 'struct domainset'-filling logic from kern_cpuset_setdomain into a separate function - domainset_populate. This function's main use is to validate user-provided domainset(9) policies and populate a struct domainset before handing it off to domainset_create. No functional change intended. Differential Revision: https://reviews.freebsd.org/D46608 Reviewed by: markj
* share: man: fix coredumper_register(9)'s init_fnKyle Evans10 days1-2/+2
| | | | | | | | A last-minute change tweaked the prototype because we can just fetch the compression format from the compressor, but I missed updating the manpage to match it. Fixes: ce51f79913aa28 ("kern: abstract away the vnode coredumper [..]")
* kern: abstract away the vnode coredumper to allow pluggable dumpersKyle Evans10 days2-0/+170
| | | | | | | | | | | | | | | | | | | | | | The default and only stock coredumper will continue to be the traditional vnode dumper, which will dump to a vnode and issue a devctl notification. With this change, one can write a kmod that injects custom handling of user coredumps that offers richer behavior, particularly in case one wants to add more metadata than we can tap out via devd. The main motivation here is to pave the way for my usercore daemon to be able to reroute coredumps before they ever touch the disk. In some cases they may be discarded and we can avoid the overhead of writing anything, in others they allow us to capture coredumps that would be written into an area that's transient in nature (e.g., kyua test work directories) without having to do more tricks to keep those alive. My WIP kmod writes the coredump into a shmfd instead of a vnode, then installs that into ucored(8) with every read(2) of /dev/ucore. This also allows me to capture more metadata reliably before the process and jail disappear. Reviewed by: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D51338
* share/man: Move many manpages to more correct packagesLexi Winter12 days1-0/+2
| | | | | | | | | | | | | | | | | | | | | | At the moment, all the manpages in share/man are in the utilities-man package. Move some of them to the package they should actually be in, using the new MANGROUPS feature. Move all of section 3 to clibs-man. Although some of these are from /usr/include/sys rather than libc, you can't practically use them without libc, and clibs-man is where the libc manpages live already. Move all of sections 4 and 9 to a new kernel-man package, except for atf-test-case.4 which goes to tests-man. atf-test-case.4 is in the wrong section, but this needs to be fixed upstream. kernel-man requires special handling in generate-ucl.lua since it's got a -man suffix but doesn't want the ' (manual pages)' automatic suffix. For now, fix this by adding a list of packages that don't get automatic suffixes. Reviewed by: ifreund_freebsdfoundation.org, manu, emaste Differential Revision: https://reviews.freebsd.org/D51504
* vnode.9: Fix a typo in sys/tools/vnode_if.awk path nameMateusz Piotrowski2025-07-141-2/+2
| | | | | Fixes: e01826567938 vnode.9: Document vnode_if.awk and vnode_if.src MFC after: 1 week
* inotify: Add man pages for the new syscalls and for VOP_INOTIFYMark Johnston2025-07-042-0/+62
| | | | | | | Reviewed by: kib MFC after: 3 months Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50315
* firmware.9: Fix minor grammar typosJames Mintram2025-07-031-2/+2
| | | | | | MFC after: 3 days Reviewed by: ziaee Closes: https://github.com/freebsd/freebsd-src/pull/1749
* counter(9): rate limit periods may be more than 1 secondKristof Provost2025-06-251-4/+23
| | | | | | | | | | | | Teach counter_rate() to deal with periods of more than 1 second, so we can express 'at most 100 in 10 seconds', which is different from 'at most 10 in 1 second'. While here move the struct counter_rate definition into subr_counter.c so users cannot mess with its internals. Add allocation and free functions. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D50796
* vm_map: drop vm_map_simplify_entry.9Doug Moore2025-06-153-61/+0
| | | | | | | | | | | | | A change in 2019 removed the function vm_map_simplify_entry(), but failed to remove the manual page that documents it. As that was an internal function not meant to be used outside the kernel, the manual page is dropped, and a new manual page for the function that replaced it is not added. Reported by: pfg Reviewed by: alc Fixes: 83ea714f4fca ("vm_map_simplify_entry considers merging") Differential Revision: https://reviews.freebsd.org/D50861
* manuals: Align our tree with upstream C23 macroAlexander Ziaee2025-06-121-5/+5
| | | | | | | Switch all instances of the -isoC-2024 macro to -isoC-2023 selected by upstream. Keep -isoC-2024 defined, but deprecated, for backwards compat. MFC after: 3 days (I will resolve merge conflicts with cdefs)
* style.9: relax "return (value)" requirement for C++Lexi Winter2025-06-121-2/+3
| | | | | | | | | | | | | | | | | | | consider the following C++ code: struct S { int a, b; }; S f() { return {1, 2}; } according to style(9), the return statement should be formatted as: return ({1, 2}); however, this is not valid C++ code and will not compile. add an exception to style(9) to cover this case. Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1623 Closes: https://github.com/freebsd/freebsd-src/pull/1623
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-113-3/+3
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* cpu_machdep.9: update documentation for cpu_set_user_tls()Konstantin Belousov2025-05-311-1/+10
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* namei: Make stackable filesystems check harder for jail rootsMark Johnston2025-05-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose a process has its cwd pointing to a nullfs directory, where the lower directory is also visible in the jail's filesystem namespace. Suppose that the lower directory vnode is moved out from under the nullfs mount. The nullfs vnode still shadows the lower vnode, and dotdot lookups relative to that directory will instantiate new nullfs vnodes outside of the nullfs mountpoint, effectively shadowing the lower filesystem. This phenomenon can be abused to escape a chroot, since the nullfs vnodes instantiated by these dotdot lookups defeat the root vnode check in vfs_lookup(), which uses vnode pointer equality to test for the process root. Fix this by extending nullfs and unionfs to perform the same check, exploiting the fact that the passed componentname is embedded in a nameidata structure to avoid changing the VOP_LOOKUP interface. That is, add a flag to indicate that containerof can be used to get the full nameidata structure, and perform the root vnode check on the lower vnode when performing a dotdot lookup. PR: 262180 Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50418
* namei.9: minor editingKonstantin Belousov2025-05-191-3/+6
| | | | | Noted by: des Sponsored by: The FreeBSD Foundation
* namei.9: sort operational modifiers in numerical orderKonstantin Belousov2025-05-181-50/+59
| | | | | | | | Note that NC_NOMAKEENTRY is an alias of NOCACHE. Suggested by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week
* namei(9): document the restKonstantin Belousov2025-05-181-0/+187
| | | | | | | Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50401
* namei: Update documentation.Dag-Erling Smørgrav2025-05-172-25/+47
| | | | | | | | | | | | | This should have been done 2+ years ago when the td argument was dropped from NDINIT() and the NDFREE() macro and the SAVENAME and SAVESTART flags were retired. MFC after: 3 days Fixes: 7e1d3eefd410 ("vfs: remove the unused thread argument from NDINIT*") Fixes: 269c564b90d3 ("vfs: retire NDFREE") Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50375
* sysctl.9: Constant integer example: Do not promote 'debug.sizeof'Olivier Certner2025-05-121-2/+2
| | | | | | | Replace it with another one, selected from current in-tree uses. MFC after: 1 day Sponsored by: The FreeBSD Foundation
* random(9): bump removal to FreeBSD 16.0Ed Maste2025-05-111-2/+2
| | | | | | | It has not yet been removed, and still has some in-tree consumers. PR: 277655 Sponsored by: The FreeBSD Foundation
* sys/cdefs.h: add __nodiscard annotationLexi Winter2025-05-091-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __nodiscard adds the [[nodiscard]] attribute to a function, type or constructor in C or C++, causing a value so marked to issue a compiler warning if it is discarded (i.e., not used or assigned) other than by casting it to void. this replaces the existing __result_use_or_ignore_check, which has a similar purpose but different semantics. since __nodiscard provides more functionality (at least in GCC) and __result_use_or_ignore_check only had a single user, remove __result_use_or_ignore_check. [[nodiscard]] has been supported in C++ since C++17, but only in C since C23; however, both LLVM and GCC implement it even in older language versions, so it should always be available with a relatively modern compiler. for Clang, [[nodiscard]] in C is only available since LLVM 17, but we can fall back to __attribute__((__warn_unused_result__)) which has the same semantics and provides support back to (at least) LLVM 11. GCC supports [[nodiscard]] in both C and C++ since at least GCC 11. for GCC, we can't provide a fallback as the semantics of its warn_unused_result are different, but since __result_use_or_ignore_check isn't defined for GCC anyway, we don't lose anything here. MFC after: 2 weeks Reviewed by: des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50217
* crypto: Remove uses of CRYPTO_F_DONEMark Johnston2025-05-091-12/+1
| | | | | | | | | | | | | | | | Previously OCF set CRYPTO_F_DONE prior to invoking the completion callback, even if the request failed. This isn't particularly useful and leads to bugs when consumers retry a failed request, since OCF also asserts that CRYPTO_F_DONE is clear in crypto_dispatch(). (Really, OCF should retry requests that fail with EAGAIN, but that's a larger change.) For now, just stop setting CRYPTO_F_DONE to simplify consumers (and fix those which fail to clear the flag before retrying a request). PR: 286321 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D50104
* OF_node_from_xref.9: Fix function name typo + spdxAlexander Ziaee2025-04-191-2/+4
| | | | | | | | | MFC after: 3 days Reported by: Setesh Strong on Community Discord Fixes: ac32b99c2b9 (Add documentation for OpenFirmware) Reviewed by: carlavilla, kevans Approved by: carlavilla (mentor) Differential Revision: https://reviews.freebsd.org/D49653
* The UMA man page is lowercased. Reference it as uma.9 to avoid 404.Jens Schweikhardt2025-04-171-1/+1
|
* openfirm: Add OF_device_unregister_xrefEmannuel Vadot2025-04-031-1/+13
| | | | | | | | | | | | | When a device fails to attach, or a module is unloaded, we want to be able to unregister the xref as the device goes away. While the device_t may still be valid, it won't be providing whatever functionality the consumer that follows the xref wants it for and thus, we should not keep it discoverable. [Commit message re-worded by kevans@] Reviewed by: ian, imp Differential Revision: https://reviews.freebsd.org/D22945
* pci: Add helper routines to manage PME in device driversJohn Baldwin2025-03-272-1/+20
| | | | | | | | | | | pci_has_pm is a quick check that returns true if a PCI device supports the power management capability. pci_enable_pme can be used in DEVICE_SUSPEND driver methods to enable PME# during suspend. Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com>x Differential Revision: https://reviews.freebsd.org/D49250
* pci: Clear active PME# and disable PME# generationJohn Baldwin2025-03-272-0/+9
| | | | | | | | | | | | | | | | | The PCI power management specification requires that the OS clear any pending PME# interrupt and generation of PME# interrupts during "initial operating system load". Note that clearing a pending PME# interrupt requires writing a 1 to the Read/Write-Clear PME bit in the power management status register. To handle the boot time case, clear PME# state in pci_read_cap() when scanning new PCI devices. This should also cover hotplug devices. In addition, clear this state on every PCI device after resume from sleep in pci_resume_child before invoking the driver's DEVICE_RESUME method. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49222
* IfAPI: Update ifnet(9) man pageJustin Hibbits2025-03-012-251/+351
| | | | | | | | | Add starting documentation of the IfAPI to the ifnet(9) page. This replaces the existing struct ifnet documentation, since it's to be treated as opaque now. Reviewed by: #manpages, adrian, ziaee Differential Revision: https://reviews.freebsd.org/D47931
* style: Recomend SPDX licensesAlexander Ziaee2025-02-251-25/+16
| | | | | | | | | | | While here, take this opportunity to update the copyright and clean some mdoc errors. MFC after: 3 days Reviewed by: carlavilla, mhorne, imp Approved by: imp (srcmgr) Approved by: carlavilla, mhorne (mentors) Differential Revision: https://reviews.freebsd.org/D49051
* make_dev.9: Fix mda_cr typo + polishAlexander Ziaee2025-02-111-19/+24
| | | | | | | | | | | | | | | The make_dev_args_init structure example said mda_cred, however the correct form is mda_cr according to the reporter and my git grep. A new document description has been contributed by jhb. While here, fix grammar and trivial typos (spacing, colons before examples, trailing delimiter) and spdx. MFC after: 3 days Reported by: jhb (much polish and document description) Reported by: Evgenii Ivanov on Community Discord Reviewed by: carlavilla, mhorne, jhb, kib Approved by: carlavilla, mhorne (mentors) Differential Revision: https://reviews.freebsd.org/D48516
* man9: Delete standalone bus_delayed_attach_children.9John Baldwin2025-02-062-55/+2
| | | | | | | The description in bus_attach_children.9 has more details as well as additional context. This reverts commit 8770f17a959f2af303213989c0323204bb47c129.
* man9: Remove bus_delayed_attach_children MLINKEd Maste2025-02-061-2/+1
| | | | | | | | | bus_delayed_attach_children already existed as a standalone page, causing pkgbase errors due to duplicate METALOG entries. Delete the MLINK for now to fix the build. Fixes: 192d326bcff5 ("bus_attach_children.9: New manpage for functions operating on children") Sponsored by: The FreeBSD Foundation
* bus_generic_print_child.9: Document bus_print_domainJohn Baldwin2025-02-052-13/+59
| | | | | | | | While here, cross-reference BUS_PRINT_CHILD (and fix a stale reference to DEVICE_PRINT_CHILD which doesn't exist) and expand the text describing the role of the helper functions. Differential Revision: https://reviews.freebsd.org/D48373
* bus_generic_detach.9: Update for new semanticsJohn Baldwin2025-02-051-4/+14
| | | | | | | bus_generic_detach now deletes children after detaching them. Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D48371
* bus_generic_attach.9: Remove manpage for deprecated functionJohn Baldwin2025-02-052-57/+0
| | | | Differential Revision: https://reviews.freebsd.org/D48369
* bus_attach_children.9: New manpage for functions operating on childrenJohn Baldwin2025-02-055-4/+164
| | | | | | | | This documents bus_attach_children, bus_delayed_attach_children, bus_detach_children, bus_enumerate_hinted_children, and bus_identify_children. Differential Revision: https://reviews.freebsd.org/D48368
* device_delete_child.9: Reference device_detach.9 and BUS_CHILD_DELETED.9John Baldwin2025-02-051-5/+18
| | | | | | | | | | Refer to device_detach(9) for the description of detaching a device. Note that descendants of the child device are also deleted (though in theory a proper detach routine should have already deleted these). Finally, note that BUS_CHILD_DELETED(9) is invoked on each deleted device. Differential Revision: https://reviews.freebsd.org/D48365
* device_probe_and_attach.9: Document more device functionsJohn Baldwin2025-02-052-11/+120
| | | | | | | | | | | Split out separate descriptions of device_probe and device_attach and include extra details (such as the effect of a disabled hint during device_attach). Reframe device_probe_and_attach as a recommended wrapper function around device_probe and device_attach. While here, add a description of device_detach. Differential Revision: https://reviews.freebsd.org/D48364
* sys: Add cpu_update_pcb hookJohn Baldwin2025-01-312-3/+23
| | | | | | | | | | | | | This MD function is invoked before dumping register set notes when writing out a core dump to ensure that the PCB for a given thread is up to date. This provides a centralized place to update the PCB with values of the current thread for each arch rather than doing this work in each register set's get method. Discussed with: jrtc27 Reviewed by: kib, markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D44910
* ithread: Allow some ithreads to sleepAndrew Turner2025-01-241-1/+9
| | | | | | | | | | Some ithreads need to hold a sleep mutex, e.g. when calling ACPI methods. Allow ithreads to be marked as sleepable when this is known to be safe. Reviewed by: markj, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48283
* BUS_CONFIG_INTR.9: Describe bus_config_intr() wrapper functionJohn Baldwin2025-01-162-3/+14
| | | | | Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D48372
* bus_generic_print_child.9: Add bus_print_child_{header,footer}John Baldwin2025-01-162-2/+10
| | | | | | | | These functions are already described in the body, just add them in the NAME and SYNOPSIS sections along with MLINKS. Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D48370
* BUS_HINTED_CHILD.9: New manpage to document this bus methodJohn Baldwin2025-01-162-0/+37
| | | | | Reviewed by: ziaee, imp Differential Revision: https://reviews.freebsd.org/D48366
* DEVICE_IDENTIFY.9: Modernize description and use casesJohn Baldwin2025-01-091-27/+25
| | | | | | | | | | | | | | | Mention adding devices based on firmware tables and software-only pseudo-devices as use cases for identify methods as those are more common than reading random I/O ports to identify a legacy ISA device. Describe how device_find_chid can be used to avoid duplicates. While here, explicitly note that devices added in identify methods typically use a fixed device name. Trim the cross-references a bit. Reviewed by: ziaee, imp Differential Revision: https://reviews.freebsd.org/D48367