Jann Horn [Fri, 29 May 2026 17:27:39 +0000 (19:27 +0200)]
man/man2/fanotify_mark.2: AT_FDCWD plus NULL path doesn't work
The fanotify_mark(2) manual page claims that AT_FDCWD works with a NULL
path, but there is no kernel code for that: in fanotify_find_path(), in
the `if (filename == NULL)` block, the fd is only used for a normal FD
lookup.
This was also already the case when this manpage was written back in
2014, so remove the bogus documentation.
Kiryl Shutsemau [Tue, 26 May 2026 13:41:48 +0000 (14:41 +0100)]
man/man2const/UFFDIO_REGISTER.2const: Document UFFDIO_REGISTER_MODE_RWP and 1 << _UFFDIO_RWPROTECT
Add the new registration mode bit introduced in Linux 7.2:
UFFDIO_REGISTER_MODE_RWP Track every access (read or write) to a
present page in the registered range.
Cannot be combined with
UFFDIO_REGISTER_MODE_WP; both modes share
the same per-PTE marker bit. Anonymous,
shmem, and hugetlbfs ranges are
compatible.
Also document the matching argp->ioctls bit, 1 << _UFFDIO_RWPROTECT,
which the kernel reports only when the range was registered with
UFFDIO_REGISTER_MODE_RWP (which itself requires UFFD_FEATURE_RWP to
have been negotiated).
Kiryl Shutsemau [Tue, 26 May 2026 13:41:47 +0000 (14:41 +0100)]
man/man2const/UFFDIO_API.2const: Document UFFD_FEATURE_RWP{,_ASYNC} and 1 << _UFFDIO_SET_MODE
Add the two RWP feature bits introduced in Linux 7.2:
UFFD_FEATURE_RWP gates UFFDIO_REGISTER_MODE_RWP and the
UFFDIO_RWPROTECT(2const) ioctl.
UFFD_FEATURE_RWP_ASYNC in-kernel resolution of RWP faults without
delivering a notification; requires
UFFD_FEATURE_RWP to be set in the same
UFFDIO_API call.
Also document 1 << _UFFDIO_SET_MODE in argp->ioctls, the
file-descriptor-level bit that advertises UFFDIO_SET_MODE(2const) for
toggling UFFD_FEATURE_RWP_ASYNC at runtime; it is independent of any
registered range.
The existing page intro already describes UFFDIO_API returning EINVAL
on unsupported feature bits and the temporary-uffd probe pattern, so
the new TP entries do not re-state that.
Kiryl Shutsemau [Tue, 26 May 2026 13:41:46 +0000 (14:41 +0100)]
man/man2const/UFFDIO_SET_MODE.2const: New page
Document the UFFDIO_SET_MODE ioctl (since Linux 7.2). It toggles
userfaultfd feature bits at runtime; currently, only
UFFD_FEATURE_RWP_ASYNC is toggleable, and enabling it requires
UFFD_FEATURE_RWP to have been negotiated at UFFDIO_API time.
Describe the uffdio_set_mode struct (enable/disable pair, must not
overlap), the serialization against in-flight page faults that lets a
single userfaultfd switch between async detection and synchronous
eviction without re-registering its ranges, and the EINVAL/EFAULT errors
returned by the kernel.
Kiryl Shutsemau [Tue, 26 May 2026 13:41:45 +0000 (14:41 +0100)]
man/man2const/UFFDIO_RWPROTECT.2const: New page
Document the UFFDIO_RWPROTECT ioctl (since Linux 7.2). It installs or
removes read-write protection on a range that was registered with
UFFDIO_REGISTER_MODE_RWP, and is also how a handler resolves an
UFFD_PAGEFAULT_FLAG_RWP notification.
Cover the two mode bits (UFFDIO_RWPROTECT_MODE_RWP and
UFFDIO_RWPROTECT_MODE_DONTWAKE, mutually exclusive), the populated-
pages-only semantics, the anon vs file-backed reclaim behaviour, the
explicit-drop list (MADV_DONTNEED, hole-punch, truncation), and the
EINVAL/EAGAIN/ENOENT/EFAULT errors returned by the kernel.
Read-write protect mode (UFFDIO_REGISTER_MODE_RWP) is supported starting
from Linux 7.2. It traps every access -- read or write -- to a present
page within a registered range. The matching UAPI consists of:
- UFFDIO_REGISTER_MODE_RWP registration-mode bit
- UFFD_FEATURE_RWP capability bit
- UFFD_FEATURE_RWP_ASYNC async (in-kernel) fault resolution
- UFFDIO_RWPROTECT install / remove RWP on a range
- UFFDIO_SET_MODE runtime sync/async toggle
- UFFD_PAGEFAULT_FLAG_RWP new pagefault.flags bit
Document the new registration-mode entry, the "Userfaultfd read-write
protect mode" section, the new pagefault flag, and a VERSIONS line.
felisevan [Mon, 25 May 2026 16:14:14 +0000 (18:14 +0200)]
man/man7/feature_test_macros.7: tfix
Fixed two typos in the _REENTRANT description under the "Feature test
macros understood by glibc" section. Changed "199606L" to "199506L".
For the corresponding glibc source code, see:
Askar Safin [Wed, 27 May 2026 18:15:48 +0000 (18:15 +0000)]
man/man3/errno.3: clarify ENOTSUP and EOPNOTSUPP
As revealed by Christian Brauner recently [1],
EOPNOTSUPP is widely used on Linux to mean "Operation not supported",
as opposed to "Operation not supported on socket".
Also, as seen in POSIX.1-2024 [2]:
POSIX doesn't require ENOTSUP and EOPNOTSUPP to be distinct,
so let's update that, too.
CONTRIBUTING.d/git: core.abbrev: Use 12 characters
This reverts 1bbec490379b (2026-02-26; "CONTRIBUTING.d/git: core.abbrev:
Use only 8 characters").
While 8 characters are unambiguous together with the date and subject,
there are colisions of the hash, which make it uncomfortable to use.
Let's raise it back to 12 characters, which adds some noise, but makes
it easier to use (no need to disambiguate; or at least not so often).
Here's a collision I found recently:
$ git ref 8eea66b8
error: short object ID 8eea66b8 is ambiguous
hint: The candidates are:
hint: 8eea66b82 commit 2025-06-06 - man/: SYNOPSIS: Don't highlight forward declarations of function parameters
hint: 8eea66b8b commit 2019-11-16 - clone.2: Check for MAP_FAILED not NULL on mmap()
fatal: ambiguous argument '8eea66b8': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Fixes: 1bbec490379b (2026-02-26; "CONTRIBUTING.d/git: core.abbrev: Use only 8 characters") Signed-off-by: Alejandro Colomar <alx@kernel.org>
Document the SECCOMP_FILTER_FLAG_TSYNC_ESRCH flag, which allows using
the SECCOMP_FILTER_FLAG_TSYNC and SECCOMP_FILTER_FLAG_NEW_LISTENER
flags together by failing with ESRCH on synchronization error instead
of returning the thread ID.
It seems most likely that this was a typo, and that Q_XQUOTAON was
meant.
Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") Reviewed-by: Jan Kara <jack@suse.cz> Cc: Petr Gajdos <pgajdos@suse.cz> Cc: Jan Blunck <jblunck@novell.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Günther Noack [Fri, 15 May 2026 16:57:52 +0000 (18:57 +0200)]
man/man7/landlock.7: Simplify references to ABI versions
* Use cardinal numbers for referring to Landlock ABI versions,
where possible.
* Adopt the format already used in landlock_restrict_self(2),
where the ABI versions are described next to the flag names
in their tagged paragraphs. For example:
man/man3/dlopen.3: EXAMPLES: Simplify use of dlsym(3)
The cast is entirely unnecessary. Conversion from/to void* and function
pointers is implicit, and it's guaranteed by POSIX. ISO C is irrelevant
here, because dlsym(3) requires POSIX, which provides the stronger
guarantees that we need.
And even before POSIX standardized these guarantees about void* and
function pointers, any system implementing dlsym(3) would have to
support them anyway, as otherwise dlsym(3) couldn't work at all.
Reported-by: Bruno Haible <bruno@clisp.org> Suggested-by: Martin Uecker <uecker@tugraz.at> Acked-by: Bruno Haible <bruno@clisp.org>
Message-ID: <3628881.qSoW2BAyJ8@nimes> Cc: Walter Harms <wharms@bfs.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Alban Crequy [Thu, 14 May 2026 08:36:59 +0000 (10:36 +0200)]
man/man2/process_vm_readv.2: Correct partial transfer granularity
The manual page claimed that partial transfers apply at the granularity
of iovec elements and that these system calls won't split a single
iovec element. This is correct for local iovecs (which are validated
upfront) but incorrect for remote iovecs: the kernel processes remote
memory at page granularity via pin_user_pages_remote(), so a partial
transfer can occur within a single remote iovec element at a page
boundary.
For example, if a remote iovec spans two pages and the second page is
unmapped, the syscall returns the number of bytes from the first page
(a partial transfer within one iovec element), not -1/EFAULT.
I verified this by testing process_vm_readv() and process_vm_writev()
with a 2-page remote iovec where the second page was unmapped via
munmap(). Both returned one page worth of bytes (a short read/write),
confirming page-granularity partial transfers.
I was prompted to check the current behaviour by the LKML review on
my patch (not merged yet) on process_vm_readv adding new flags:
<https://lore.kernel.org/lkml/8b29da5b-e260-4b77-a640-8abb447291d1@kernel.org/>
The inaccurate text was introduced in commit 0b01869b (2012-04-26;
"process_vm_readv.2: Cleanups after comments from Mike Frysinger and
Christopher Yeoh"), based on a misinterpretation of a review comment.
The original manual page text by Christopher Yeoh correctly described
partial transfers without claiming iovec-element granularity.
Note: process_vm_writev.2 is a .so redirect to process_vm_readv.2,
so this fix applies to both pages.
Fixes: 0b01869b (2012-04-26; "process_vm_readv.2: Cleanups after comments from Mike Frysinger and Christopher Yeoh") Cc: David Hildenbrand <david@kernel.org> Signed-off-by: Alban Crequy <albancrequy@microsoft.com>
Message-ID: <20260514083659.139971-1-alban.crequy@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Thomas Voss [Wed, 13 May 2026 22:01:53 +0000 (00:01 +0200)]
man/man2/copy_file_range.2: ffix
Just came across this formatting issue in copy_file_range(2). I went
ahead and wrote a quick fix and also did some searching for similar bugs
across the rest of the manuals with awk(1), but didn’t come across
anything.
Fixes: b983fe3a (2025-11-09; "man/man2/copy_file_range.2: glibc no longer provides fallback after 2.30") Signed-off-by: Thomas Voss <mail@tvoss.eu>
Message-ID: <b9f152d28bcff7ae45189138485e122d696defe6.1778709713.git.mail@tvoss.eu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Matthieu Buffet [Wed, 13 May 2026 08:33:39 +0000 (10:33 +0200)]
man/man7/pid_namespaces.7: Add setns(2) restriction and reasoning
The logical implication between PID namespaces being readonly after
process creation and process trees needing to loosely mirror PID
namespaces is not trivial to follow. Part of that implication is
implicit: since PID namespace membership is readonly, one has to use
fork() or one of its variants to "change" PID namespace, and these APIs
need to return a valid child PID in the parent namespace. The
consequence could also be made more explicit (setns() will fail on
non-descendant PID namespaces) while explaining how this is implemented.
Matthieu Buffet [Wed, 13 May 2026 08:33:38 +0000 (10:33 +0200)]
man/man7/pid_namespaces.7: Fix requirements on namespace+process trees
Creating processes in non-direct-child PID namespaces has been possible
since the addition of setns() support for PID namespaces in commit
linux.git 57e8391d (2012-11-19; "pidns: Add setns support"). The tree
check in pidns_install() in kernel/pid_namespace.c has always allowed
non-direct-child PID namespaces, but was written inline instead of the
more readable current pidns_is_ancestor() helper (possibly explaining
the confusion).
The terminology for these artifacts was "recently" updated to make
them consistent and more clear, where both dpkg and the Debian Policy
now have matching terminology. Refer to the dpkg man pages for further
information and format description.
Guillem Jover [Sat, 9 May 2026 18:50:20 +0000 (20:50 +0200)]
*/: Say OpenPGP instead of PGP
The IETF draft is called OpenPGP, where PGP is the original
implementation from where the specification was based on. For file
artifacts ".pgp" is the correct short term to use though, which can
be considered the more implementation neutral name to use.
man/man2/landlock_add_rule.2: Mention ABI version for LANDLOCK_RULE_NET_PORT
Add the ABI version in the place where LANDLOCK_RULE_NET_PORT is
described. For LANDLOCK_RULE_PATH_BENEATH, the ABI version is
implicit, it is supported since the start.
man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags
Missed this on the earlier commit; we should mention since which
Landlock version these flags are available. Users can correlate this
with the Landlock ABI version as it can be queried through
landlock_create_ruleset(2).
Document the LANDLOCK_CREATE_RULESET_ERRATA flag, which returns a
bitmask of fixed issues for the current Landlock ABI version.
This mechanism was introduced in Linux 6.15, but backported to all
older kernel releases where these errata fixes were backported to.
On official Linux kernel releases, if landlock_create_ruleset() with
LANDLOCK_CREATE_RULESET_ERRATA returns an error, this is equivalent to
the case where none of the known errata have been fixed.
man/man2/landlock_create_ruleset.2: ERRORS: Document EINVAL scope case
This brings the manpage in-line with the kernel documentation. Here,
"scope" is a field in the passed struct landlock_ruleset_access, which
can result in EINVAL if populated improperly.