- Remove dead code (redundant .P).
- Adjust white space.
- Remove redundant note.
- Use the same language as always about returning -1 and setting errno.
- Split errors.
The printf family of functions set errno if a negative value is returned.
Source is POSIX.1, see
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwprintf.html>
Peter Xu [Wed, 14 May 2025 17:26:29 +0000 (13:26 -0400)]
man/man2const/UFFDIO_API.2const: Update userfaultfd handshake and feature probe
There's a confusing paragraph in the man page on two-steps handshake for
userfaultfd UFFDIO_API ioctl. In reality, after a successful UFFDIO_API
ioctl, the userfaultfd will be locked up on the features and any further
UFFDIO_API on top of an initialized userfaultfd would fail.
Modify the UFFDIO_API(2const) man page to reflect the reality. Instead,
add a paragraph explaining the right way to probe userfaultfd features.
Add that only after the "Before Linux 4.11" paragraph, as the old kernel
doesn't support any feature anyway.
- Say 'authors' in the copyright notice. Scripted change:
$ grep -rn 'The contributors to the Linux man-pages' -l \
| xargs sed -i '/Copyright, The contributors to the Linux man-pages project/s/contributors to/authors of/'
Suggested-by: Dave Martin <Dave.Martin@arm.com> Acked-by: "G. Branden Robinson" <branden@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/[static_]assert.3: SYNOPSIS: Use 'bool' instead of 'scalar'
The type _Bool perfectly models these APIs. Conversion from any scalar
type to _Bool results in true if the value is non-zero, and false if it
is zero.
man/, CREDITS: Move in-source contribution records to CREDITS
This information is better placed in the git logs, not in the source
code itself. For people interested in the old history of pages, before
we used git, they will probably look at old versions of these pages,
like for example man-pages-1.70, or the 'prehistory' branch, and there
they'll find these notes.
Keep the names and emails of contributors in a new CREDITS file.
Günther Noack [Fri, 2 May 2025 10:24:03 +0000 (12:24 +0200)]
man/man2const/TIOCLINUX.2const: Document CAP_SYS_ADMIN requirement for TIOCL_SETSEL modes
CAP_SYS_ADMIN was previously required for the entire TIOCL_SETSEL
subcode, but is now only needed for a subset of the selection modes,
since linux.git 2f83e38a095f (2025-01-13; "tty: Permit some
TIOCL_SETSEL modes without CAP_SYS_ADMIN").
The CAP_SYS_ADMIN requirement for TIOCL_SELMOUSEREPORT was further
corrected in linux.git ee6a44da3c87 (2025-04-11; "tty: Require
CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT").
Admittedly, there are kernels where CAP_SYS_ADMIN was briefly not
required for TIOCL_SELMOUSEREPORT, even after Linux v6.7, but this was
a mistake which is now fixed in all up-to-date stable kernels.
Therefore, we still document CAP_SYS_ADMIN as required "since Linux
6.7" in this case.
man/man2/mmap.2: CAVEATS: Document danger of mappings larger than PTRDIFF_MAX
References:
- C99 draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
section "6.5.6 Additive operators", paragraph 9
- object size restriction in GCC:
https://gcc.gnu.org/legacy-ml/gcc/2011-08/msg00221.html
- glibc malloc restricts object size to <=PTRDIFF_MAX in
checked_request2size() since glibc v2.30 (released in 2019, as pointed
out by Jakub Wilk):
https://sourceware.org/cgit/glibc/commit/?id=9bf8e29ca136094f
Documentation was extracted from the original patch written by Andrea
Arcangeli and upstreamed in [1]. Minor edits were made to maintain
the same documentation style as other userfaultfd ioctl commands.
Jeremy Kerr [Thu, 17 Apr 2025 02:50:07 +0000 (10:50 +0800)]
man/man7/mctp.7: Document Linux MCTP support
This change adds a brief description for the new Management Component
Transport Protocol (MCTP) support added to Linux as of
linux.git bc49d8169aa7 (2021-07-29; "mctp: Add MCTP base").
This is a fairly regular sockets-API implementation, so we're just
describing the semantics of socket(2), bind(2), sendto(2), and
recvfrom(2) for the new protocol.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Message-ID: <20250417-mctp-v3-1-07fff4d26f73@codeconstruct.com.au>
[alx: minor tweaks] Signed-off-by: Alejandro Colomar <alx@kernel.org>
This seems to be about implementation details that are unimportant to
programmers. It is widely understood that compilers may optimize some
libc calls.
Cc: Anton Zellerhoff <wg14@ascz.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Anton Zellerhoff [Sun, 13 Apr 2025 17:50:11 +0000 (19:50 +0200)]
man/man3/abs.3: Document u{,l,ll,imax}abs()
C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and
proposal N3349). Support for these functions will be included in GCC 15
and glibc 2.42.
Amir Goldstein [Fri, 4 Apr 2025 10:47:22 +0000 (12:47 +0200)]
man/man?/fanotify*: Reorganize documentation of FAN_FS_ERROR
The order of FAN_FS_ERROR entry in the event section was rather
arbitrary inside the group of fid info events.
FAN_FS_ERROR is a special event with error info, so place its entry
after the entries for fid info events and before the entries for
permission events.
Reduce unneeded newlines in the FAN_FS_ERROR entry.
Cc: Jan Kara <jack@suse.cz> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250404104723.1709188-1-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Document FAN_RESPONSE_INFO_AUDIT_RULE extended response info record
that was added in v6.3.
Cc: Jan Kara <jack@suse.cz> Cc: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-2-amir73il@gmail.com>
[alx: ffix] Signed-off-by: Alejandro Colomar <alx@kernel.org>
Amir Goldstein [Sun, 30 Mar 2025 12:55:36 +0000 (14:55 +0200)]
man/man?/fanotify*: Document FAN_PRE_ACCESS event
The new FAN_PRE_ACCESS events are created before access to a file range,
to provides an opportunity for the event listener to modify the content
of the object before the user can accesss it.
Those events are available for group in class FAN_CLASS_PRE_CONTENT
They are reported with FAN_EVENT_INFO_TYPE_RANGE info record.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250330125536.1408939-1-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Amir Goldstein [Mon, 31 Mar 2025 08:27:59 +0000 (10:27 +0200)]
man/man7/fanotify.7: Document FAN_DENY_ERRNO()
Document FAN_DENY_ERRNO(), which was added in Linux 6.13 to
report specific errors on file access.
Cc: Jan Kara <jack@suse.cz> Cc: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-3-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Amir Goldstein [Mon, 31 Mar 2025 08:27:57 +0000 (10:27 +0200)]
man/man7/fanotify.7: The response field is now a bit mask instead of an enum
Since the introduction of the FAN_AUDIT response flag,
the response field of fanotify_response is no longer an enum
it is now a bitmask, so fix the wording around FAN_ALLOW and
FAN_DENY.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-1-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Amir Goldstein [Mon, 31 Mar 2025 08:16:42 +0000 (10:16 +0200)]
man/man2/open_by_handle_at.2: name_to_handle_at(): Document the AT_HANDLE_CONNECTABLE flag
A flag since Linux 6.13 to indicate that the requested file_handle is
intended to be used for open_by_handle_at(2) to obtain an open file
with a known path.
Cc: Chuck Lever <chuck.lever@oracle.com> Cc: Jeff Layton <jlayton@poochiereds.net> Cc: Christian Brauner <brauner@kernel.org> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331081642.1423812-2-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Amir Goldstein [Mon, 31 Mar 2025 08:16:41 +0000 (10:16 +0200)]
man/man2/open_by_handle_at.2: name_to_handle_at(): Document the AT_HANDLE_MNT_ID_UNIQUE flag
A flag since Linux 6.12 to indicate that the requested mount_id is
a 64-bit unique id.
Cc: Chuck Lever <chuck.lever@oracle.com> Cc: Jeff Layton <jlayton@poochiereds.net> Cc: Christian Brauner <brauner@kernel.org> Cc: Jan Kara <jack@suse.cz> Cc: Aleksa Sarai <cyphar@cyphar.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331081642.1423812-1-amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
These previously undocumented selection modes for the Linux console
are implemented in <drivers/tty/vt/selection.c>. The name "selection
mode" is slightly misleading as not all of them actually manipulate
the kernel's mouse selection buffer.
Includes clarified semantics pointed out by Jared Finder.
Cc: Hanno Böck <hanno@hboeck.de> Cc: Jann Horn <jannh@google.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Message-ID: <20250330143038.4184-5-gnoack3000@gmail.com> Acked-by: Jared Finder <jared@finder.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Günther Noack [Sun, 30 Mar 2025 14:30:39 +0000 (16:30 +0200)]
man/man2const/TIOCLINUX.2const: Restructure documentation for TIOCL_SETSEL selection modes
* Indent the documented selection modes into tagged paragraphs.
* Document constants from the header file <tiocl.h> instead of numbers.
* Clarify expansion semantics as suggested by Jared Finder.
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Message-ID: <20250330143038.4184-4-gnoack3000@gmail.com> Acked-by: Jared Finder <jared@finder.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Kang-Che Sung [Sun, 16 Mar 2025 18:32:13 +0000 (02:32 +0800)]
man/man3/wc{,r}tomb.3: wfix regarding MB_CUR_MAX
Add the missing length requirement about MB_CUR_MAX to wcrtomb(3).
Change the wording on the MB_CUR_MAX requirement in wctomb(3). If
programmers know the wide character to convert beforehand, they are
allowed to use a buffer smaller than MB_CUR_MAX bytes, as long as it
"fits" the sequence.
man/man2/get_mempolicy.2: SYNOPSIS: Use GNU fwd declaration of parameters for sizes of array parameters
I forgot to include this change in the global change applied recently.
Fixes: d2c2db8830f8 (2025-03-14; "man/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of array parameters") Signed-off-by: Alejandro Colomar <alx@kernel.org>
Matthieu Buffet [Fri, 7 Mar 2025 22:22:44 +0000 (23:22 +0100)]
man/man7/ip.7: Document capabilities to use IP_TRANSPARENT
CAP_NET_ADMIN has been overkill to use setsockopt(IP_TRANSPARENT)
since a discussion on LKML[1] and a patch[2] in 2011. All that is
left to do is to let devs know they don't need CAP_NET_ADMIN.
[2] linux.git 6cc7a765c298 (2011-10-20; "net: allow CAP_NET_RAW to set socket options IP{,V6}_TRANSPARENT")
Günther Noack [Mon, 3 Mar 2025 19:50:31 +0000 (20:50 +0100)]
man/man7/landlock.7: Document IPC scoping (Landlock ABI v6)
With this ABI version, Landlock can restrict outgoing interactions with
higher-privileged Landlock domains through Abstract Unix Domain sockets
and signals.
Terminology:
* The *IPC Scope* of a Landlock domain is that Landlock domain and its
nested domains.
* An *operation* (e.g., signaling, connecting to abstract UDS) is said
to be *scoped within a domain* when the flag for that operation was
set at ruleset creation time. This means that for the purpose of
this operation, only processes within the domain's IPC scope are
reachable.
Günther Noack [Mon, 3 Mar 2025 19:50:29 +0000 (20:50 +0100)]
man/man7/landlock.7: Document network support
Copy over the existing wording from kernel documentation,
as it was introduced in Linux commit 51442e8d64bc (2023-10-26, "landlock: Document network support").
Landlock rules are not only about the filesystem any more
and the new wording is more appropriate.
We need to escape the # for old versions of make(1). However, new
versions of grep(1) diagnose if it receives an escaped #. To keep both
make(1) and grep(1) happy in both their old and new versions, we need to
take advantage of # not being a comment in bash(1) when not preceeded by
a space, and also of \# being translated into # by bash(1).