aboutsummaryrefslogtreecommitdiffstats
path: root/man/man2
AgeCommit message (Collapse)AuthorFilesLines
7 daysman/man2/mremap.2: Fix incorrect reference to VM_MIXEDMAPLorenzo Stoakes1-1/+1
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>
2025-11-09man/man2/flock.2: Mention non-atomicity w.r.t closeAlexander Monakov1-0/+18
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>
2025-11-09man/man2/copy_file_range.2: glibc no longer provides fallback after 2.30Wes Gibbs1-4/+9
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>
2025-11-09man/man2/madvise.2, man/man2const/PR_[GS]ET_THP_DISABLE.2const: document ↵Usama Arif1-2/+4
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>
2025-10-29man/man2/gettimeofday.2: Declare functions with [[deprecated]]Collin Funk1-0/+6
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>
2025-10-29man/man2/: STANDARDS: Update system calls for POSIX.1-2024Alejandro Colomar102-212/+194
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/open.2: Simplify STANDARDS, and move part of it to HISTORYAlejandro Colomar1-26/+16
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/: Update fork(2) for POSIX.1-2024, and add references to _Fork(3)Alejandro Colomar2-1/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/close.2: CAVEATS: Document divergence from POSIX.1-2024Alejandro Colomar1-15/+6
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>
2025-10-29man/man2/close.2: Move part of NOTES into a new CAVEATS sectionAlejandro Colomar1-8/+8
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/socket.2: VERSIONS: POSIX.1-2024 specifies SOCK_CLOFORK, but Linux ↵Alejandro Colomar1-0/+4
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>
2025-10-29man/man2/: Fix STANDARDS and HISTORYAlejandro Colomar3-3/+3
Fixes: 4131356cdab8 (2023-03-30; "man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-29man/man2/pidfd_send_signal.2: Describe flagsKir Kolyshkin1-3/+60
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>
2025-10-29man/man2/pidfd_open.2: Document PIDFD_THREADKir Kolyshkin1-6/+36
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>
2025-10-15man/man2/futex.2: Update the link reference again.Sebastian Andrzej Siewior1-1/+1
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>
2025-10-12man/man2/clone.2: Document CLONE_PIDFD | CLONE_THREADKir Kolyshkin1-5/+11
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>
2025-10-06man/man2/fanotify_mark.2: grfixKele Huang1-1/+1
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>
2025-10-05man/: ffixAlejandro Colomar3-6/+6
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>
2025-10-01man/man2/{fsconfig,mount_setattr}.2: NOTES: Add note about ↵Aleksa Sarai2-0/+51
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>
2025-10-01man/man2/open_tree{,_attr}.2: Document open_tree_attr(), and add link pageAleksa Sarai2-0/+192
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>
2025-10-01man/man2/open_tree.2: Add pageAleksa Sarai1-0/+518
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>
2025-10-01man/man2/move_mount.2: Add pageAleksa Sarai1-0/+646
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>
2025-10-01man/man2/fsmount.2: Add pageAleksa Sarai1-0/+231
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>
2025-10-01man/man2/fsconfig.2: Add pageAleksa Sarai1-0/+729
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>
2025-10-01man/man2/fspick.2: Add pageAleksa Sarai1-0/+343
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>
2025-10-01man/man2/fsopen.2: Add pageAleksa Sarai1-0/+385
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>
2025-10-01man/man2/getsockopt.2: tfixCody Harris1-1/+1
Message-ID: <3589b9717dacf9e21bea9317da0840ad9095d7f1.1758570745.git.git@hypodyne.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-10-01man/man2/msgop.2: grfixKele Huang1-1/+1
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>
2025-10-01man/man2/rt_sigqueueinfo.2: grfixKele Huang1-1/+1
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>
2025-10-01man/man2/unshare.2: grfixKele Huang1-1/+1
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>
2025-10-01man/man2/setns.2: grfixKele Huang1-1/+1
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>
2025-10-01man/man2/getitimer.2: grfixKele Huang1-1/+1
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>
2025-09-21man/: Use semantic newlinesAlejandro Colomar165-827/+1273
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>
2025-09-21man/man2/mount_setattr.2: Mirror opening sentence from fsopen(2)Aleksa Sarai1-1/+5
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>
2025-09-20man/man2/splice.2: EXAMPLES: Use [[gnu::nonstring]]Alejandro Colomar1-1/+2
This silences -Wunterminated-string-initialization. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20man/man2/clock_getres.2: EXAMPLES: Don't name unused parametersAlejandro Colomar1-1/+1
This silences -Wunused-parameter. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20man/: EXAMPLES: Use NITEMS() consistentlyAlejandro Colomar4-7/+9
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20man/man2/mount_setattr.2, man/man2type/mount_attr.2type: Move mount_attr ↵Aleksa Sarai1-12/+5
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>
2025-09-20man/man2/quotactl[_fd].2: Document quotactl_fd() syscall; add link pagetrillian2-5/+74
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>
2025-09-14man/man2/sigaction.2: pfixAlejandro Colomar1-7/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-14man/man2/sigaction.2: Update si_code list with Linux v6.16Thiago Jung Bauermann1-2/+49
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>
2025-09-09man/: EXAMPLES: Fix includesAlejandro Colomar2-1/+2
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>
2025-09-07man/: Address diagnostic about mismatched quotesAlejandro Colomar11-48/+39
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>
2025-09-06man/man2/readv.2: Document RWF_DONTCACHEAlejandro Colomar1-0/+39
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>
2025-09-06man/man2/sched_rr_get_interval.2: ffixAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man2/shmget.2: Fix broken references to proc_sys_vm(5)Alejandro Colomar1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man2/syscalls.2: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man2/ioctl_pipe.2: grfixAlejandro Colomar1-1/+1
Be consistent with the lowercase used elsewhere in the document. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man2/listmount.2: ERRORS: Clarify EPERMAlejandro Colomar1-1/+3
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-06man/man2/mount.2: tfix (mountpoint => mount point)Askar Safin1-1/+1
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>
2025-09-06man/man2/mount.2: Expand and clarify docs for MS_REMOUNT | MS_BINDAskar Safin1-4/+20
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>
2025-09-06man/man2/futex.2: Recycle two gmane URLsSebastian Andrzej Siewior1-2/+2
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>
2025-08-29man/: wsfixAlejandro Colomar6-7/+8
These cases were found with a script: $ grep -rn -P '^[^. #][^:%#]*[a-z] *[a-z][^;=%:]*$' Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-24man2/: Use the common name 'fd' instead of 'fildes'Alejandro Colomar2-3/+3
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>
2025-08-24man/man2/open.2: wfix, ffixAlejandro Colomar1-1/+4
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-22man/man2/syscalls.2: Remove pread and pwrite from list of arch-specific syscallsAskar Safin1-16/+0
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>
2025-08-20man/man2/mremap.2: Describe previously undocumented shrink behaviourLorenzo Stoakes1-2/+31
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>
2025-08-20man/man2/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of ↵Alejandro Colomar2-4/+6
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>
2025-08-20man/: EXAMPLES: Use err(3) and errc(3bsd) instead of similar macrosAlejandro Colomar6-54/+42
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>
2025-08-19man/man2/getrusage.2: Use correct unit (KiB) for .ru_maxrssAlex Yang1-1/+1
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>
2025-08-19man/man2/syslog.2: SYNOPSIS: Remove incorrect includeAlejandro Colomar1-1/+0
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>
2025-08-19man/man2/mremap.2: Describe multiple-mapping moveLorenzo Stoakes1-11/+57
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>
2025-08-19man/man2/mremap.2: Explicitly document the simple move operationLorenzo Stoakes1-0/+14
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>
2025-08-10man/man2/getgroups.2: setgroups(2): Don't use NULL as a 0-length arrayAlejandro Colomar1-2/+2
Reported-by: Christopher Bazley <chris.bazley.wg14@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-09man/man2/mount_setattr.2: ffixAlejandro Colomar1-1/+1
Reported-by: Askar Safin <safinaskar@zohomail.com> Cc: Aleksa Sarai <cyphar@cyphar.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-08-07man/man2/mount_setattr.2: Document glibc >= 2.36 syscall wrappersAleksa Sarai1-38/+7
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>
2025-07-24man/man2/openat2.2: Update RESOLVE_CACHED to mention kernel versionAleksa Sarai1-1/+2
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>
2025-07-21man/man2/openat2.2: HISTORY: Include epilogue about FreeBSDAleksa Sarai1-0/+13
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>
2025-07-20man/man2/fcntl.2: Tweak after making sashimi of this pageAlejandro Colomar1-15/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl_locking.2, man/man2const/F_*.2const: Tweak after split, and ↵Alejandro Colomar1-6/+6
add link pages Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl{,_locking}.2: Split locking operations from fcntl(2)Alejandro Colomar2-694/+757
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GETSIG.2const: Split F_{G,S}ETOWN*, ↵Alejandro Colomar1-440/+12
F_{G,S}ETSIG from fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GETLEASE.2const: Split F_{G,S}ETLEASE from ↵Alejandro Colomar1-166/+4
fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_NOTIFY.2const: Split F_NOTIFY from fcntl(2)Alejandro Colomar1-132/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GET_RW_HINT.2const: Split ↵Alejandro Colomar1-79/+7
F_{G,S}ET{,_FILE}_RW_HINT from fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GET_SEALS.2const: Split F_{GET,ADD}_SEALS ↵Alejandro Colomar1-206/+3
from fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GETPIPE_SZ.2const: Split F_{G,S}ETPIPE_SZ ↵Alejandro Colomar1-66/+3
from fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-20man/man2/fcntl.2, man/man2const/F_GETFL.2const: Split F_{G,S}ETFL from fcntl(2)Alejandro Colomar1-71/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-19man/man2/fcntl.2, man/man2const/F_GETFD.2const: Split F_{G,S}ETFD from fcntl(2)Alejandro Colomar1-45/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-19man/man2/fcntl.2, man/man2const/F_DUPFD.2const: Split F_DUPFD and ↵Alejandro Colomar1-70/+5
F_DUPFD_CLOEXEC from fcntl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-07-19man/: Replace reserved exp identifierVincent Lefevre1-8/+9
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>
2025-07-19man/man2/clone.2: Move ia64 to HISTORYAlejandro Colomar1-30/+30
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>
2025-07-12man/man2/seccomp.2: Add link to post about using seccomp(2) in filtersAlejandro Colomar1-0/+5
Suggested-by: Terence Kelly <tpkelly@eecs.umich.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-28man/: SYNOPSIS: Don't highlight forward declarations of function parametersAlejandro Colomar36-59/+59
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>
2025-06-28man/man2/chmod.2: Document AT_SYMLINK_NOFOLLOW support in fchmodat(2)Benjamin Peterson1-1/+4
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>
2025-06-28man/man2/statx.2: Add stx_atomic_write_unit_max_optJohn Garry1-1/+20
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>
2025-06-28man/man2/statx.2: Properly align stx_dio_read_offset_alignJohn Garry1-1/+1
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>
2025-06-28man/man2/cachestat.2: Add pageMatteo Croce1-0/+112
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>
2025-06-19man/man2/chmod.2: Document fchmodat(AT_EMPTY_PATH)Aleksa Sarai1-1/+24
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>
2025-06-11man/man2/prctl.2, man/man2const/PR_FUTEX_HASH.2const: Document PR_FUTEX_HASHSebastian Andrzej Siewior1-0/+3
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>
2025-06-11man/man2/ioctl_vt.2: Document VT_GETCONSIZECSRPOSNicolas Pitre1-0/+18
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>
2025-06-05man/: SYNOPSIS: Use array notationAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-31man/man2/: Fix broken references to proc_sys_vm(5)Ahelenia Ziemiańska2-3/+3
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>
2025-05-31man/: Fix name of /proc/sys/vm/hugetlb_shm_groupAhelenia Ziemiańska3-6/+6
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>
2025-05-30man/man2/mbind.2: SYNOPSIS: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/: SYNOPSIS: Use array notationAlejandro Colomar2-4/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org> ar
2025-05-30man/man2/open.2: Fix doc for O_CREAT | O_DIRECTORYPaul Eggert1-14/+10
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>
2025-05-30man/man2/futex.2: Tweak after making sashimi of this pageAlejandro Colomar1-55/+12
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_WAIT_REQUEUE_PI.2const: Split ↵Alejandro Colomar1-106/+9
FUTEX_WAIT_REQUEUE_PI from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_CMP_REQUEUE_PI.2const: Split ↵Alejandro Colomar1-185/+7
FUTEX_CMP_REQUEUE_PI from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_UNLOCK_PI.2const: Split ↵Alejandro Colomar1-50/+6
FUTEX_UNLOCK_PI from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_TRYLOCK_PI.2const: Split ↵Alejandro Colomar1-69/+12
FUTEX_TRYLOCK_PI from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_LOCK_PI2.2const: Split FUTEX_LOCK_PI2 ↵Alejandro Colomar1-39/+15
from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_LOCK_PI.2const: Split FUTEX_LOCK_PI ↵Alejandro Colomar1-156/+13
from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_WAIT_BITSET.2const: Split ↵Alejandro Colomar1-152/+10
FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_WAKE_OP.2const: Split FUTEX_WAKE_OP ↵Alejandro Colomar1-160/+3
from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_CMP_REQUEUE.2const: Split ↵Alejandro Colomar1-135/+7
FUTEX_CMP_REQUEUE from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_REQUEUE.2const: Split FUTEX_REQUEUE ↵Alejandro Colomar1-18/+4
from futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_FD.2const: Split FUTEX_FD from futex(2)Alejandro Colomar1-51/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_WAKE.2const: Split FUTEX_WAKE from ↵Alejandro Colomar1-52/+12
futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2, man/man2const/FUTEX_WAIT.2const: Split FUTEX_WAIT from ↵Alejandro Colomar1-112/+13
futex(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2: De-duplicate information about timeoutsAlejandro Colomar1-18/+10
And be more explicit about the one case that's different. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-30man/man2/futex.2: Prepare for sashimiAlejandro Colomar1-20/+17
- 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>
2025-05-30man/man2/sched_setaffinity.2: EXAMPLES: Use 0 instead of getpid()Ahelenia Ziemiańska1-2/+2
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>
2025-05-28man/man2/link.2: Update manual page referenceAlejandro Colomar1-1/+1
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>
2025-05-27man/man2/futex.2: wfixAlejandro Colomar1-2/+8
Suggested-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-27man/man2/futex.2: tfixAlejandro Colomar1-1/+1
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>
2025-05-22man/man2/syscall.2: x86-64 + x32 syscall numbers go in eaxBen Kallus1-2/+2
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>
2025-05-17*: grfixAlejandro Colomar278-278/+278
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>
2025-05-10*, AUTHORS: Consistently refer to authorsAlejandro Colomar278-278/+278
- 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>
2025-05-09man/man2/: VERSIONS: POSIX.1-2024 specifies *_CLOFORK, but Linux doesn't ↵Alejandro Colomar2-0/+10
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>
2025-05-09man/: Consistently use 'path' for parameters referring to pathnamesAlejandro Colomar2-19/+21
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>
2025-05-06*, CREDITS: Unify copyright noticesAlejandro Colomar278-563/+309
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>
2025-05-06man/, CREDITS: Move in-source contribution records to CREDITSAlejandro Colomar176-1282/+16
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>
2025-05-01man/man2/memfd_secret.2: It is now enabled by defaultThiébaud Weksteen1-7/+7
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>
2025-05-01man/man2/close_range.2: EXAMPLES: Correct output of example programQuentin Armitage1-1/+1
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>
2025-05-01man/man2/mmap.2: CAVEATS: Document danger of mappings larger than PTRDIFF_MAXJann Horn1-0/+24
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>
2025-05-01man/man2/ioctl_userfaultfd.2, man/man2const/UFFDIO_MOVE.2const: Document ↵Suren Baghdasaryan1-0/+2
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>
2025-05-01man/man2/madvise.2: Update MADV_GUARD_INSTALL, MADV_GUARD_REMOVE for Linux 6.15Lorenzo Stoakes1-10/+29
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>
2025-04-05man/man?/fanotify*: Document mount namespace eventsAmir Goldstein2-1/+58
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>
2025-04-04man/man?/fanotify*: Reorganize documentation of FAN_FS_ERRORAmir Goldstein1-23/+21
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>
2025-04-02man/man?/fanotify*: Document FAN_PRE_ACCESS eventAmir Goldstein2-2/+17
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>
2025-04-02man/man?/fanotify*: Document FAN_REPORT_FD_ERRORAmir Goldstein1-0/+28
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>
2025-04-02man/man2/open_by_handle_at.2: srcfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-31man/man2/open_by_handle_at.2: name_to_handle_at(): Document the ↵Amir Goldstein1-1/+30
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>
2025-03-31man/man2/open_by_handle_at.2: name_to_handle_at(): Document the ↵Amir Goldstein1-0/+16
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>
2025-03-30man/: Use 'path' instead of 'pathname' for parametersAlejandro Colomar21-428/+434
It's just as informative, and takes less space. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-30man/man2/execve.2: Remove redundant textAlejandro Colomar1-9/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-30man/: srcfix (\fX => \f[X])Alejandro Colomar91-956/+1450
While doing this global change, fix other minor issues found nearby. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-29man/man2/recv.2: Don't use 0 as a null pointer constantPeter Radisson1-1/+1
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>
2025-03-25man/man2/posix_fadvise.2: Consistency fix (len => size)Alejandro Colomar1-3/+3
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>
2025-03-20man/man2/get_mempolicy.2: SYNOPSIS: Use GNU fwd declaration of parameters ↵Alejandro Colomar1-2/+3
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>
2025-03-14man/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of ↵Alejandro Colomar36-77/+132
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>
2025-03-14man/: EXAMPLES: Add missing 'static'Alejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-14man/man2/getsockopt.2: SYNOPSIS: Add missing _Nullable qualifierAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-03-03man/man2/mkdir.2: ffixChen Linxuan1-0/+1
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>
2025-02-21man/man2/{mbind,set_mempolicy}.2: Document MPOL_PREFERRED_MANYMatthew Cassell2-0/+20
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>
2025-02-12man/man2/kill.2: RETURN VALUE: Fix wording issue with sig=0Amit Pinhas1-1/+3
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>
2025-02-10man/man2/clone.2: Use munmap(2) to free 'stack'Alejandro Colomar1-0/+2
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>
2025-02-02man/man2/mkdir.2: ERRORS: Add EOVERFLOWChen Linxuan1-0/+4
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>
2025-02-02man/man2/rt_sigqueueinfo.2: tfix (tid => tgid)Askar Safin1-1/+1
Signed-off-by: Askar Safin <safinaskar@zohomail.com> Message-ID: <20250130050625.3356602-1-safinaskar@zohomail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-14man/man2/fork.2: Add _exit(2) to exampleTobias Stoeckmann1-1/+3
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>
2025-01-11man/man2/statx.2: Document STATX_DIO_READ_ALIGNChristoph Hellwig1-1/+28
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>
2025-01-09man/man2/stat.2: Linux 6.11 allows using NULL with AT_EMPTY_PATH.enh1-1/+3
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>
2025-01-07man/man2/setns.2: Add missing info about time nsMichal Clapinski1-1/+11
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>
2025-01-05man/man2/signal.2: VERSIONS: The typedef-less definition of signal(2) isn't ↵Alejandro Colomar1-2/+2
hard to read At least if you use typeof(). Acked-by: Jorenar <dev@jorenar.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-05man/: Use typeof() to improve readability of function pointer typesAlejandro Colomar3-4/+4
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>
2025-01-05man/man3/: EXAMPLES: wsfixAlejandro Colomar1-1/+1
Add a space after a cast. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-04man/man2/io_submit.2: Document RWF_NOAPPENDJohn Garry1-0/+10
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>
2025-01-04man/man2/readv.2: Document RWF_NOAPPENDJohn Garry1-0/+23
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>
2025-01-04man/man2/statx.2: Update STATX_WRITE_ATOMIC filesystem supportJohn Garry1-0/+9
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>
2024-12-23man/man2/ioctl_pipe.2: SYNOPSIS: Fix $1, which is not an array parameterAlejandro Colomar1-2/+2
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>
2024-12-23man/man2/madvise.2: wfixLorenzo Stoakes1-1/+2
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>
2024-12-14man/man2/get_mempolicy.2: SYNOPSIS: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-14man/man2/: SYNOPSIS: Use array notationAlejandro Colomar2-5/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-13man/: SYNOPSIS: Use typeof() to improve readability of function pointer typesAlejandro Colomar2-7/+8
Suggested-by: Jorenar <dev@jorenar.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-05madvise.2: Add description of MADV_GUARD_INSTALL, MADV_GUARD_REMOVELorenzo Stoakes1-0/+102
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>
2024-12-05madvise.2: MADV_SOFT_OFFLINE requests can report EBUSYtyberry@redhat.com1-0/+7
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>
2024-12-04man/: wfixAlejandro Colomar2-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-12-04process_madvise.2: Describe 6.13 behaviour permitting all madvise flagsLorenzo Stoakes1-1/+7
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>
2024-11-28readlink.2: SYNOPSIS: Use array notationAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-26landlock_create_ruleset.2: SYNOPSIS: Add missing includeAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-22getgroups.2: EXAMPLES: Add example programAlejandro Colomar1-0/+61
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-20posix_fadvise.2: POSIX_FADV_NOREUSE now supported.Yuanchu Xie1-1/+9
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>
2024-11-17man/: Terminology consistency reforms (n, size, length)Alejandro Colomar31-211/+212
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>
2024-11-17getdents.2: ffixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17syscalls.2: tfixAlejandro Colomar1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17sched_get_priority_max.2: pfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-17listmount.2: Fix off-by-one bug in description about continuing the iterationJeff Layton1-1/+1
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>
2024-11-13mremap.2: Update information about MREMAP_DONTUNMAP restrictionsAlex Henrie1-1/+7
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>
2024-11-06bind.2: move EADDRNOTAVAIL to general errorsPhilipp Takacs1-4/+4
EADDRNOTAVAIL is not a socket specific error Message-ID: <eee2fe5c6c3d6203e1e528a998b0de2c.philipp@bureaucracy.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-05fanotify_mark.2, fanotify.7: Update documentation of fanotify w.r.t fsidAmir Goldstein1-6/+21
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>
2024-11-03man/: EXAMPLES: Fix includesAlejandro Colomar2-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-01dup.2: ERRORS: Add ENOMEMLevi Zim1-0/+3
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>
2024-11-01bind.2: ERRORS: Document possible errors from protocolLucas Culverhouse1-0/+2
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>
2024-08-31man/: srcfixG. Branden Robinson1-2/+2
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>
2024-08-28statx.2: Document AT_EMPTY_PATH allows using NULL instead of "" for pathnameXi Ruoyao1-6/+13
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>
2024-08-27splice.2: EXAMPLES: Add example programAlejandro Colomar1-1/+50
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>
2024-08-27splice.2: off_{in,out} are updated by splice(2)Alejandro Colomar1-1/+4
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>
2024-08-21keyctl.2: Tweak after making sashimi of this pageAlejandro Colomar1-6/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_RESTRICT_KEYRING.2const: Split KEYCTL_RESTRICT_KEYRING from ↵Alejandro Colomar1-91/+1
keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_DH_COMPUTE.2const: Split KEYCTL_DH_COMPUTE from keyctl(2)Alejandro Colomar1-278/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_GET_PERSISTENT.2const: Split KEYCTL_GET_PERSISTENT from ↵Alejandro Colomar1-76/+2
keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_INVALIDATE.2const: Split KEYCTL_INVALIDATE from keyctl(2)Alejandro Colomar1-42/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_SESSION_TO_PARENT.2const: Split KEYCTL_SESSION_TO_PARENT ↵Alejandro Colomar1-60/+2
from keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_GET_SECURITY.2const: Split KEYCTL_GET_SECURITY from keyctl(2)Alejandro Colomar1-62/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_ASSUME_AUTHORITY.2const: Split KEYCTL_ASSUME_AUTHORITY from ↵Alejandro Colomar1-80/+2
keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_SET_TIMEOUT.2const: Split KEYCTL_SET_TIMEOUT from keyctl(2)Alejandro Colomar1-47/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_SET_REQKEY_KEYRING.2const: Split KEYCTL_SET_REQKEY_KEYRING ↵Alejandro Colomar1-99/+2
from keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-21keyctl.2, KEYCTL_INSTANTIATE.2const, KEYCTL_INSTANTIATE_IOV.2const, ↵Alejandro Colomar1-170/+12
KEYCTL_NEGATE.2const, KEYCTL_REJECT.2const: Split KEYCTL_INSTANTIATE*, KEYCTL_NEGATE, KEYCTL_REJECT from keyctl(2) Signed-off-by: Alejandro Colomar <alx@kernel.org>