Paul Eggert [Fri, 30 May 2025 07:20:19 +0000 (00:20 -0700)]
man/man2/open.2: Fix doc for O_CREAT | O_DIRECTORY
Although Linux kernels before 5.7 would create a regular file when
opening a nonexistent file with O_CREAT | O_DIRECTORY, this behavior
was changed to something deeply buggy in 5.7, and when the bug was
fixed in 6.4 this combination of open flags became invalid.
Adjust the documentation to match the 6.4+ behavior,
which makes more sense anyway.
Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Message-ID: <20250530072029.344532-1-eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
- 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>