| Age | Commit message (Collapse) | Author | Files | Lines |
|
This is a scripted change:
$ mkdir man/;
$ mv man* man/;
$ ln -st . man/man*;
$ find share/mk/ -type f \
| xargs grep -l '^MANDIR *:=' \
| xargs sed -i '/^MANDIR *:=/s,$,/man,';
$ find share/mk/dist/ -type f \
| xargs grep -l man \
| xargs sed -i 's,man%,man/%,g';
Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/>
Cc: Petr Vorel <pvorel@suse.cz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Let's update the list with the latest file-systems that added support.
You can easily verify this by "git grep FS_ALLOW_IDMAP" on the given
Linux version to see that the fs is listed and then checkout the
previous Linux version to see that it is not listed, therefore it was
added in that version.
$ diff -w -U0 \
<(git grep FS_ALLOW_IDMAP v6.8 | sed 's/^v6.8://') \
<(git grep FS_ALLOW_IDMAP v6.9-rc4 | sed 's/^v6.9-rc4://') \
| tail -n+4;
+fs/hugetlbfs/inode.c: .fs_flags = FS_ALLOW_IDMAP,
$ diff -w -U0 \
<(git grep FS_ALLOW_IDMAP v6.6 | sed 's/^v6.6://') \
<(git grep FS_ALLOW_IDMAP v6.7 | sed 's/^v6.7://') \
| tail -n+4;
+fs/ceph/super.c: .fs_flags = FS_RENAME_DOES_D_MOVE | FS_ALLOW_IDMAP,
$ diff -w -U0 \
<(git grep FS_ALLOW_IDMAP v6.2 | sed 's/^v6.2://') \
<(git grep FS_ALLOW_IDMAP v6.3 | sed 's/^v6.3://') \
| tail -n+4;
+mm/shmem.c: .fs_flags = FS_USERNS_MOUNT | FS_ALLOW_IDMAP,
$ diff -w -U0 \
<(git grep FS_ALLOW_IDMAP v6.1 | sed 's/^v6.1://') \
<(git grep FS_ALLOW_IDMAP v6.2 | sed 's/^v6.2://') \
| tail -n+4;
+fs/squashfs/super.c: .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add documentation for the new MPOL_WEIGHTED_INTERLEAVE mode in the same
manual pages that mention MPOL_INTERLEAVE; namely, mbind(2),
set_mempolicy(2), and get_mempolicy(2).
Descriptions were based on the changes introduced in this patch:
<https://lore.kernel.org/all/20240202170238.90004-4-gregory.price@memverge.com/>
Which was upstreamed to 6.9 here:
<https://lore.kernel.org/linux-mm/20240313200532.34e4cff216acd3db8def4637@linux-foundation.org/>
Cc: gregory.price@memverge.com
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Svetly Todorov <svetly.todorov@memverge.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Tweak input format of table text blocks to make a planned sed-driven
update simpler and more reliable.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
finit_module() supports the MODULE_INIT_COMPRESS_FILE flag since
Linux 5.17. See commit b1ae6dc41eaaa ("module: add in-kernel support
for decompressing")
During implementation of a secure module loader in GyroidOS, we
wanted to filter unsafe module parameters. To verify that only the
two documented flags which are disabling sanity checks are unsafe,
we had a look in the current kernel implementation.
We discovered that this new flag MODULE_INIT_COMPRESS_FILE was added.
Having a deeper look at the code, we also discovered that a new error
code EOPNOTSUPP is possible within newer kernels.
The inital commit only supported gzip and xz compression algorithms.
Support for zstd was added in Linux 6.2 by commit 169a58ad824d8
("module/decompress: Support zstd in-kernel decompression")
Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove the HP-UX portability advice, since getpagesize() is a slightly
better option than sysconf() for Linux systems.
Explain why this function exists, and why this man page is in the wrong
section. (The previous text tried to do both at the same, which was
confusing.) Also explain how the vast majority of architectures that
don't have a syscall (but do support multiple page sizes) actually work.
Also de-emphasize the glibc 2.0 bug, since most people don't need to
worry about compatibility with versions of glibc from 1997.
Finally, change "not on x86" in syscalls.2 to say where there _is_ a
syscall.
Co-developed-by: Elliott Hughes <enh@google.com>
Co-developed-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>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These serve the same purpose from different perspectives.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: bbc21bc4dbef ("proc.5, proc_pid_stat.5: Split /proc/PID/stat from proc(5)")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Hugo Gabriel Eyherabide <hugogabiel.eyherabide@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
functions
The different clocks are still optional.
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218452>
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Reported-by: Enrique Garcia <cquike@arcor.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It seems much more clear.
Cc: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It seems much more clear.
Suggested-by: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation'
Reported-by: Bruno Haible <bruno@clisp.org>
Cc: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Move the comment about the Linux commit id, specify that it's a Linux
commit, and add the glibc commit id too.
Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
Link: <https://lore.kernel.org/linux-man/Zd5fMGvIlmhQyONs@thunder.hadrons.org/T/#m9129640e1293a94ff1606a2f973522f40c968306>
Fixes: 28628d826661 ("process_madvise.2: Document the glibc wrapper")
Reported-by: Guillem Jover <guillem@hadrons.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Found with:
$ grep -rn '"""' man* \
| grep -v '"""""""""""' \
| sed 's/:.*//' \
| sort \
| uniq;
man2/add_key.2
man2/getrlimit.2
man2/keyctl.2
man2/pivot_root.2
man2/request_key.2
man3/isalpha.3
man3/setlocale.3
man3/toupper.3
man7/capabilities.7
man7/cgroups.7
man7/keyrings.7
man7/locale.7
man7/user_namespaces.7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Found with:
$ grep -rn '^\.[BI] .* [.,:;)]*$' man*
man2/prctl.2:382:.B FR=1 .
man2/openat2.2:377:.B EAGAIN .
man2/openat2.2:424:.I how.resolve .
man5/elf.5:788:.B PF_R .
man5/networks.5:18:.I name number aliases ...
man5/protocols.5:31:.I protocol number aliases ...
man7/cgroups.7:980:.I """max""" .
Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
$ grepc -n process_madvise /usr/include/
/usr/include/x86_64-linux-gnu/bits/mman_ext.h:25:
extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
size_t __count, int __advice,
unsigned __flags)
__THROW;
Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/>
Reported-by: Thomas Orgis <thomas@orgis.org>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It already existed in POSIX.1-1996, according to just a few lines above.
Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/>
Cc: Thomas Orgis <thomas@orgis.org>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The getdents.2 man page details a pair syscalls: getdents() and
getdents64(), both of which are used to get the entries of a directory.
The results are populated into a structure, with the difference between
both syscalls being mostly bitwidth related.
However, the behaviour or the 'd_off' field in both struct linux_dirent
and linux_dirent64 is wrongly documented in this man page.
According to the current manual page, 'd_off' is used to store the
"Offset to the next linux_dirent [...] the distance from the start of
the directory to the start of the next linux_dirent."
This value, though, is filesystem dependent, and much of the time it
stores no such offset.
According to readdir.3 [1] manpage:
> The value returned in d_off is the same as would be returned by
> calling telldir(3) at the current position in the directory stream.
> Be aware that despite its type and name, the d_off field is seldom
> any kind of directory offset on modern filesystems. Applications
> should treat this field as an opaque value, making no assumptions
> about its contents; see also telldir(3).
Of course, readdir(3) is a glibc function with no ties to
getdents(2), but it was implemented with such syscall and considering
that readdir(3) doesn't process the data from getdents(2) my belief is
that it inherited said behaviour from it [2]. telldir(3) tells a
similar story.
On the example provided at the end of getdents.2, notable is the d_off
value of the very last entry:
--------------- nread=120 ---------------
inode# file type d_reclen d_off d_name
2 directory 16 12 .
2 directory 16 24 ..
11 directory 24 44 lost+found
12 regular 16 56 a
228929 directory 16 68 sub
16353 directory 16 80 sub2
130817 directory 16 4096 sub3
which makes a very sudden jump that is obviously not where the entry is
located.
Rerunning this same example but on a ext4 partition gives you garbage
values:
--------------- nread=176 ---------------
inode# file type d_reclen d_off d_name
2050 directory 24 4842312636391754590 sub2
2 directory 24 4844777444668968292 ..
2051 directory 24 7251781863886579875 sub3
12 regular 24 7470722685224223838 a
2049 directory 24 7653193867028490235 sub
11 directory 32 7925945214358802294 lost+found
2 directory 24 9223372036854775807 .
In fact, I've had a hard time reproducing nice d_off values on ext2 too,
so what the filesystem does with d_off must have change since then.
On tmpfs it's a count:
--------------- nread=144 ---------------
inode# file type d_reclen d_off d_name
1 directory 24 1 .
1 directory 24 2 ..
5 directory 24 3 sub3
4 directory 24 4 sub2
3 directory 24 5 sub
2 regular 24 6 a
I've also not been the first to notice this, as you can see from this
stackoverflow issue opened last year:
https://stackoverflow.com/q/75119224
Safe to say, it's a very unreliable field.
Below is a patch that adds a warning besides the d_off field in both
structures, plus a brief explanation on why this field can be mislea-
ding (while also directing the user towards the readdir.3 man page).
Link: [1] <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man3/readdir.3>
Link: [2] <https://elixir.bootlin.com/glibc/glibc-2.39/source/sysdeps/unix/sysv/linux/readdir.c>
Signed-off-by: Vinícius Schütz Piva <vinicius.vsczpv@outlook.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
close_range() is defined in <unistd.h> when _GNU_SOURCE is defined.
The <linux/close_range.h> header file only defines the (linux-specific)
flags constants. The flags argument is an int, not an unsigned int, in
the glibc wrapper. Use the close_range() library call in the example
code instead of syscall().
Fixes: 71a62d6c3c56 ("close_range.2: Glibc added a wrapper recently")
Fixes: c2356ba085ed ("close_range.2: Glibc 2.34 has added a close_range() wrapper")
Reported-by: Alexandra Hájková <ahajkova@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Analogously with set*gid().
This has been the case since more than two decades, e.g.:
commit eae59a5681a6 glibc-2.3.2-793-geae59a5681a6
Commit: Ulrich Drepper <drepper@redhat.com>
CommitDate: Sun Jun 8 22:37:53 2003 +0000
Update.
* sysdeps/unix/sysv/linux/seteuid.c (seteuid): Use setresuid32
syscall directly if possible. If __ASSUME_SETRESUID_SYSCALL is
defined drop compatibility code.
[...]
The change in implementation from setreuid()/setregid() is also
already mentioned two paragraphs earlier in the same man page.
Fixes: a36b2bb0eca4 ("seteuid.2: seteuid() and setegid() are implemented as library functions")
Fixes: 8554dd0324b0 ("seteuid.2: tfix")
Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org/standard/33080.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It seems those dates were accidentally hardcoded.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Migrate man page cross reference in non-filled context to font
alternation macro. This is to prepare it for `MR` migration.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Refactor table format specification: use column modifiers to set heading
rows in bold instead of populating every entry in them with font
selection escape sequences. Use a single '_' to indicate a horizontal
rule spanning the table. Put vertical space before the table
(making it resemble a typographical "display") rather than after the
after the column heading.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Recast to use language paralleling that of the MREMAP_DONTUNMAP
discussion elsewhere in the page. Spotted these (excessively?)
abbreviated cross references while preparing for the `MR` man(7) macro
migration.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
utimensat() and faccessat() support the flag AT_EMPTY_PATH since
Linux 5.8.
(actually Linux 5.8 added faccessat2(): glibc wrapper for faccessat()
uses faccessat2(), and faccessat2() does support AT_EMPTY_PATH).
Reuse the standard text used in many other -at manual pages.
Signed-off-by: Renzo Davoli <renzo@cs.unibo.it>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX'
copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and
TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.
Cc: Hanno Böck <hanno@hboeck.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
But this does mean that since 5.12, it supports
(5.12 has ISREG|ISBLK, this actually matches 6.0 semantics):
any -> pipe via splice
seekable -> any
Also, there are many seekable files which aren't regular,
and the offset is updated regardless.
This is obvious, but the wording is clumsy.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since linux 5.19[1], MAX_SWAPFILES will be futher decreased
1 if kernel built with CONFIG_PTE_MARKER.
Link: [1] <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=679d10331>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since Linux 5.19[1], the limit is decreased by 3 instead of 2.
Link: [1] <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=6c287605f>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In Linux Kernel 5.12, a new mode flag, MPOL_F_NUMA_BALANCING, was
added to set_mempolicy() to optimize the page placement among the
NUMA nodes with the NUMA balancing mechanism even if the memory of
the applications is bound with MPOL_BIND.
In Linux Kernel 5.15, this mode flag was extended to mbind(2). Let's
also add man-page for mbind(2). It is copied from set_mempoicy(2)
man-page with subtle modifications.
Related kernel commits:
bda420b985054a3badafef23807c4b4fa38a3dff
6d2aec9e123bb9c49cb5c7fc654f25f81e688e8c
Suggested-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clean up in preparation for "MR sed".
Format only one man page cross reference per input line.
Begin parentheticals on their own input lines.
Also, groff 1.23.0's (and Plan 9 from User Space's) `MR` is not a font
style alternation macro; there is no "reversed" form as with `BR` and
`RB`. So when a man page cross reference must be immediately preceded
by punctuation, put that punctuation on the previous text line and use
the `\c` escape sequence to connect them.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Improve discussion of leap seconds, year-2038 etc.
Cc: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: f06a3f30fa66 ("readlink.2: Fix an off-by-one error in example code")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: b324e17d3208 ("Many pages: wfix")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
'NULL' is a null pointer _constant_. A 'null pointer' is a broader
concept. 'NULL pointer' is not a thing. See the link below.
Link: <https://software.codidact.com/posts/278657>
Fixes: 9517cf56fcbd ("pidfd_send_signal.2: New page documenting pidfd_send_signal(2)")
Fixes: fcd1bee32aa9 ("bpf.2: Improvements after comments from Daniel Borkmann")
Fixes: 5d92031a43b4 ("execve.2: Explicitly note that argv[argc] == NULL in the new program")
Fixes: 9f79744c9af3 ("keyctl.2: Improve KEYCTL_INSTANTIATE details")
Fixes: 1b6ab34c5320 ("attributes.7: New page describing POSIX safety concepts")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: d5bc35a7a9cc ("connect.2: wfix")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 184ecd225079 ("clone.2: Note EINVAL when exit_signal + bad flags")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
A paragraph break was missing in the enumeration of possible reasons for EINVAL.
Fixes: 8165500d4c9c ("prctl.2: Add PR_PAC_RESET_KEYS (arm64)")
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The first argument of prctl() was denoted as "option" here. This makes
no sense, because
- The first argument is not optional; it is mandatory.
A choice is an "option" only if it is possible to choose none of
the available choices.
- The title of the page is "operations on a process or thread".
A better term is "operation".
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Acked-by: Elliott Hughes <enh@google.com>
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The old wording was ambiguous, but it is important to know that signals
that were set to SIG_IGN will not be restored to SIG_DFL.
This behavior was documented in the kernel commit that introduced the
feature, in the link below.
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b612e5df4587c934bd056bf05f4a1deca4de4f75>
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
[alx: semantic newline; tweak commit message]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We're trying to "standardize" on a paragraphing macro from the three
equivalent ones (P, PP, LP). We (somewhat arbitrarily) agreed on P.
Scripted change:
$ find man* -type f | xargs sed -i '/\.PP/s/PP/P/'
$ find man* -type f | xargs sed -i '/\.LP/s/LP/P/'
Suggested-by: "G. Branden Robinson" <branden@debian.org>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/all/20231018213453.BF1ACC43395@smtp.kernel.org>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
When there are multiple tags for a paragraph, using a single TP and
separating the tags with commas makes the man(7) source more complex.
It also has a disadvantage: when searching through a manual page,
heuristics such as " --option" don't work so well.
By using GNU's TQ, we simplify the source of the pages, and improve the
ability to search them.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Including in commented out lists, so that grep(1) doesn't show odd cases.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is a new feature recently added to the kernel. So, document the
new ioctl the same way we do other UFFDIO_* ioctls.
Also note the corresponding new ioctl flag we can return in response to
a UFFDIO_REGISTER call.
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: a252b3345f5b ("ioctl_userfaultfd.2: Describe two-step feature handshake")
Reported-by: groff(1) (`make build-catman`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The old FIXME noted that the zeroing was done to differentiate the two
EINVAL cases. It's possible something like this was true historically,
but in current Linux we zero it in *both* EINVAL cases, so this is at
least no longer true.
After reading the code, I can't determine any clear reason why we zero
it in some cases but not in others. So, some simple advice we can give
userspace is: if an error occurs, treat the contents of the structure as
unspecified. Just re-initialize it before retrying UFFDIO_API again.
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
C-SKY only needs set_thread_area(), no need for get_thread_area(), the
same as MIPS.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: <https://lore.kernel.org/linux-man/014e670b-2a11-3deb-4e7e-bfe9defd8597@gmail.com/T/>
Cc: Arnd Bergmann <arnd@arndb.de>
[alx: ffix; tweak commit message too]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Memory-Deny-Write-Execute is a W^X process control originally introduced
by Joey Gouly. I'm the author of the PR_MDWE_NO_INHERIT flag.
Signed-off-by: Florent Revest <revest@chromium.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The execve syscall returns -E2BIG in 3 cases:
- The total length of the command line arguments and environment is too
large.
- An argument or environment string (including the NUL byte) is longer
than MAX_ARG_STRLEN.
- The full path to the executable (including the NUL byte) exceeds
MAX_ARG_STRLEN.
Spell out all 3 cases in the -E2BIG section.
Discovered by moving a too large commandline parameter to an environment
variable, and finding that things still did not work. Examined the code
in fs/exec.c to get the details.
This simple shell script starts failing at 2^17 on a system with 4kB
page size:
#!/bin/sh
STRING="a"
for loop in `seq 20`; do
STRING="$STRING$STRING"
export STRING
if /bin/true ; then
: # still under the limit
else
echo "fork failed at loop $loop"
fi
done
./exec2big.sh: line 10: /bin/true: Argument list too long
fork failed at loop 17
Suggested-by: Matthew House <mattlloydhouse@gmail.com>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 1f0f451c78fd ("ioctl_userfaultfd.2: Describe missing UFFDIO_API feature flags")
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Peter Xu <peterx@redhat.com>
Suggested-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: "G. Branden Robinson" <branden@debian.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>
|
|
First, it is not correct that repeated UFFDIO_API calls result in
EINVAL. This is true *if both calls enable features*, but in the case
where we're doing a two-step feature detection handshake, the kernel
explicitly expects 2 calls (one with no features set). So, correct this
description.
Then, some new error cases have been added to the kernel recently, and
the man page wasn't updated to note these. So, add in descriptions of
these new error cases.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Cc: Peter Xu <peterx@redhat.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fully describe how UFFDIO_API can be used to perform a two-step feature
handshake, and also note the case where this isn't necessary (programs
which don't depend on any extra features).
This lets us clean up an old FIXME asking for this to be described.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Cc: Peter Xu <peterx@redhat.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Several new features have been added to the kernel recently, and the man
page wasn't updated to describe these new features. So, add in
descriptions of any missing features.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Fix missing paragraph tag. The lack of this tag yielded no blank
line in the rendere dpage, which is inconsistent with style
elsewhere.
- The description of UFFDIO_WRITEPROTECT was a sentence fragment; the
last half of the sentence was left out by mistake. Add it in to fix
the issue.
- Move UFFDIO_WRITEPROTECT 'since' to its own line. All other ioctls
note the kernel version introduced on a separate line from the ioctl
name. Update UFFDIO_WRITEPROTECT to match the existing style.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The example program doesn't depend on any extra features, so it does not
make use of the two-step feature handshake process. This is fine, but it
might set a bad example for programs which *do* depend on specific
features (e.g. they may conclude they don't need to do anything to
enable / detect them).
No need to make the example program more complicated: let's just add a
comment indicating why we do it the way we do it in the example, and
describing briefly what a more complicated program would need to do
instead.
The comment is kept rather brief; a full description of this feature
will be included in ioctl_userfaultfd.2 instead.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Basically, reword the sentence to clarify that this isn't a complete
list. I don't believe it's worth maintaining a fully complete list
here, instead ioctl_userfaultfd.2 is the place to do that. Let this just
be an example.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This process is critical for programs which depend on extra features, so
it's worth mentioning here.
Future commits will much more fully describe it in ioctl_userfaultfd.2.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Christoph Lameter gave me explicit permission to relicense it for
consistency with the rest of the project.
Michael repeatedly stated that he wanted to use Linux-man-pages-copyleft
to reduce the number of licenses we have in the project.
Cc: Christopher Lameter <cl@os.amperecomputing.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Acked-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Günther Noack <gnoack@google.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Bit me in <https://github.com/thecoshman/http/issues/155>:
musl (and, thus, bionic) takes an int!
Kill the "POSIX says 'request' is int" comment;
prior to Issue 7, ioctl() is shaded STREAMS,
it's obsolescent in Issue 7,
and gone completely in Issue 8.
The POSIX interface has never been supported by Linux,
and the common ioctl() interface has never existed in POSIX or the SUS.
Note how the interface evolved in HISTORY. The NetBSD CVS has
revision 1.1
date: 1993-03-21 10:45:37 +0100; author: cgd; state: Exp;
branches: 1.1.1;
Initial revision
----------------------------
revision 1.1.1.2
date: 1995-02-27 11:49:43 +0100; author: cgd; state: Exp; lines: +6
-6;
from Lite
----------------------------
revision 1.1.1.1
date: 1993-03-21 10:45:37 +0100; author: cgd; state: Exp; lines: +0
-0;
initial import of 386bsd-0.1 sources
----------------------------
and it's char * in 1.1.1.1 and 1.1.1.2 but ... in 1.1, so hell knows.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
A flag to indicate that the requested file_handle is not intended
to be used for open_by_handle_at(2) and may be needed to identify
filesystem objects reported in fanotify events.
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 090fdddb43 ("memfd_create.2, mmap.2, shmget.2: Document the EPERM for huge page allocations")
Signed-off-by: Avinesh Kumar <akumar@suse.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The consequences of using close(2) together with advisory record locks
are quite serious. Make the warning more explicit.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
They were used after a table as a workaround for a groff-1.22.4 bug, but
now, in groff-1.23.0, we can use the usual PP or IP macros.
Link: <https://savannah.gnu.org/bugs/index.php?49390>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted patch:
$ grep -rl '^\.sp ' man* | xargs sed -z -i 's/\n\.TE\n\.sp 1\n\.SH/\n.TE\n.SH/'
$ grep -rl '^\.sp ' man* | xargs sed -z -i 's/\n\.TE\n\.sp 1\n\.PP/\n.TE\n.PP/'
plus a few other cases where roff(7) comments made it more complex.
This was a workaround for some groff-1.22.4 bug, but it has been fixed
in groff-1.23.0.
Link: <https://savannah.gnu.org/bugs/index.php?49390>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
CLONE_NEWPID|CLONE_PARENT was only prohibited during a short period.
That prohibition was introduced in Linux 3.12, in commit 40a0d32d1eaf
("fork: unify and tighten up CLONE_NEWUSER/CLONE_NEWPID checks"), but
was a regression, and was fixed in Linux 3.13, in commit 1f7f4dde5c94
("fork: Allow CLONE_PARENT after setns(CLONE_NEWPID)").
In this test program, one can see that it works:
#include <err.h>
#include <linux/sched.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
static pid_t sys_clone3(struct clone_args *args);
int
main(void)
{
int ret;
struct clone_args args = {
.flags = CLONE_PARENT | CLONE_NEWPID,
};
printf("main program: pid: %d, and ppid: %d\n", getpid(), getppid());
ret = sys_clone3(&args);
switch (ret) {
case -1:
err(EXIT_FAILURE, "clone3");
case 0:
printf("child: pid: %d, and ppid: %d\n", getpid(), getppid());
exit(EXIT_SUCCESS);
default:
exit(EXIT_SUCCESS);
}
}
static pid_t
sys_clone3(struct clone_args *args)
{
fflush(stdout);
fflush(stderr);
return syscall(SYS_clone3, args, sizeof(*args));
}
This test program (successfully) outputs:
# ./a.out
main program: pid: 34663, and ppid: 34662
child: pid: 1, and ppid: 0
Fixes: f00071920ec3 ("clone.2: EINVAL if (CLONE_NEWUSER|CLONE_NEWPID) && (CLONE_THREAD|CLONE_PARENT)")
Cowritten-by: Sargun Dhillon <sargun@sargun.me>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: John Watts <contact@jookia.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 5261b0fe757e ("clone.2: Minor improvements following clone3() additions")
Signed-off-by: Sambit Nayak <sambitnayak@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since Issue 3 (original release), fsync() was required to operate on
all valid fds. Since Issue 7 2018, fdatasync() is as well (and required
writability only by editorial mistake):
https://www.austingroupbugs.net/view.php?id=501
"Some UNIXes require the fd to be writable" is a
needlessly-adversarial-to-the-user ‒
https://101010.pl/@eater@cijber.social/110824211348995583
‒ way of saying "HP-UX and AIX have always been broken": just say that.
Originally appeared in 4.2BSD (4.1c.2BSD) so touch that as well since
we're mentioning the original interface.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Guillem Jover <guillem@hadrons.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Continue commit 9e54434ead, 19 July.
4 pages issued requests to manipulate adjustment and automatic
hyphenation around tbl(1) tables in a different order from the other 525
documents in the tree that performed this trick.
I produced this change with the following GNU sed script.
/^\.nh/{N;/\n\.ad l/{N;/\n\.TS/s/.*/.TS/}}
/^\.TE/{N;/\n\.ad/{N;/\n\.hy/s/.*/.TE/}}
Fizes: 9e54434ead ("man*/: ffix (un-bracket tables)")
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clean up in preparation for "MR sed".
Use font style alternation macros instead of font selection escape
sequences to mark up man page cross references in table entry text
blocks. Also protect them from hyphenation. (`MR` will take care of
that for us.)
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Commit 4131356cdab8 reorganized the sections a bit breaking the
reference. Fix it.
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
[Clean up in preparation for "MR sed".]
Drop spurious, nilpotent uses of *roff `\c` escape sequence.
Quoting groff_man_style(7):
\c End a text line without inserting space or attempting a break.
Normally, if filling is enabled, the end of a text line is
treated like a space; an output line _may_ be broken there (if
not, an adjustable space is inserted); if filling is disabled,
the line _will_ be broken there, as in .EX/.EE examples. The
next line is interpreted as usual and can include a macro call
(contrast with \newline). \c is useful when three font styles
are needed in a single word, as in a command synopsis.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
[Clean up in preparation for "MR sed".]
* Use typographer's quotation marks.
* Quote the 4.2BSD vfork(2) page _exactly_, including font styling.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/man/man2/vfork.2
This is to remove a false positive in preparation for a sed(1)-driven
update of man page cross references to use the groff 1.23.0 `MR` macro.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
tv arg is allowed to be NULL in bionic.
POSIX says this behavior is undefined, and bionic just exposes the Linux
syscall directly. There's no code in bionic for
gettimeofday/settimeofday; just a description of the syscall name and
arguments from which an assembler stub is automatically generated at
build time. musl and glibc go out of their way to behave differently
from the Linux kernel, but no idea why.
Signed-off-by: Zijun Zhao <zijunzhao@google.com>
Cc: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since commit c3494801cd1785e2 ("bpf: check pending signals while
verifying programs"), bpf() may also fail with EAGAIN if the verifier
detects pending signals.
This was triggered in the cmld of GyroidOS when loading a cgroups device
program during container start. We had a look in the man page and were
confused that EAGAIN was not listed as possible error. Digging in the
kernel source revealed the EAGAIN in the verifier introduced by the
commit above. Further investigation showed that libbpf already wraps
that case, by a retry loop.
Since GyroidOS uses the system call directly and not libbpf, we missed
to handle this error correctly. Thus, this hint in the man page for the
bpf() system call should be helpful for others who implement on the
low-level interface, too.
Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
Cc: Alexei Starovoitov <ast@kernel.org>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
* Stop disabling adjustment and automatic hyphenation before tables,
and incorrectly "restoring" it afterward. In addition to repetitious
boilerplate around tables, the `ad` and `hy` requests, when not given
arguments, do not behave as many man page authors expect. If
adjustment was initially disabled when rendering the page, it was
being activated after `TE` calls, frustrating the desire of the
reader. Furthermore, `hy` when given no argument enables automatic
hyphenation in mode "1", which is not an appropriate value for the
TeX-based hyphenation patterns for English that groff has used for
over 30 years. And analogously to `ad`, a simple `hy` request would
reactivate automatic hyphenation even if the reader had disabled it.
Moreover, such fiddling is often unnecessary. tbl(1) from groff
1.23.0 describes how tbl(1) has always worked, dating back to Michael
Lesk's original implementation at Bell Labs in the 1970s.
"Ordinarily, a table entry is typeset rigidly. It is not filled,
broken, hyphenated, adjusted, or populated with additional inter-
sentence space. ... Text blocks are formatted as was the text prior
to the table, modified by applicable column descriptors. ... Add na
or ad requests to the beginning of a text block to alter its
adjustment distinctly from other text in the document. As with other
table entries, when a text block ends, any alterations to formatting
parameters are discarded. They do not affect subsequent table
entries, not even other text blocks."
* Apropos of the foregoing, add `na` and `nh` requests to the
"Interface" columns of MT-safety tables in pages' "ATTRIBUTES"
sections, so that C function names are not inappropriately hyphenated.
I produced this change with the following GNU sed script.
:start
/^\.ad l/{N;/\n\.nh/{N;/\n\.TS/s/.*/.TS/}}
/^\.TE/{N;/\n\.hy/{N;/\n\.ad/s/.*/.TE/}}
/^Interface.*Attribute.*Value/{N;/\nT{/s/.*/&\n.na\n.nh/
:loop
n
/T{/s/.*/&\n.na\n.nh/
/^\.TE/b start;
b loop
}
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Protect instances of some literals from hyphenation. These are only
those necessary to improve analyzability of a large-scale (500+ file),
sed-driven change to improve adjustment and hyphenation enablement
management around tables.
* man2/getrlimit.2: Protect some instances of `RLIMIT_MSGQUEUE`,
`RLIMIT_SIGPENDING`, `RLIMIT_FSIZE`, and `getrlimit` from
hyphenation.
* man2/sigaltstack.2: Protect an instance of `setrlimit` from
hyphenation.
* man3/gethostbyname.3: Protect an instance of `endhostent` from
hyphenation.
* man3/getmntent.3: Protect an instance of `getmntinfo` from
hyphenation.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Ever since commit 4a19542e5f69 ("O_CLOEXEC for SCM_RIGHTS") added the
MSG_CMSG_CLOEXEC flag to recvmsg(2), the flag has also been copied into
the returned msg->msg_flags when specified, regardless of whether any
file descriptors were actually received, or whether the protocol
supports receiving file descriptors at all. This behavior was primarily
an implementation artifact: by copying MSG_CMSG_CLOEXEC into the
msg_flags, scm_detach_fds() in net/core/scm.c (and its _compat()
counterpart in net/compat.c) could determine whether it was set without
having to receive a copy of the recvmsg(2) flags.
This mechanism was closely modeled after the internal MSG_CMSG_COMPAT
flag, which is passed by the compat versions of the send[m]msg(2) and
recv[m]msg(2) syscalls to inform various functions that user space
expects a compat layout. When the flag was first implemented by commits
3225fc8a85f4 ("[NET]: Simplify scm handling and sendmsg/recvmsg
invocation, consolidate net compat syscalls.") and 7e8d06bc1d90
("[COMPAT]: Fix MSG_CMSG_COMPAT flag passing, kill
cmsg_compat_recvmsg_fixup.") (in history/history.git), the behavior was
very similar: recvmsg(2) would add MSG_CMSG_COMPAT to the msg_flags, and
put_cmsg() and scm_detach_fds() in net/core/scm.c would read the flag to
determine whether to delegate to their _compat() counterparts.
However, after the initial implementation, more work was done to hide
MSG_CMSG_COMPAT from user space. First, commit 37f7f421cce1 ("[NET]: Do
not leak MSG_CMSG_COMPAT into userspace.") started scrubbing the bit
from msg_flags right before copying it back into user space. Then,
since passing the MSG_CMSG_COMPAT flag into the syscalls from non-compat
code could confuse the kernel, commits 1be374a0518a ("net: Block
MSG_CMSG_COMPAT in send(m)msg and recv(m)msg") and a7526eb5d06b ("net:
Unbreak compat_sys_{send,recv}msg") made them return -EINVAL if user
space attempted to pass the flag. But to reduce breakage, commit
d720d8cec563 ("net: compat: Ignore MSG_CMSG_COMPAT in
compat_sys_{send, recv}msg") rolled that back somewhat, making
MSG_CMSG_COMPAT an error for the non-compat syscalls and a no-op for the
compat syscalls, which is the current status quo.
Even though MSG_CMSG_CLOEXEC was implemented after the kernel started
scrubbing MSG_CMSG_COMPAT from the returned msg_flags, the newer flag
never received the same treatment. At this point, this behavior has
effectively become part of the user-space API, to the extent that
io_uring has been careful in commit 9bb66906f23e ("io_uring: support
multishot in recvmsg") to replicate the behavior in its multishot
IORING_OP_RECVMSG operation.
Therefore, document this behavior to avoid confusion when user space
sees MSG_CMSG_CLOEXEC returned in msg->msg_flags.
On 2023-07-18 15:24, Ulrich Drepper wrote:
> On Tue, Jul 18, 2023 at 2:10 PM Alejandro Colomar <alx@kernel.org> wrote:
>> On 2023-07-18 08:00, Matthew House wrote:
>>>
>>> As for the original purpose of the behavior, it's not really clear,
>>> and it may well have been an implementation artifact that got
>>> enshrined in the user space ABI.
>>> (Even io_uring is careful to replicate this behavior!)
>>
>> This is what worries me. I've CCd a bunch of people to see if they can
>> bring some light.
>
> It definitely was an artifact of the implementation. I haven't tested
> getting the close-on-exec flag information for all interfaces. The
> assumption was that the information about the close-on-exec flag is
> received with the universal fcntl() call.
Cc: linux-api@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew House <mattlloydhouse@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
/proc/sys/fs/epoll/max_user_instances hasn't existed since
commit 9df04e1f25effde823a600e755b51475d438f56b
("epoll: drop max_user_instances and rely only on max_user_watches")
from
Date: Thu Jan 29 14:25:26 2009 -0800
which describes to v2.6.29-rc3-24-g9df04e1f25ef.
Signed-off-by: Ahelenia Ziemiańska <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>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For the few functions that come only in 64-bit off_t flavors,
document their APIs as using off_t instead of off64_t,
and say also that code should #define _FILE_OFFSET_BITS 64.
This documents what user code is (and should be) doing anyway,
if it needs to work on traditional x86 and ARM Linux.
Reported-by: Rich Felker <dalias@libc.org>
Fixes: 9bebb17e5b57 ("splice.2: Use 'off64_t' instead of 'loff_t'")
Fixes: 76c5631fb442 ("copy_file_range.2: Document glibc wrapper instead of kernel syscall")
Fixes: 5cabfa06b407 ("man-pages 1.68")
Fixes: 3ca974e3988a ("New page for sync_file_range(2), new in kernel 2.6.17.")
Fixes: 9bebb17e5b57 ("sync_file_range.2: Document the architecture-specific sync_file_range2() system call")
Fixes: 79bf8cdcf36a ("Document fopencookie(3), a library function that allows custom implementation of a stdio stream.")
Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Reviewed-by: Sam James <sam@gentoo.org>
Cc: Jonathan Wakely <jwakely@redhat.com>
Cc: Szabolcs Nagy <nsz@port70.net>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: A. Wilcox <AWilcox@wilcox-tech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Which yields an empty line in the formatted output.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Fixes: e9f14fa0bbc1 ("fanotify.7, fanotify_init.2: Document FAN_REPORT_DIR_FID")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Naively, one may consider being "ready" to mean, for example,
lseek(0, 0, SEEK_END); poll({.fd = 0, .events = POLLIN}, 0);
to be able to say whether new data has appeared at the end of the file.
This is not the case, and poll() is only meaningful as
"will a read or a write sleep": regular files and block devices are
always ready to return an empty read in this case, for example,
and you need to use inotify to achieve this.
Under Linux this is governed by DEFAULT_POLLMASK
(EPOLLIN | EPOLLOUT | EPOLLRDNORM | EPOLLWRNORM)
being returned if no explicit poll operation is defined for the file.
As contrast, unpollables like the above are refused by epoll_ctl(ADD).
I explicitly hit the two keywords I searched for (regular, block)
before just writing a test program to confirm that poll() behaved as
expected and is not a good fit for my use-case.
This behaviour is guaranteed by POSIX (Issue 8 Draft 3):
51381 The poll( ) and ppoll( ) functions shall support regular files, terminal and pseudo-terminal
51382 devices, FIFOs, pipes, and sockets. The behavior of poll( ) and ppoll( ) on elements of fds that refer
51383 to other types of file is unspecified.
51384 Regular files shall always poll TRUE for reading and writing.
51385 A file descriptor for a socket that is listening for connections shall indicate that it is ready for
51386 reading, once connections are available. A file descriptor for a socket that is connecting
51387 asynchronously shall indicate that it is ready for writing, once a connection has been established.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
$ git describe --contains 80340fe3
v5.8-rc1~203^2~4
Fixes: 4ca216bacc7d ("statx.2: Document STAT_ATTR_MOUNT_ROOT")
Reported-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Linux 5.10 adds STATX_ATTR_MOUNT_ROOT support.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80340fe3605c
Add the text to the statx man page.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
[ alx: ffix ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
I remember I discussed this with Michael Kerrisk a long ago and we
agreed to apply this fix, as I felt that using overload syntax was
confusing (especially since C doesn't allow overloads), but then I
didn't feel urged to write a patch. Florian confirmed recently that
this is confusing to more programmers, so let's do it.
Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216876#c1>
Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There was user confusion about specifying MPOL_MF_MOVE* with
MPOL_INTERLEAVE policy [1]. Add clarification.
[1] https://lore.kernel.org/linux-mm/20230501185836.GA85110@monkey/
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Put the last paragraph at the top of the CAVEATS section, since it's
probably the most important for readers. This system call is likely not
the right one for most programs; let's discourage its use.
Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
sched_yield(2) is not the right thing for heavily contended resources.
The right thing to do is to call functions that wake the waiting threads.
Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Use the dummy character to avoid warnings in examples.
- Re-enable the warning.
Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: groff(1) (`make built-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fix spelling of "run time", as documented in man-pages(7):
- "run time" in two words when used as a noun
- "run-time" with hyphen when used as an adjective
There is another occurrence in bpf-helpers.7,
but that content gets generated from the kernel source
and should be fixed there.
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/31ecebc5-1b97-b610-a097-f260ec4d4c8d@gmail.com/>
Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use "bitwise OR" instead of "bitwise-or" (with fonts).
No other pages spell it like this.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Escape dashes on UUIDs, URLs, and file and package names.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Describe the new UFFD_FEATURE_EXACT_ADDRESS API feature.
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Settle on "no effect", concretify vaguely-described behaviours;
both [to be documented]s replaced with documentation
(these match my 6.2 checkout, if there were subtleties in the history
they got lost).
Added the full system names to the PER_s that lacked them.
Didn't validate or chase down the versions except for PER_RISCOS.
Having these be sorted instead of in the original enumeration order is
really more trouble than it's worth.
Cf. the UAPI definition:
/*
* Personality types.
*
* These go in the low byte. Avoid using the top bit, it will
* conflict with error returns.
*/
enum {
PER_LINUX = 0x0000,
PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT,
PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS,
PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS |
WHOLE_SECONDS | SHORT_INODE,
PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS,
PER_BSD = 0x0006,
PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
PER_LINUX32 = 0x0008,
PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */
PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */
PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */
PER_RISCOS = 0x000c,
PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
PER_OSF4 = 0x000f, /* OSF/1 v4 */
PER_HPUX = 0x0010,
PER_MASK = 0x00ff,
};
PER_LINUX is a base personality, PER_LINUX_{32BIT,FDPIC} are
PER_LINUX|ADDR_LIMIT_32BIT and PER_LINUX|FDPIC_FUNCPTRS, resp.
PER_BSD is a base personality, PER_SUNOS is PER_BSD|STICKY_TIMEOUTS.
PER_LINUX32 is a base personality, PER_LINUX32_3GB is
PER_LINUX32|ADDR_LIMIT_3GB.
I updated these all to be "Same as {base personality},
but implies {...}.". PER_SCOSVR3 has an "also", since it's the only one
where the base case PER_OSR5 has a list.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Avinesh Kumar <akumar@suse.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: mandoc(1) (`make lint-man-mandoc`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We already have an entire page for the types.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Move text about socklen_t to its own page, and remove repetitive
references to read accept(2) (except from the type page itself).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: `make check-catman`
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: Patrick Reader <_@pxeger.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Add a new HISTORY section that covers the history of an API, both
regarding implementations and regarding old standards. This was
previously covered in VERSIONS, and in some cases in STANDARDS.
- Repurpose VERSIONS to cover differing implementations in _current_
systems.
- STANDARDS is reduced to only cover current versions of standards.
That basically means only C11 (C99 has been superseeded by C11; C17
is just a bugfix of C11, so not really a new version), and
POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a
bugfix for *-2008). The section also mentions for example 'Linux',
'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if
it's (de-facto) standard in the BSDs.
- In some cases content that should go into one of these sections was
in NOTES. Move it from there to where it corresponds.
- In the SYNOPSIS, I added [[deprecated]] in some functions that I
found are deprecated by the relevant standards.
- A few other related changes...
Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
<sources.redhat.com/bugzilla> seems broken right now.
Apparently it was replaced, quite a long time ago --based on what I can
find on the net-- with <www.sourceware.org/bugzilla>, which does work.
This patch was created with:
$ find man* -type f \
| xargs grep -l 'sources.redhat.com/bugzilla' \
| xargs sed -i 's;http://sources.redhat.com/bugzilla/;https://www.sourceware.org/bugzilla/;g'
Verified with:
$ git diff | sed -n 's;^+.*\(https://www.sourceware.org/bugzilla/show_bug.cgi?id=[0-9]*\).*;\1;p' > URLs
$ mkdir test
$ cd test
$ wget -i ../URLs
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This matches the order in getitimer(2), and so makes it easier to
compare them.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
'socklen_t' now has its own manual page.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
VERSIONS and STANDARDS are closely related (and often the distinction is
not so clear). Now that we're going to add another section, HISTORY,
that is related to both, it makes sense to have the three together.
As a curiosity, the list in man-pages(7) that detailed what each section
should contain had them by accident(?) in the order that we're moving
to, instead of the order that was used elsewhere.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This reverts commit 72b349dd8c209d7375d4d4f76e2315943d654ee9.
This removal caused inconveniences to some programmers. We've agreed to
keep the information about C89, since there's an easy way to keep it
correct by checking against a plain-text copy of the standard itself:
$ stdc89()
{
grep "[[:alpha:]] \**\b$1([[:alnum:]*,. ]*);" /path/to/c89-draft.txt;
}
$ stdc89 printf
int printf(const char *format, ...);
int printf(const char *format, ...);
We will also do a split of the information in STANDARDS, since now it's
a mix of what a proper STANDARDS section would be plus a HISTORY section
commonly-found in other manual pages. C89 will go into HISTORY.
Link: <https://lore.kernel.org/linux-man/b73a9636-1a17-36f3-3718-d9ca3b9293ed@gmail.com/T/>
Link: <https://port70.net/~nsz/c/c89/c89-draft.txt>
Reported-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Reported-by: Matt Jolly <Matt.Jolly@footclan.ninja>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Two consecutive IPs without text don't make sense, since they are
paragraph separators. The reason we needed it was that PD 0 was
misplaced.
This extra IP was also causing another problem: we needed to specify
again the indentation of the outer list.
Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
unix_seqpacket_recvmsg() calls unix_dgram_recvmsg() which handles
MSG_TRUNC. This has been the case since the handling was added in
9f6f9af7694ede6314bed281eec74d588ba9474f; see net/unix/af_unix.c:
static int unix_seqpacket_recvmsg([...])
{
[...]
return unix_dgram_recvmsg(iocb, sock, msg, size, flags);
}
The sequential-packet socket type seems to have been left out from the
description by an oversight.
Signed-off-by: Vladislav Ivanishin <vlad@ispras.ru>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document that Linux will report EINVAL when exit_signal is specified and
either CLONE_THREAD or CLONE_PARENT is specified.
From clone3_args_valid in Linux:
```
if ((kargs->flags & (CLONE_THREAD | CLONE_PARENT)) &&
kargs->exit_signal)
return false;
```
I have verified that this happens on my kernel with a small program:
```
#include <stdio.h>
#include <linux/sched.h>
#include <signal.h>
#include <sys/syscall.h>
#include <unistd.h>
int main(void)
{
struct clone_args ca = {
.flags = CLONE_THREAD | CLONE_SIGHAND | CLONE_VM,
.exit_signal = SIGCHLD, // comment me out to fix error
.set_tid_size = 0,
};
syscall(SYS_clone3, &ca, sizeof(struct clone_args));
perror("");
}
```
And I have verified that this doesn't happen with normal `clone` through
the glibc helper:
```
#define _GNU_SOURCE
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <sys/mman.h>
int do_nothing(void *_) { return 0; }
int main(void)
{
void *map = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
void *stack_top = map + 0x10000 - 1;
clone(do_nothing, stack_top,
CLONE_THREAD | CLONE_VM | CLONE_SIGHAND | SIGCHLD, NULL);
perror("");
}
```
Signed-off-by: Jack Pearson <jack@pearson.onl>
Cc: "Carlos O'Donell" <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document the role of PTRACE_O_TRACESYSGOOD option in connection with
PTRACE_GET_SYSCALL_INFO.
Came upon this after writing a test program using
PTRACE_GET_SYSCALL_INFO. After failing to find what's wrong I posted a
StackOverflow question which you can find right here:
<https://stackoverflow.com/questions/72410182/ptrace-get-syscall-info-always-returns-info-op-as-ptrace-syscall-info-none>
Nate Eldredge found out what happens by looking into the kernel's source
code, here is a link to the relevant part
<https://github.com/torvalds/linux/blob/8291eaafed36f575f23951f3ce18407f480e9ecf/kernel/ptrace.c#L1018>
In the code it can be seen that in case of system call entry or exit
stops, the union is filled if and only if the signal matches
`SIGTRAP | 0x80`, a signal which is only sent if the
PTRACE_O_TRACESYSGOOD option is set. You can read about that in the
PTRACE_O_TRACESYSGOOD section of ptrace(2)'s manual.
Complements: fc91449cb "ptrace.2: Document PTRACE_GET_SYSCALL_INFO"
Cowritten-by: Dmitry V. Levin <ldv@strace.io>
Signed-off-by: Dmitry V. Levin <ldv@strace.io>
Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com>
Acked-by: Nate Eldredge <nate@thatsmathematics.com>
Cc: Elvira Khabirova <lineprinter0@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reproduced using test program:
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(void) {
pid_t pid_a, pid_b;
pid_a = fork();
printf("pid: %i; pgid: %i; forkA: %i\n",
(int) getpid(), (int) getpgrp(), (int) pid_a);
if (!pid_a) {
// pid_a is not a valid process group
// setpgid(0, 0); // This makes it succeed.
sleep(1); // stay alive
return 0;
}
pid_b = fork();
if (!pid_b) {
printf("* pid: %i; pgid: %i; forkA: %i; forkB: %i\n",
(int)getpid(), (int)getpgrp(), (int)pid_a, (int)pid_b);
setpgid(0, pid_a);
perror("setpgid");
return 0;
}
printf("pid: %i; pgid: %i; forkA: %i; forkB: %i\n",
(int) getpid(), (int) getpgrp(), (int) pid_a, (int) pid_b);
sleep(1); // stay alive
return 0;
}
Signed-off-by: Guy Shefy <guyshefyb@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
* Stop manipulating adjustment and hyphenation around a table.
* These could be safely done within the text block, but even that is not
necessary, since what is in the next block is a single word, so no
adjustment will take place, and to prevent hyphenation of a single
word, \% is cheap and straightforward. So do that.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use \[lq] and \[rq] special characters for prose quotation marks.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Break input lines after commas.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use \- for minus sign instead of - (hyphen), producing better typography
on typesetting devices and Unicode terminals.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use correct *roff special character for ("ASCII") tilde.
There are other occurrences in bpf-helpers.7, but those will have to
await improvement of the tool that generates man(7) from the source
language.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use correct *roff special character for hat/caret/circumflex accent.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove unportable hack to put a dot at the beginning of an input line.
Use the idiomatic means of doing this instead: the roff dummy character
escape sequence.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove spurious escaping of '.' where it cannot be interpreted as a roff
control character.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Escape hyphens used as parts of C `->` operators.
Signed-off-by: G. Branden Robinson <g.branden.robinson@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>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Namhyung Kim <namhyung@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>
|
|
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>
|
|
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>
|
|
This improves readability in the source code, since it delimits where
the escape sequence ends.
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This improves readability in the source code, since it delimits where
the escape sequence ends.
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It's a proper noun, whose original letter case should be respected.
glibc's own documentation uses always lowercase; let's do the same here.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add missing perf_event_attr fields, new event codes and sample type.
Also add descriptions for PERF_FORMAT_LOST.
Signed-off-by: Namhyung Kim <namhyung@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>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: b324e17d3208 ("Many pages: wfix")
Reported-by: Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: mario.blaettermann@gmail.com
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Bring in man page changes from the patch set by Colin Cross, and
document the corresponding virtual names in procfs.
Link: <https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/>
Signed-off-by: Nick Gregory <nick@nickgregory.me>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Colin Cross <ccross@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Pasha Tatashin <tatashin@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Glibc provides a wrapper with slightly different types (regarding
const). Show the wrapper, which is what users will interface with.
Reported-by: Mark Galeck <markgaleck@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
C89 is obsolete, and programs should target newer standards. If someone
needs information about is, the Standard itself is a better resource.
Let's move forward, so readers get the intended notice that C89 is not a
useful version of C.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ grep -l -x '^[.]TS$' man*/* | sort -u | xargs sed -i -e "1i'\\\\\" t"
Link: <https://lore.kernel.org/linux-man/07a7d4e7-79a6-b2c3-6892-1e39a0679f27@gmail.com/T/#mcf36c8a387fd5ff4f800dc220e3dbdd229b556bd>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
commit d7ba612d0 ("copy_file_range.2: Update cross-filesystem support
for 5.12") prematurely documented kernel 5.12 as the version that
changes the cross-fs copy_file_range() behavior, but that behavior
change was only merged in kernel version 5.19.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|