| Age | Commit message (Collapse) | Author | Files | Lines |
|
We actually disallow VM_DONTEXPAND and VM_PFNMAP for MREMAP_DONTUNMAP,
the manpage incorrectly references VM_MIXEDMAP.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <20251121081609.52462-1-lorenzo.stoakes@oracle.com>
Cc: <linux-mm@kvack.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Rik van Riel <riel@surriel.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Ideally one should be able to use flock to synchronize with another
process (or thread) closing that file, for instance before attempting
to execve it (as execve of a file open for writing fails with ETXTBSY).
Unfortunately, on Linux it is not reliable, because in the process of
closing a file its locks are dropped before the refcounts of the file
(as well as its underlying filesystem) are decremented, creating a race
window where execve of the just-unlocked file sees it as if still open.
Linux developers have indicated that it is not easy to fix, and the
appropriate course of action for now is to document this limitation.
Link: <https://lore.kernel.org/linux-fsdevel/68c99812-e933-ce93-17c0-3fe3ab01afb8@ispras.ru/>
Signed-off-by: Alexander Monakov <amonakov@ispras.ru>
Message-ID: <181d561860e52955b29fe388ad089bde4f67241a.1760627023.git.amonakov@ispras.ru>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=220489>
Signed-off-by: Wes Gibbs <wg21908@gmail.com>
Message-ID: <20251102000330.155591-1-wg21908@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
addition of PR_THP_DISABLE_EXCEPT_ADVISED
PR_THP_DISABLE_EXCEPT_ADVISED extended PR_SET_THP_DISABLE to only provide
THPs when advised. IOW, it allows individual processes to opt-out of
THP = "always" into THP = "madvise", without affecting other workloads
on the system. The series has been merged in [1]. Before [1], the
following 2 calls were allowed with PR_SET_THP_DISABLE:
prctl(PR_SET_THP_DISABLE, 0, 0, 0, 0); // reset THP setting.
prctl(PR_SET_THP_DISABLE, 1, 0, 0, 0); // disable THPs completely.
Now in addition to the 2 calls above, you can do:
// disable THPs except madvise.
prctl(PR_SET_THP_DISABLE, 1, PR_THP_DISABLE_EXCEPT_ADVISED, 0, 0);
This patch documents the changes introduced due to the addition of
PR_THP_DISABLE_EXCEPT_ADVISED flag:
- PR_GET_THP_DISABLE returns a value whose bits indicate how
THP-disable is configured for the calling thread (with or without
PR_THP_DISABLE_EXCEPT_ADVISED).
- PR_SET_THP_DISABLE now uses arg3 to specify whether to disable THP
completely for the process, or disable except madvise
(PR_THP_DISABLE_EXCEPT_ADVISED).
Link: [1] <https://github.com/torvalds/linux/commit/9dc21bbd62edeae6f63e6f25e1edb7167452457b>
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Message-ID: <20251105134811.3170745-1-usamaarif642@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
As documented in the STANDARDS section, gettimeofday(2) was deprecated
in POSIX.1-2008 and removed in POSIX.1-2024. Mark it and
settimeofday(2) with [[deprecated]], and mention clock_settime(2) as a
modern and standardized alternative to settimeofday(2).
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <2d37d5a9251af3c1d25cf8e73e3585a9955d5772.1750373011.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
POSIX.1-2024 now mandates a behavior different from what Linux (and many
other implementations) does. It requires that we report EINPROGRESS for
what now is EINTR.
There are no plans to conform to POSIX.1-2024 within the Linux kernel,
so document this divergence. Keep POSIX.1-2008 as the standard to
which we conform in STANDARDS.
Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=14627>
Link: <https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html>
Cc: Jan Kara <jack@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Rich Felker <dalias@libc.org>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: <linux-api@vger.kernel.org>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
doesn't support it
Fixes: 265b9898dfe2 (2025-05-09; "man/man2/: VERSIONS: POSIX.1-2024 specifies *_CLOFORK, but Linux doesn't support it")
Link: <https://lore.kernel.org/all/20200515160342.GE23230@ZenIV.linux.org.uk/>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 4131356cdab8 (2023-03-30; "man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Those flags were added in Linux 6.9 (see [1]), and are documented
in [2].
The text added is a modified version of [3], removing some repetition
and adapting from markdown to mandoc.
[1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e1fb1dc08e73>
[2]: <https://github.com/brauner/man-pages-md/blob/main/pidfd_send_signal.md>
[3]: <https://github.com/brauner/man-pages-md/pull/2>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20251008020031.1215030-4-kolyshkin@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
PIDFD_THREAD flag for pidfd_open(2) was added in Linux 6.9 (see [1]).
Add a TODO to describe the nuances of using poll/epoll/select
with a pidfd referring to a process vs a thread.
[1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64bef697d33b>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20251013191049.193375-2-kolyshkin@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Carlos O'Donell says based on the context, it should be the former link
from that day.
Update the link accordingly.
Cc: Carlos O'Donell <carlos@redhat.com>
Link: <https://lore.kernel.org/all/710e8f05-b0b3-489a-9e89-8967cf6a9e70@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Message-ID: <20250915141305.906440-5-bigeasy@linutronix.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Available since Linux 6.9 [1]. Documented in [2] (added by [3]).
[1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83b290c9e3b5d95891f>
[2]: <https://github.com/brauner/man-pages-md/blob/main/clone.md>
[3]: <https://github.com/brauner/man-pages-md/pull/4>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Message-ID: <20251008020031.1215030-2-kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <20250925135215.1648059-1-kele@cs.columbia.edu>
Acked-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove spaces before a tab (except in a few cases).
Reported-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
attribute-parameter distinction
This was not particularly well documented in mount(8) nor mount(2), and
since this is a fairly notable aspect of the new mount API, we should
probably add some words about it.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-8-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is a new API added in Linux 6.15, and is effectively just a minor
expansion of open_tree(2) in order to allow for MOUNT_ATTR_IDMAP to be
changed for an existing ID-mapped mount. glibc does not yet have a
wrapper for this.
While working on this man-page, I discovered a bug in open_tree_attr(2)
that accidentally permitted changing MOUNT_ATTR_IDMAP for extant
detached ID-mapped mount objects. This is definitely a bug, but there
is no need to add this to BUGS because the patch to fix this has already
been accepted (slated for 6.18, and will be backported to 6.15+).
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-7-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
[alx: amend some examples: s/open_tree/&_attr/]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-6-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-5-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-4-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-3-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
[alx: s/name/key/; ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-2-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is loosely based on the original documentation written by David
Howells and later maintained by Christian Brauner, but has been
rewritten to be more from a user perspective (as well as fixing a few
critical mistakes).
Co-authored-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Co-authored-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250925-new-mount-api-v5-1-028fb88023f2@cyphar.com>
Reviewed-by: Askar Safin <safinaskar@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Message-ID: <3589b9717dacf9e21bea9317da0840ad9095d7f1.1758570745.git.git@hypodyne.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Kele Huang <kele@cs.columbia.edu>
Message-ID: <20250922035934.446271-6-kele@cs.columbia.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Kele Huang <kele@cs.columbia.edu>
Message-ID: <20250922035934.446271-5-kele@cs.columbia.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Kele Huang <kele@cs.columbia.edu>
Message-ID: <20250922035934.446271-4-kele@cs.columbia.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Kele Huang <kele@cs.columbia.edu>
Message-ID: <20250922035934.446271-3-kele@cs.columbia.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Kele Huang <kele@cs.columbia.edu>
Message-ID: <20250922035934.446271-2-kele@cs.columbia.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And fix related issues while at it.
Silence false positives with \&.
Reported-by: `make lint-man-semnl`
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
All of the other new mount API docs have this lead-in sentence in order
to make this set of APIs feel a little bit more cohesive. Despite being
a bit of a latecomer, mount_setattr(2) is definitely part of this family
of APIs and so deserves the same treatment.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250919-new-mount-api-v4-8-1261201ab562@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This silences -Wunterminated-string-initialization.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This silences -Wunused-parameter.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
struct to new page mount_attr(2type)
As with open_how(2type), it makes sense to move this to a separate man
page. In addition, future man pages added in this patchset will want to
reference mount_attr(2type).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250919-new-mount-api-v4-1-1261201ab562@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
I based these changes on kernel commits [1], [2]. Man-page wording
changes inspired by [3]. Rationale for the syscall itself is from [4].
[1] linux.git 9dfa23c8de925041b7b45637a1a80a98a22f19dd
("quota: Add mountpath based quota support")
[2] linux.git 64c2c2c62f92339b176ea24403d8db16db36f9e6
("quota: Change quotactl_path() systcall to an fd-based one")
[3] <https://lore.kernel.org/all/20210304123541.30749-4-s.hauer@pengutronix.de/>
[4] <https://lwn.net/Articles/859679/>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: trillian <trillian@r9.pm>
Message-ID: <d89a3f923f2954d161a8d60e3002e1496d3327d5.1757174497.git.trillian@r9.pm>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Update with missing si_code values from Linux v6.16's
"include/uapi/asm-generic/siginfo.h".
Signed-off-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Message-ID: <20250909191357.44951-1-thiago.bauermann@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: iwyu(1)
Fixes: 0e7a39804a3c (2025-08-20; "man/: EXAMPLES: Use err(3) and errc(3bsd) instead of similar macros")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Most of these are false positives, in the sense that a line break is
escaped, and the matching quote is in the next source line.
However, let's remove those escaped line breaks, which make reading the
source more difficult. For this, rename some parameters to be shorter,
and allow some lines to go slightly past the 80-column right margin.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add a description of the RWF_DONTCACHE IO flag, which tells the kernel
that any page cache instantiated by this IO, should be dropped when the
operation has completed.
Reported-by: Christoph Hellwig <hch@infradead.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: linux-fsdevel@vger.kernel.org
Co-authored-by: Jens Axboe <axboe@kernel.dk>
[alx: editorial improvements; srcfix, ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Be consistent with the lowercase used elsewhere in the document.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Here we fix the only remaining mention of "mountpoint"
in all man pages
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250826083227.2611457-3-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
My edit is based on experiments and reading Linux code.
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250826083227.2611457-2-safinaskar@zohomail.com>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Based on the date in the comment, the here provided URLs should point to
the mails that the gmane URL no longer can.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Message-ID: <20250829160200.756194-4-bigeasy@linutronix.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These cases were found with a script:
$ grep -rn -P '^[^. #][^:%#]*[a-z] *[a-z][^;=%:]*$'
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
File descriptors are commonly called 'fd'. 'fildes' is weird and
confusing.
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Current version says that pread(2) and pwrite(2) only ever existed in
avr32 and blackfin archs, which were removed from kernel.
This is not true. pread(2) and pwrite(2) are present in modern Linux
for all archs. They were merely renamed to pread64(2) and pwrite64(2)
in Linux 2.6, as explained in big table in this manual page.
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250819161000.768159-3-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There is pre-existing logic that appears to be undocumented for an
mremap() shrink operation, where it turns out that the usual 'input
range must span a single mapping' requirement no longer applies.
In fact, it turns out that the input range specified by [old_address,
old_address + old_size) may span any number of mappings.
If shrinking in-place (that is, neither the MREMAP_FIXED nor
MREMAP_DONTUNMAP flags are specified), then the new span may also span
any number of VMAs - [old_address, old_address + new_size).
If shrinking and moving, the range specified by [old_address,
old_address + new_size) must span a single VMA.
There must be at least one VMA contained within the [old_address,
old_address + old_size) range, and old_address must be within the range
of a VMA.
Explicitly document this.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <ab2264d8c29d103d400c028f0417cada002ffc11.1754924278.git.lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
array parameters
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>
|
|
These functions are quite portable. And if one doesn't have them for
some reason (but libbsd has been ported to many systems), one can write
them easily as macros, anyway.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The .ru_maxrss member was documented as using "kilobytes" as its unit.
However, the value is actually in multiples of 1024 bytes, which is
correctly referred to as "kibibytes" (KiB) according to the IEC
standard.
Message-ID: <20250818075905.40146-1-himself65@outlook.com>
Cc: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It doesn't provide any macros, as said later in the page. The
programmer must either define the macros itself, or use the raw values.
Fixes: e5a173829179 (2021-06-20; "syslog.2: Use syscall(SYS_...); for raw system calls")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=220273>
Reported-by: Nathaniel Manista <nathaniel@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document the new behaviour introduced in Linux 6.17 whereby it is now
possible to move multiple mappings in a single operation, as long as the
operation is purely a move, that is, old_size == new_size and
MREMAP_FIXED is specified.
This change also explains the limitations of this method and the
possibility of partial failure.
Finally, we pluralise language where it makes sense to so the documentation
does not contradict either this new capability nor the pre-existing edge
case.
Example code is enclosed below demonstrating the behaviour which is now
possible:
#define _GNU_SOURCE
#include <err.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
int
main(void)
{
void *ptr, *tgt_ptr;
size_t page_size;
page_size = sysconf(_SC_PAGESIZE);
ptr = mmap(NULL, 10 * page_size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
if (ptr == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
tgt_ptr = mmap(NULL, 10 * page_size, PROT_NONE,
MAP_ANON | MAP_PRIVATE, -1, 0);
if (tgt_ptr == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
/* Unmap every other page. */
for (int i = 1; i < 10; i += 2)
munmap(ptr + i * page_size, page_size);
/* Now move all 5 distinct mappings to tgt_ptr. */
ptr = mremap(ptr, 10 * page_size, 10 * page_size,
MREMAP_MAYMOVE | MREMAP_FIXED, tgt_ptr);
if (ptr == MAP_FAILED)
err(EXIT_FAILURE, "mremap");
exit(EXIT_SUCCESS);
}
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <4e0c992a6374e417367475e3b3bbbc9d43380f4c.1754924278.git.lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In preparation for discussing newly introduced mremap() behaviour to
permit the move of multiple mappings at once, add a section to the
this manual page to describe these operations in general.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <0a5d0d6e9f75e8e2de05506f73c41b069d77de36.1754924278.git.lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Christopher Bazley <chris.bazley.wg14@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Askar Safin <safinaskar@zohomail.com>
Cc: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
glibc 2.36 added syscall wrappers for the entire family of fd-based
mount syscalls, including mount_setattr(2). Thus it's no longer
necessary to instruct users to do raw syscall(2) operations.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Cc: <linux-api@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: "Michael T. Kerrisk" <mtk.manpages@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jan Kara <jack@suse.cz>
Cc: Askar Safin <safinaskar@zohomail.com>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Message-ID: <20250807-new-mount-api-v2-1-558a27b8068c@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250724-openat2-cached-note-v1-1-037e7398f797@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
While RESOLVE_BENEATH was based on FreeBSD's O_BENEATH, there was a
well-known safety issue in O_BENEATH that we explicitly avoided
replicating -- FreeBSD would only verify whether the lookup escaped the
dirfd *at the end of the path lookup*.
This meant that even with O_BENEATH, an attacker could gain information
about the structure of the filesystem outside of the dirfd through
timing attacks or other side-channels.
Once Linux had RESOLVE_BENEATH, FreeBSD implemented O_RESOLVE_BENEATH to
mimic the same behaviour[1] and eventually removed O_BENEATH entirely
from their system[2]. It seems prudent to provide this epilogue in the
HISTORY section of the openat2(2) man page (the FreeBSD man page does
for open(2) not reference this historical connection with Linux at all,
as far as I can tell).
Link: [1] <https://reviews.freebsd.org/D25886>
Link: [2] <https://reviews.freebsd.org/D28907>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250721-openat2-history-v1-1-994936dd224a@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
add link pages
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
F_{G,S}ETSIG from fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
F_{G,S}ET{,_FILE}_RW_HINT from fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
F_DUPFD_CLOEXEC from fcntl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since exp is a library function, this is a reserved identifier, which
should not be used as a variable name / parameter.
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Elliott Hughes <enh@google.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Cc: Walter Harms <wharms@bfs.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Terence Kelly <tpkelly@eecs.umich.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Previously, many people confused these for actual parameters, since it's
hard to distinguish a ',' from ';'. By removing bold/italics from
these, it will be easier to distinguish them.
The cases have been found with a script:
$ find -type f \
| xargs grep -l '^\.TH ' \
| sort \
| xargs mansect SYNOPSIS \
| man /dev/stdin \
| grep -e '^[^ ]' -e '[^ ]( [^ )].*[^)];' \
| less;
Reported-by: Mark Naughton <mnaughto@redhat.com>
Suggested-by: Mark Harris <mark.hsj@gmail.com>
Acked-by: Mark Naughton <mnaughto@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Historically, Linux systems did not support the AT_SYMLINK_NOFOLLOW flag
to fchmodat(2). glibc added userspace emulation support in glibc 2.32,
and Linux gained native support in 6.5. See glibc.git 6b89c385d8bd
(2020-02-12; "io: Implement lchmod using fchmodat [BZ #14578]") and
linux.git 09da082b07bb (2023-07-27; "fs: Add fchmodat2()").
Signed-off-by: Benjamin Peterson <benjamin@locrian.net>
Message-ID: <20250619051342.145412-2-benjamin@locrian.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
XFS supports atomic writes - or untorn writes - based on two different
methods:
- HW offload in the disk
- FS method based on out-of-place writes
The value reported in stx_atomic_write_unit_max will be the max size of the
FS-based method.
The max atomic write unit size of the FS-based atomic writes will
typically be much larger than what is capable from the HW offload. However,
FS-based atomic writes will also be typically much slower.
Advertise this HW offload size limit to the user in a new statx member,
stx_atomic_write_unit_max_opt.
We want STATX_WRITE_ATOMIC to get this new member in addition to the
already-existing members, so mention that a value of 0 in
stx_atomic_write_unit_max_opt means that stx_atomic_write_unit_max holds
this optimised limit.
Linux will zero unused statx members, so stx_atomic_write_unit_max_opt
will always hold 0 for older kernel versions which do not support
this FS-based atomic write method (for XFS).
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20250619154455.321848-3-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Align this member in struct statx with the members above it.
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20250619154455.321848-2-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The text was converted from the commit message in linux.git
cf264e1329fb (2023-06-09; "cachestat: implement cachestat syscall").
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf264e1329fb0307e044f7675849f9f38b44c11a>
Signed-off-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Matteo Croce <teknoraver@meta.com>
Message-ID: <20250611141350.1829-1-technoboy85@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The documentation and behaviour is indentical to the equivalent flag for
fchownat(2).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250619-fchmod-empty-path-v1-1-feff2c63abe4@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Message-ID: <20250602140104.2769223-2-bigeasy@linutronix.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Corresponding code is in drivers/tty/vt/vt_ioctl.c.
New in Linux v6.16.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Message-ID: <4n723o1q-pr52-319q-nsr7-6442387s12s2@onlyvoer.pbz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 0569afbbccd6 (2023-08-17; "proc*.5: Make sashimi")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <c28f98b90ff40c3944aaa3189627d795e0c2d9f6.1748714599.git.nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
sysctl_hugetlb_shm_group is the name of the variable in "mm/hugetlb.c".
Fixes: 090fdddb4342 (2021-05-17; "memfd_create.2, mmap.2, shmget.2: Document the EPERM for huge page allocations")
Fixes: 6cee0ddeb414 (2021-05-17; "proc.5: Document /proc/sys/vm/sysctl_hugetlb_shm_group")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <22436441b7bac0177213c99c55187c4af085d4ca.1748714599.git.nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
ar
|
|
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>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_WAIT_REQUEUE_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_CMP_REQUEUE_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_UNLOCK_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_TRYLOCK_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_CMP_REQUEUE from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And be more explicit about the one case that's different.
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.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
getpid() is superfluous here.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <v5p4zfqrepnrorszmuie47aiulivcykicxuhtxfkqhrq5t3cis@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
proc(5) was split into many small pages recently.
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 3dfcc11d4630 (2015-12-15; "futex.2: Expand description of FUTEX_CMP_REQUEUE")
Fixes: 8297383e9eeb (2015-12-15; "futex.2: Clean-ups and FIXME removeal after feedback from Thomas Gleixner")
Reported-by: Jens Gustedt <jens.gustedt@inria.fr>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The kernel sign-extends eax before dispatching syscalls.
From arch/x86/entry/entry_64.S:
> movslq %eax, %rsi
> IBRS_ENTER
> UNTRAIN_RET
> CLEAR_BRANCH_HISTORY
>
> call do_syscall_64 /* returns with IRQs disabled */
This patch updates syscall.2 to document this. ARM64 exhibits a
similar behavior (w8 is extended), which is already documented.
Signed-off-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Message-ID: <20250518234507.404608-1-benjamin.p.kallus.gr@dartmouth.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ grep -rl 'The authors of the Linux man-pages' \
| xargs sed -i '/Copyright, The authors of the Linux man-pages project/s/The/the/';
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Rename the file CREDITS => AUTHORS
- 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>
|
|
support it
Link: <https://lore.kernel.org/all/20200515160342.GE23230@ZenIV.linux.org.uk/>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And use 'pathname' in the descriptions.
'pathname' is the POSIXly correct term, and 'path' is a reasonable
abbreviation for it in parameter names.
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In linux.git b758fe6df50d (2023-06-09; "mm/secretmem: make it on by
default") memfd_secret was updated to be enabled by default.
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Message-ID: <20250428020252.1569621-1-tweek@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The output shown for the example program listed /tmp/b twice;
the second /tmp/b should be /tmp/c.
Fixes: 336bd62ba24c (2021-03-21; "close_range.2: Include a better example program")
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Message-ID: <e8519ea77798c68944717bc6437052a1119a911f.camel@armitage.org.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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
Signed-off-by: Jann Horn <jannh@google.com>
Message-ID: <20250429164359.2699330-1-jannh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
UFFDIO_MOVE
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.
[1] <https://lore.kernel.org/all/20231206103702.3873743-3-surenb@google.com/>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Message-ID: <20250423195309.2841410-1-surenb@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Lightweight guard region support has been extended in Linux 6.15,
permitting the use of these features for file-backed and read-only
mappings.
Update the description for these operations in the madvise manpage to
describe the changed behaviour.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <20250423183105.116978-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Used to subscribe for notifications for when mounts
are attached/detached from a mount namespace.
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250404104723.1709188-2-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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>
|
|
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>
|
|
This flag from v6.13 allows reporting detailed errors on failure to
open a file descriptor for an event.
This API was backported to LTS kernels v6.12.4 and v6.6.66.
Cc: Krishna Vivek Vitta <kvitta@microsoft.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331133959.1436376-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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>
|
|
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>
|
|
It's just as informative, and takes less space.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
While doing this global change, fix other minor issues found nearby.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It was probably a typo, since in sendto(2) this is (..., NULL, 0).
Signed-off-by: Peter Radisson <radisson97@web.de>
Message-ID: <189ef077-18f4-43a3-9008-286a75e7bd91@web.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 18e7c4597c4e (2024-11-17; "man/: Terminology consistency reforms (n, size, length)")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=219921>
Reported-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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>
|
|
array parameters
This syntax has been proposed for standardization in N3433.
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3433.pdf>
Cc: Christopher Bazley <chris.bazley.wg14@gmail.com>
Cc: Martin Uecker <uecker@tugraz.at>
Cc: Joseph Myers <josmyers@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 2904e040ded2 (2025-02-02; "man/man2/mkdir.2: ERRORS: Add EOVERFLOW")
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <6DF9A4EE0A868FB4+20250303095057.92138-1-chenlinxuan@uniontech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Browsing a header file in the kernel source and saw the memory policy
enum used for mbind() and set_mempolicy() using an entry that I didn't
recognize. I man 2'd both system calls and didn't see an entry for
MPOL_PREFERRED_MANY. The commit on the enum entry:
linux.git b27abaccf8e8 (2021-09-02; "mm/mempolicy: add
MPOL_PREFERRED_MANY for multiple preferred nodes")
The commit message gives the rationale as to why the MPOL_PREFERRED_MANY
mode would be beneficial. Giving the ability to set the memory policy
to target different tiers of memory over various NUMA nodes.
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Matthew Cassell <mcassell411@gmail.com>
Message-ID: <20250220225232.2138-1-mcassell411@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The DESCRIPTION says:
If *sig* is 0, then no signal is sent, but existence and
permission checks are still performed; this can be used to
check for the existence of a process ID.
On the other hand, the `RETURN VALUE` section contradicted that.
On success (at least one signal was sent), zero is returned. On
error, -1 is returned...
How can I get 0 when providing sig=0, if no signal was actually
sent, which is the criteria for success of this call???
Reported-by: Amit Pinhas <amitpinhass@gmail.com>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Amit Pinhas <amitpinhass@gmail.com>
Message-ID: <a4fa37e0fc89a3c99982ace3fe381991ebe85b00.1739393685.git.amitpinhass@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <647EBDB1A8DE7507+20250121031351.548052-1-chenlinxuan@uniontech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
mkdir(2) and mkdirat(2) might set errno to EOVERFLOW when UID or GID
mapping has not been configured.
Here's a small program that shows this behavior:
#define _GNU_SOURCE
#include <err.h>
#include <sched.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
static int
childFunc(void *_)
{
if (mount("tmpfs", "/tmp", "tmpfs", 0, NULL))
err(EXIT_FAILURE, "mount");
if (mkdir("/tmp/test", 0755) == -1)
err(EXIT_FAILURE, "mkdir");
return 0;
}
#define STACK_SIZE (1024 * 1024)
int
main(void)
{
char *stack; /* Start of stack buffer */
char *stackTop; /* End of stack buffer */
pid_t pid;
stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK,
-1, 0);
if (stack == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
stackTop = stack + STACK_SIZE;
pid = clone(childFunc, stackTop, CLONE_NEWUSER |
CLONE_NEWNS | SIGCHLD, NULL);
if (munmap(stack, STACK_SIZE) == -1)
err(EXIT_FAILURE, "munmap");
if (pid == -1)
err(EXIT_FAILURE, "clone");
if (waitpid(pid, NULL, 0) == -1)
err(EXIT_FAILURE, "waitpid");
exit(EXIT_SUCCESS);
}
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=036d523641c66bef713042894a17f4335f199e49>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <F22A2B1500170B63+20250202135733.11800-1-chenlinxuan@uniontech.com>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250130050625.3356602-1-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The _exit(2) function is a better choice for exiting a child in many
cases. Most prominently it avoids calls of functions registered with
atexit(3) by the parent.
There are valid reasons to call exit(3) and the example is actually one
of them: flush FILE-based output. Since atexit(3) is never called, we
could just stay with exit(3).
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Message-ID: <tngwcffbrzbfkj6vrxgxpekrp3bzuftdy2mzow56xyfkrcna2w@nbgr2ourerxo>
Link: <https://github.com/shadow-maint/shadow/pull/1171>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document the new STATX_DIO_READ_ALIGN flag and the new
stx_dio_read_offset_align field guarded by it.
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Chandan Babu R <chandan.babu@oracle.com>
Cc: Hongbo Li <lihongbo22@huawei.com>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <linux-nilfs@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: <linux-xfs@vger.kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Message-ID: <20250109083226.GA22264@lst.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Dan Albert <danalbert@google.com>
Signed-off-by: Elliott Hughes <enh@google.com>
Message-ID: <CAJgzZoqAOpJajmAnr-i9h3sPC8F_Uu0A+3eg4nkP+xTAV5fPGg@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Only singlethreaded processes can setns into time ns.
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/namespace.c?h=v6.12#n309>
Signed-off-by: Michal Clapinski <mclapinski@google.com>
Message-ID: <20250107135700.3995936-1-mclapinski@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
hard to read
At least if you use typeof().
Acked-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
An exception of good taste is structure members. There, for alignment
reasons, traditional syntax seems more appropriate usually.
Suggested-by: Jorenar <dev@jorenar.com>
Cc: Martin Uecker <uecker@tugraz.at>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add a space after a cast.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document flag introduced in Linux v6.9.
Cc: Rich Felker <dalias@libc.org>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241126090847.297371-3-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document flag introduced in Linux v6.9.
Cc: Rich Felker <dalias@libc.org>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241126090847.297371-2-john.g.garry@oracle.com>
[alx: wfix, srcfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Linux v6.13 will include atomic write support for xfs and ext4, so
update STATX_WRITE_ATOMIC commentary to mention that.
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: <ritesh.list@gmail.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20241203145359.2691972-1-john.g.garry@oracle.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/20241214180423.2thsuyyfosrlyajb@devuan/T/#u>
Reported-by: Alejandro Colomar <alx@kernel.org>
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Jann Horn <jannh@google.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <20241206113418.14327-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Lightweight guard region support has been added to Linux 6.13, which
adds MADV_GUARD_INSTALL and MADV_GUARD_REMOVE flags to the madvise()
system call. Therefore, update the manpage for madvise() and describe
these operations.
Reviewed-by: Jann Horn <jannh@google.com>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-Id: <20241205104125.67518-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
If the page could not be offlined madvise will report EBUSY.
This might occur if the page is currently in use or locked.
Signed-off-by: Tyonnchie Berry <tyberry@redhat.com>
Message-Id: <Z0XzU9R9Kx0RoeUG@redhat.com>
Acked-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
[alx: wfix, ffix, and other tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since Linux 6.13 it has become possible to use all madvise flags when
targeting the calling process.
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-Id: <20241129164422.89837-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
POSIX_FADV_NOREUSE is now supported in Linux. Update text regarding
former no op behavior. Indicate the readahead policy and treatment of
file pages read with this flag.
Link: <https://lore.kernel.org/linux-mm/20221230215252.2628425-2-yuzhao@google.com/>
Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
Message-Id: <20241120045214.1294799-1-yuanchu@google.com>
Acked-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use 'length' for the lenght of a string.
Use 'n' for the number of elements.
Use 'size' for the number of bytes. (And in wide-character string
functions, 'size' also refers to the number of wide characters.)
The change is quite large, and I might have made some mistakes.
But overall, this should improve consistency in use of these terms.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The "+1" is wrong, since the kernel already increments the last_id.
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Message-ID: <20241113-main-v1-1-a6b738d56e55@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4609387859f0281951f5e476d9f76d7fb9ab321>
Cc: Brian Geffon <bgeffon@google.com>
Cc: <linux-mm@kvack.org>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Message-ID: <20241111061139.206404-1-alexhenrie24@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
EADDRNOTAVAIL is not a socket specific error
Message-ID: <eee2fe5c6c3d6203e1e528a998b0de2c.philipp@bureaucracy.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clarify the conditions for getting the -EXDEV and -ENODEV errors.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-ID: <20241105144939.181820-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
dup2(2) could return ENOMEM under extreme condition. For example, when
sysctl fs.nr_open=2147483584, and RLIMIT_NOFILE is also 2147483584.
The following program fails with ENOMEM:
int
main(void)
{
if (dup2(0, 2000000000) == -1)
err(1, "dup2");
return 0;
}
This ENOMEM comes from an allocation error here:
<https://elixir.bootlin.com/linux/v6.1/source/mm/util.c#L596>
ENOMEM is already documented for open(2).
Signed-off-by: Levi Zim <rsworktech@outlook.com>
[alx: tweak commit message]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
When looking through the errors of socket(2) I noticed that it specifies
the selected underlying protocol may extend the potential errors
returned. For example, using AF_PACKET and SOCK_RAW can return EPERM if
the user does not have CAP_NET_RAW or uid 0 (this is all fully
documented).
However, AF_PACKET and SOCK_RAW extend the potential errors returned
from bind(2) as well. For example, calling bind(2) with an invalid
sll_ifindex set on the sock_addr passed in will return ENODEV.
While this possibility is documented in the raw(7) manual page, the
bind(2) manual page does not mention that its potential set of errors
can be extended by the underlying protocol. This patch simply
duplicates the relevant language from the socket(2) manual page to the
bind(2) manual page.
It is possible further extensions for send(2), recv(2), setsockopt(2),
etc. are also undocumented, but I have not yet verified this.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Prepare for `MR` macro migration.
Explicitly set the width of certain table columns so that they don't
change or cause "can't break line" warnings from troff(1) when the rows
are converted to use text blocks.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Message-ID: <20240831182045.kvhjjxbztnhudjga@illithid>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://git.kernel.org/torvalds/c/0ef625bba6fb>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Message-ID: <20240827102518.43332-2-xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This example demonstrates the use of off_out, which the tee(2) example
doesn't use.
Here's a run of the program:
$ gcc -Wall -Wextra splice.c
$ ./a.out
New offset is 22
$ echo $?
0
$ hd out
00000000 00 00 00 00 00 00 00 00 00 00 48 65 6c 6c 6f 2c |..........Hello,|
00000010 20 77 6f 72 6c 64 | world|
00000016
Link: <https://lore.kernel.org/linux-man/4xw464u2munxbgujopgfggxvnvgxa2b5lh35eriaeziapaa4uq@z6jmdim6f5mo/T/#t>
Co-developed-by: Absee Seeab <doesnt.look.like.temp.mail@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/4xw464u2munxbgujopgfggxvnvgxa2b5lh35eriaeziapaa4uq@z6jmdim6f5mo/T/#t>
Reported-by: Absee Seeab <doesnt.look.like.temp.mail@gmail.com>
Co-developed-by: Absee Seeab <doesnt.look.like.temp.mail@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
KEYCTL_NEGATE.2const, KEYCTL_REJECT.2const: Split KEYCTL_INSTANTIATE*, KEYCTL_NEGATE, KEYCTL_REJECT from keyctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|