Compare commits

...

36 Commits

Author SHA1 Message Date
Michael Kerrisk bd62f2240b capabilities.7, user_namespaces.7: Minor tweaks (part 2) to Kir Kolyshkin's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 05:02:41 +02:00
Alejandro Colomar c83edb030c capabilities.7: Minor tweaks to Kir's patch
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:56:49 +02:00
Kir Kolyshkin 29c1f3cf96 capabilities.7, user_namespaces.7: Describe CAP_SETFCAP
mtk: The kernel commit message is quite enlihtening:

    commit db2e718a47984b9d71ed890eb2ea36ecf150de18
    Author: Serge E. Hallyn <serge@hallyn.com>
    Date:   Tue Apr 20 08:43:34 2021 -0500

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:50:12 +02:00
Michael Kerrisk 76dec7bbd4 readv.2: Minor fixes (part 2) to Will Manley's patch
Mainly: I generally don't want us to be including URLs to mailing
list discussions in a manual page. Either, the issue in the
discussion is worth writing up in the manual page (so that
the reader doesn't have to look elsewhere), or the details
are less important, in which case it is sufficient to note the
existence of the bug. I think this is an example of the latter.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:41:04 +02:00
Alejandro Colomar f09b616d07 readv.2: Minor tweaks to Will Manley's patch
Cc: Will Manley <will@williammanley.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:40:57 +02:00
Will Manley f2ec5c2b1a readv2: Note preadv2(..., RWF_NOWAIT) bug in BUGS section
To save the next person before they fall foul of it.  See
<https://lore.kernel.org/linux-fsdevel/fea8b16d-5a69-40f9-b123-e84dcd6e8f2e@www.fastmail.com/T/#u>
and <https://github.com/tokio-rs/tokio/issues/3803> for more information.

Signed-off-by: Will Manley <will@williammanley.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:29:03 +02:00
Michael Kerrisk ae5cc0dc57 vdso.7: Minor tweak to Alejandro Colomar's patch
The correct kernel version seems to 5.11, not 5.10:

$ git describe --contains d0e3fc69d00d
v5.11-rc1~76^2~251

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:22:49 +02:00
Alejandro Colomar 7a398162a8 vdso.7: Add y2038 compliant gettime for ppc/32
Christophe Leroy via Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=213421

[
In ppc32 functions section, the Y2038 compliant function
__kernel_clock_gettime64() is missing.

It was added by commit d0e3fc69d00d
("powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32")
]

.../linux$ git describe d0e3fc69d00d
v5.10-rc2-76-gd0e3fc69d00d

Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:20:53 +02:00
Michael Kerrisk afaa08a481 strlen.3, wcslen.3: Recommend alternatives where input buffer might not be null-terminated
Reported-by: Jonny Grant <jg@jguk.org>
Reported-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:16:15 +02:00
Michael Kerrisk 21b8af1f3c execve.2: The pathname given to interpreter is not necessarily absolute
As pointed out by Nora, the example shown in the manual
page already demonstrates that the pathname is not absolute!

Reported-by: Nora Platiel <nplatiel@gmx.us>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:01:21 +02:00
Michael Kerrisk dc3037bf4d getauxval.3: SEE ALSO: add execve(2)
Since this page discusses program execution, a link to execve(2)
seems appropriate.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:58:01 +02:00
Michael Kerrisk 8a7dd01825 execve.2: SEE ALSO: getauxval(3)
getauxval(3) is useful background regarding execve(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:55:54 +02:00
Jakub Wilk 515fa99a9a seccomp_unotify.2: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:13:31 +02:00
Michael Kerrisk 54ae7ac441 seccomp_unotify.2: Minor tweaks (part 2) to Rodrigo's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:12:43 +02:00
Alejandro Colomar 1cca69d3a7 seccomp_unotify.2: Minor tweaks to Rodrigo's patch
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:02:59 +02:00
Rodrigo Campos 3e2656812f seccomp_unotify.2: Document SECCOMP_ADDFD_FLAG_SEND
This flag was recently added to Linux 5.14 by a patch I wrote:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c

This patch adds documentation for the flag, the error code that the flag
added and explains in the caveat when it is useful.

Signed-off-by: Rodrigo Campos <rodrigo@kinvolk.io>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 03:00:30 +02:00
Dan Robertson 6131983d24 man2/fallocate.2: tfix documentation of shared blocks
Fix a typo in the documentation of using fallocate to allocate shared
blocks. The flag FALLOC_FL_UNSHARE should instead be documented as
FALLOC_FL_UNSHARE_RANGE.

Fixes: 63a599c657 ("man2/fallocate.2: Document behavior with shared blocks")
Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:53:50 +02:00
Alejandro Colomar 20c2c5ced3 posixoptions.7: Fix legacy functions list (s/getcwd/getwd/)
Alan:

[
The on-line copy of the manual page "posixoptions(7)" dated
2018-04-30 has an entry for "getcwd()" in the section headed
"XSI - _XOPEN_LEGACY - _SC_XOPEN_LEGACY".
I believe that entry should be "getwd()" as that is the API call
which was present in X/Open-6 but withdrawn in X/Open-7.
]

mtk: confirmed by reviewing the table ("Removed Functions and
Symbols in Issue 7") at the end of Section B.1.1 on page
3564 of IEEE Std 1003.1, 2016 Edition.

Reported-by: Alan Peakall <Alan.Peakall@helpsystems.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:50:05 +02:00
Michael Kerrisk f5dfd9a032 vdso.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:16:30 +02:00
Michael Kerrisk 5fc054ecd9 vdso.7: Update CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE info for powerpc
See https://bugzilla.kernel.org/show_bug.cgi?id=213419
ppc/32 and ppc/64 sections both have the following note:

    The CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE clocks are
    not supported by the __kernel_clock_getres and
    __kernel_clock_gettime interfaces; the kernel falls back to the
    real system call

This note has been wrong from quite some time now, since commit
654abc69ef2e ("powerpc/vdso32: Add support for
CLOCK_{REALTIME/MONOTONIC}_COARSE") and commit
5c929885f1bb ("powerpc/vdso64: Add support for
CLOCK_{REALTIME/MONOTONIC}_COARSE")

Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:13:49 +02:00
Viet Than c9992ba76c time.2: wfix regarding year-2038
Signed-off-by: Viet Than <thanhoangviet@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:58:24 +02:00
Michael Kerrisk f95aa6f05b strstr.3: wfix
Remove text that is probably redundant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:52:08 +02:00
Alejandro Colomar ec415ad970 strstr.3: Document special case for empty needle
Reported-by: Stefan Kanthak <stefan.kanthak@nexgo.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:50:20 +02:00
Štěpán Němec f05d7043fe namespaces.7: Fix confusion caused by text reorganization
Since commit ee81d7e418, the flags list has been (only) above, not
below, these references.

(The flags table was added even before that, in commit 0b497138b9
("namespaces.7: Add table of namespaces to top of page"))

Fixes: ee81d7e418 ("namespaces.7: Include manual page references in the summary table of namespace types")
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:47:59 +02:00
Michael Kerrisk 6b1817e09d printf.3: tfix
Reported-by: Sergey Petrakov <kr@spmail.info>
Reported-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:08:01 +02:00
Michael Kerrisk a42acb62df wait.2: Minor fixes to Richard Palethorpe's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:04:04 +02:00
Richard Palethorpe 136ae439fb wait.2: Add ESRCH for when pid == INT_MIN
Please see upstream commit:

 commit dd83c161fbcc5d8be637ab159c0de015cbff5ba4
 Author: zhongjiang <zhongjiang@huawei.com>
 Date:   Mon Jul 10 15:53:01 2017 -0700

     kernel/exit.c: avoid undefined behaviour when calling wait4()

It avoids negating INT_MIN by returning early with ESRCH.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:32 +02:00
Jakub Wilk bd9aa1b762 proc.5: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:32 +02:00
Sagar Patel 85ac075357 tkill.2: tfix
Correct function signature by adding missing parenthesis.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:32 +02:00
Jakub Wilk 1d32ab01fc scripts/bash_aliases: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:32 +02:00
наб 33e2aa41ff ascii.7: ffix: add vertical rule to separate the two columns
I regularly get mildly lost in this table (and, indeed, didn't realise
it had two columns the first few times I used it to look at something
from the left column) ‒ separating the two columns improves clarity,
and makes which soup of numbers belongs to which character
much more obvious

Other encodings don't need this as they don't use double-columnated
tables

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:24 +02:00
kXuan 5612f82093 recv.2: tfix
The recv.2 misspelled `SO_EE_OFFENDER` to `SOCK_EE_OFFENDER`.

This patch fix this typo.

Signed-off-by: kXuan <kxuanobj@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:42:41 +02:00
Kir Kolyshkin 57fb49f9ae user_namespaces.7: Fix a reference to a kernel document
The file being referred to no longer exists, as it was moved to
*.rst first (commit 20a78ae9ed297f2) and then to under
admin-guide (commit bf6b7a742e3f82b). Both those commits
are from 2019 (Linux 5.3).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:40:29 +02:00
Kir Kolyshkin 36e6250f14 capabilities.7: tfix
Add a missing comma.

Fixes: 3dcdef9437
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:39:02 +02:00
Štěpán Němec 2f05137b6a path_resolution.7: tfix
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:36:17 +02:00
Thomas Voss aa1f53ccf9 Various pages: Consistently use '*argv[]'
Scripted change:

$ find man? -type f \
  | sed -i 's/int argc, char \*\*argv/int argc, char \*argv\[\]/';

Signed-off-by: Thomas Voss <thomasavoss@protonmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:34:45 +02:00
33 changed files with 122 additions and 32 deletions

View File

@ -1212,7 +1212,7 @@ riscv (since Linux 5.1).
* 4. print number of received TCP/UDP packets every second
*/
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int sock, map_fd, prog_fd, key;
long long value = 0, tcp_cnt, udp_cnt;

View File

@ -236,7 +236,7 @@ or server-side-copy (in the case of NFS).
#include <unistd.h>
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int fd_in, fd_out;
struct stat stat;

View File

@ -346,7 +346,7 @@ will be invoked with the following arguments:
.PP
where
.I pathname
is the absolute pathname of the file specified as the first argument of
is the pathname of the file specified as the first argument of
.BR execve (),
and
.I arg...
@ -882,6 +882,7 @@ argv[4]: world
.BR ptrace (2),
.BR exec (3),
.BR fexecve (3),
.BR getauxval (3),
.BR getopt (3),
.BR system (3),
.BR capabilities (7),

View File

@ -81,7 +81,7 @@ Preallocating zeroed blocks beyond the end of the file in this manner
is useful for optimizing append workloads.
.PP
If the
.B FALLOC_FL_UNSHARE
.B FALLOC_FL_UNSHARE_RANGE
flag is specified in
.IR mode ,
shared file data extents will be made private to the file to guarantee

View File

@ -358,7 +358,7 @@ slow_path(int *read_a)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int read_a, read_b;
@ -444,7 +444,7 @@ slow_path(int *read_a)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int read_a, read_b;

View File

@ -3762,7 +3762,7 @@ perf_event_open(struct perf_event_attr *hw_event, pid_t pid,
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
struct perf_event_attr pe;
long long count;

View File

@ -243,7 +243,9 @@ If some data was successfully read, it will return the number of bytes read.
If no bytes were read, it will return \-1 and set
.IR errno
to
.BR EAGAIN .
.BR EAGAIN
(but see
.BR BUGS ).
Currently, this flag is meaningful only for
.BR preadv2 ().
.TP
@ -425,6 +427,18 @@ iov[1].iov_len = strlen(str1);
nwritten = writev(STDOUT_FILENO, iov, 2);
.EE
.in
.SH BUGS
Linux 5.9 and 5.10 have a bug where
.BR preadv2()
with the
.BR RWF_NOWAIT
flag may return 0 even when not at end of file.
.\" See
.\" <https://lore.kernel.org/linux-fsdevel/fea8b16d-5a69-40f9-b123-e84dcd6e8f2e@www.fastmail.com/T/#u>
.\" The bug was introduced in
.\" efa8480a831 fs: RWF_NOWAIT should imply IOCB_NOIO
.\"and fixed in
.\" 06c0444290 mm/filemap.c: generic_file_buffered_read() now uses find_get_pages_contig
.SH SEE ALSO
.BR pread (2),
.BR read (2),

View File

@ -196,7 +196,7 @@ number of the queued error.
is the origin code of where the error originated.
The other fields are protocol-specific.
The macro
.B SOCK_EE_OFFENDER
.B SO_EE_OFFENDER
returns a pointer to the address of the network object
where the error originated from given a pointer to the ancillary message.
If this address is not known, the

View File

@ -1199,7 +1199,7 @@ install_filter(int syscall_nr, int t_arch, int f_errno)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
if (argc < 5) {
fprintf(stderr, "Usage: "

View File

@ -739,6 +739,22 @@ When allocating the file descriptor in the target,
use the file descriptor number specified in the
.I newfd
field.
.TP
.BR SECCOMP_ADDFD_FLAG_SEND " (since Linux 5.14)"
.\" commit 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c
Perform the equivalent of
.B SECCOMP_IOCTL_NOTIF_ADDFD
plus
.B SECCOMP_IOCTL_NOTIF_SEND
as an atomic operation.
On successful invocation, the target process's
.I errno
will be 0
and the return value will be the file descriptor number
that was allocated in the target.
If allocating the file descriptor in the target fails,
the target's system call continues to be blocked
until a successful response is sent.
.RE
.TP
.I srcfd
@ -801,6 +817,13 @@ Allocating the file descriptor in the target would cause the target's
limit to be exceeded (see
.BR getrlimit (2)).
.TP
.B EBUSY
If the flag
.B SECCOMP_IOCTL_NOTIF_SEND
is used, this means the operation can't proceed until other
.B SECCOMP_IOCTL_NOTIF_ADDFD
requests are processed.
.TP
.B EINPROGRESS
The user-space notification specified in the
.I id
@ -1085,7 +1108,7 @@ Alternatively, in the
example, the supervisor might use
.BR poll (2)
to monitor both the notification file descriptor
(so as as to discover when the target's
(so as to discover when the target's
.BR accept (2)
call has been interrupted) and the listening file descriptor
(so as to know when a connection is available).
@ -1150,6 +1173,14 @@ flag.
.\" calls because it's impossible for the kernel to restart the call
.\" with the right timeout value. I wonder what happens when those
.\" system calls are restarted in the scenario we're discussing.)
.PP
Furthermore, if the supervisor response is a file descriptor
added with
.BR SECCOMP_IOCTL_NOTIF_ADDFD ,
then the flag
.B SECCOMP_ADDFD_FLAG_SEND
can be used to atomically add the file descriptor and return that value,
making sure no file descriptors are inadvertently leaked into the target.
.SH BUGS
If a
.BR SECCOMP_IOCTL_NOTIF_RECV

View File

@ -93,7 +93,7 @@ specified as NULL cannot fail with the error
.BR EOVERFLOW ,
even on ABIs where
.I time_t
is a signed 32-bit integer and the clock ticks past the time 2**31
is a signed 32-bit integer and the clock reaches or exceeds 2**31 seconds
(2038-01-19 03:14:08 UTC, ignoring leap seconds).
(POSIX.1 permits, but does not require, the
.B EOVERFLOW

View File

@ -39,7 +39,7 @@ tkill, tgkill \- send a signal to a thread
.PP
.B #include <signal.h>
.PP
.BI "int tgkill, pid_t " tgid ", pid_t " tid ", int " sig );
.BI "int tgkill(pid_t " tgid ", pid_t " tid ", int " sig );
.fi
.PP
.IR Note :

View File

@ -455,6 +455,15 @@ was caught; see
The
.I options
argument was invalid.
.TP
.B ESRCH
(for
.BR wait ()
or
.BR waitpid ())
.I pid
is equal to
.BR INT_MIN .
.SH CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES

View File

@ -124,7 +124,7 @@ compmi(const void *m1, const void *m2)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
qsort(months, nr_of_months, sizeof(months[0]), compmi);
for (int i = 1; i < argc; i++) {

View File

@ -287,6 +287,7 @@ could not be found from the case where the value corresponding to
.I type
was zero.
.SH SEE ALSO
.BR execve (2),
.BR secure_getenv (3),
.BR vdso (7),
.BR ld\-linux.so (8)

View File

@ -491,7 +491,7 @@ with most of its features.
#include <getopt.h>
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int c;
int digit_optind = 0;

View File

@ -160,7 +160,7 @@ The following program expects suboptions following a "\-o" option.
#include <stdio.h>
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
enum {
RO_OPT = 0,

View File

@ -115,7 +115,7 @@ is the same as
except that it outputs to a file descriptor,
.IR fd ,
instead of to a
.I stdio
.BR stdio (3)
stream.
.PP
The functions

View File

@ -180,7 +180,7 @@ threadfunc(void *parm)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
pthread_t thread;
int rc;

View File

@ -64,6 +64,11 @@ T} Thread safety MT-Safe
.hy
.ad
.sp 1
.SH NOTES
In cases where the input buffer may not contain
a terminating null byte,
.BR strnlen (3)
should be used instead.
.SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD.
.SH SEE ALSO

View File

@ -61,6 +61,13 @@ but ignores the case of both arguments.
.SH RETURN VALUE
These functions return a pointer to the beginning of the
located substring, or NULL if the substring is not found.
.PP
If
.I needle
is the empty string,
the return value is always
.I haystack
itself.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).

View File

@ -56,6 +56,11 @@ T} Thread safety MT-Safe
.hy
.ad
.sp 1
.SH NOTES
In cases where the input buffer may not contain
a terminating null wide character,
.BR wcsnlen (3)
should be used instead.
.SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99.
.SH SEE ALSO

View File

@ -240,7 +240,7 @@ is approximately that of "ls [a-c]*.c".
#include <wordexp.h>
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
wordexp_t p;
char **w;

View File

@ -5606,7 +5606,7 @@ first.
.IR /proc/sys/vm/sysctl_hugetlb_shm_group " (since Linux 2.6.7)"
This writable file contains a group ID that is allowed
to allocate memory using huge pages.
If a process has a filesystem group ID or any supplememtary group ID that
If a process has a filesystem group ID or any supplementary group ID that
matches this group ID,
then it can make huge-page allocations without holding the
.BR CAP_IPC_LOCK

View File

@ -48,7 +48,7 @@ C program \f(CW\(aq\eX\(aq\fP escapes are noted.
.ft CW
\}
.TS
l l l l l l l l.
l l l l | l l l l.
Oct Dec Hex Char Oct Dec Hex Char
_
000 0 00 NUL \(aq\e0\(aq (null character) 100 64 40 @

View File

@ -215,7 +215,7 @@ Lock memory
.BR shmctl (2));
.IP *
Allocate memory using huge pages
.RB ( memfd_create (2)
.RB ( memfd_create (2),
.BR mmap (2),
.BR shmctl (2)).
.PD 0
@ -349,6 +349,13 @@ write a group ID mapping in a user namespace (see
.TP
.BR CAP_SETFCAP " (since Linux 2.6.24)"
Set arbitrary capabilities on a file.
.IP
.\" commit db2e718a47984b9d71ed890eb2ea36ecf150de18
Since Linux 5.12, this capability is
also needed to map UID 0 (as in
.IR "unshare \-Ur" ;
see
.BR unshare (1)).
.TP
.B CAP_SETPCAP
If file capabilities are supported (i.e., since Linux 2.6.24):

View File

@ -1069,7 +1069,7 @@ $ \fBmkdir \-p /home/user/testdir\fP # In another terminal
#define BUF_SIZE 256
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int fd, ret, event_fd, mount_fd;
ssize_t len, path_len;

View File

@ -97,7 +97,7 @@ If the
.I flags
argument of the call specifies one or more of the
.B CLONE_NEW*
flags listed below, then new namespaces are created for each flag,
flags listed above, then new namespaces are created for each flag,
and the child process is made a member of those namespaces.
(This system call also implements a number of features
unrelated to namespaces.)
@ -119,7 +119,7 @@ If the
.I flags
argument of the call specifies one or more of the
.B CLONE_NEW*
flags listed below, then new namespaces are created for each flag,
flags listed above, then new namespaces are created for each flag,
and the calling process is made a member of those namespaces.
(This system call also implements a number of features
unrelated to namespaces.)

View File

@ -63,7 +63,7 @@ argument).
The current working directory is inherited from the parent, and can
be changed by use of the
.BR chdir (2)
system call.)
system call.
.PP
Pathnames starting with a \(aq/\(aq character are called absolute pathnames.
Pathnames not starting with a \(aq/\(aq are called relative pathnames.

View File

@ -968,7 +968,7 @@ The following functions are present:
.IR fcvt ()
.IR ftime ()
.IR gcvt ()
.IR getcwd ()
.IR getwd ()
.IR index ()
.IR mktemp ()
.IR rindex ()

View File

@ -577,6 +577,12 @@ or be in the parent user namespace of the process
The mapped user IDs (group IDs) must in turn have a mapping
in the parent user namespace.
.IP 4.
.\" commit db2e718a47984b9d71ed890eb2ea36ecf150de18
If a writing process is root (i.e., UID 0) trying to map host user ID 0,
it must have the
.B CAP_SETFCAP
capability (since Linux 5.12).
.IP 5.
One of the following two cases applies:
.RS
.IP * 3
@ -1383,4 +1389,4 @@ main(int argc, char *argv[])
.BR pid_namespaces (7)
.PP
The kernel source file
.IR Documentation/namespaces/resource\-control.txt .
.IR Documentation/admin\-guide/namespaces/resource\-control.rst .

View File

@ -256,7 +256,6 @@ it's best to refer to the public documentation:
http://docs.blackfin.uclinux.org/doku.php?id=linux\-kernel:fixed\-code
.SS mips functions
.\" See linux/arch/mips/vdso/vdso.ld.S
.PP
The table below lists the symbols exported by the vDSO.
.if t \{\
.ft CW
@ -371,6 +370,7 @@ symbol version
_
__kernel_clock_getres LINUX_2.6.15
__kernel_clock_gettime LINUX_2.6.15
__kernel_clock_gettime64 LINUX_5.11
__kernel_datapage_offset LINUX_2.6.15
__kernel_get_syscall_map LINUX_2.6.15
__kernel_get_tbfreq LINUX_2.6.15
@ -386,7 +386,9 @@ __kernel_sync_dicache_p5 LINUX_2.6.15
.ft P
\}
.PP
The
In kernel versions before Linux 5.6,
.\" commit 654abc69ef2e69712e6d4e8a6cb9292b97a4aa39
the
.B CLOCK_REALTIME_COARSE
and
.B CLOCK_MONOTONIC_COARSE
@ -424,7 +426,9 @@ __kernel_sync_dicache_p5 LINUX_2.6.15
.ft P
\}
.PP
The
In kernel versions before Linux 4.16,
.\" commit 5c929885f1bb4b77f85b1769c49405a0e0f154a1
the
.B CLOCK_REALTIME_COARSE
and
.B CLOCK_MONOTONIC_COARSE

View File

@ -24,7 +24,7 @@ EX_USAGE=64;
# C
# sed_rm_ccomments() removes C comments.
# It can't handle multiple comments in a sinlge line correctly,
# It can't handle multiple comments in a single line correctly,
# nor mixed or embedded //... and /*...*/ comments.
# Use as a filter (see man_lsfunc() in this file).