Commit Graph

20306 Commits

Author SHA1 Message Date
Michael Kerrisk 0298af6579 Ready for 5.04 2019-11-19 15:27:30 +01:00
Michael Kerrisk 0f02138de7 Removed trailing white space at end of lines 2019-11-19 15:27:18 +01:00
Michael Kerrisk 166f4fc75e bpf-helpers.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 15:26:39 +01:00
Michael Kerrisk c32ac4bbb9 clone.2, fallocate.2, ioctl_iflags.2, ioctl_list.2, pidfd_open.2, pivot_root.2, quotactl.2, seccomp.2, select.2, wait.2, proc.5, cgroups.7, netdevice.7, uts_namespaces.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 15:25:14 +01:00
Michael Kerrisk 82cd32a2a9 Changes: Ready for 5.04
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 15:23:17 +01:00
Michael Kerrisk edca873239 bpf-helpers.7: Fix .TH line
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:50:47 +01:00
Michael Kerrisk 29965ffceb bpf-helpers.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:39:37 +01:00
Michael Kerrisk e6107b296a bpf-helpers.7: Refresh against kernel v5.4-rc7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:36:56 +01:00
Christian Brauner be66dbc7a7 clone.2: Use pid_t for clone3() {child,parent}_tid
Advertise to userspace that they should use proper pid_t types
for arguments returning a pid.

The kernel-internal struct kernel_clone_args currently uses int
as type and since POSIX mandates that pid_t is a signed integer
type and glibc and friends use int this is not an issue. After
the merge window for v5.5 closes we can switch struct
kernel_clone_args over to using pid_t as well without any danger
in regressing current userspace.

Also note, that the new set tid feature which will be merged for
v5.5 uses pid_t types as well.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:58:24 +01:00
Christian Brauner 8eea66b8bb clone.2: Check for MAP_FAILED not NULL on mmap()
If mmap() fails it will return MAP_FAILED which according to the manpage
is (void *)-1 not NULL.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:56:07 +01:00
Christian Brauner 225f5da8ac clone.2: tfix
Fix two spelling mistakes in manpage describing the clone{2,3}()
syscalls/syscall wrappers.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:55:46 +01:00
Michael Kerrisk efc7fb935e mmap.2: tfix
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-16 23:35:14 +01:00
Michael Kerrisk 91243dad42 mmap.2: Some rewording of the description of MAP_STACK
Reword a little to allow for the fact that there are now
*two* reasons to consider using this flag.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:52 +01:00
Michael Kerrisk d3d881232b mmap.2: Note that MAP_STACK exists on some other systems
As noted in man-pages commit 99c3a00027,
MAP_STACK exists on at least OpenBSD and FreeBSD.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:52 +01:00
Michael Kerrisk 1b54731692 pivot_root.2: EXAMPLE: allocate stack using mmap() MAP_STACK rather than malloc()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:45 +01:00
Michael Kerrisk 99c3a00027 clone.2: Allocate child's stack using mmap(2) rather than malloc(3)
Christian Brauner suggested mmap(MAP_STACKED), rather than
malloc(), as the canonical way of allocating a stack for the
child of clone(), and Jann Horn noted some reasons why:

    Not on Linux, but on OpenBSD, they do use MAP_STACK now
    AFAIK; this was announced here:
    <http://openbsd-archive.7691.n7.nabble.com/stack-register-checking-td338238.html>.
    Basically they periodically check whether the userspace
    stack pointer points into a MAP_STACK region, and if not,
    they kill the process. So even if it's a no-op on Linux, it
    might make sense to advise people to use the flag to improve
    portability? I'm not sure if that's something that belongs
    in Linux manpages.

    Another reason against malloc() is that when setting up
    thread stacks in proper, reliable software, you'll probably
    want to place a guard page (in other words, a 4K PROT_NONE
    VMA) at the bottom of the stack to reliably catch stack
    overflows; and you probably don't want to do that with
    malloc, in particular with non-page-aligned allocations.

And the OpenBSD 6.5 manual pages says:

    MAP_STACK
        Indicate that the mapping is used as a stack. This
        flag must be used in combination with MAP_ANON and
        MAP_PRIVATE.

And I then noticed that MAP_STACK seems already to be on
FreeBSD for a long time:

    MAP_STACK
        Map the area as a stack.  MAP_ANON is implied.
        Offset should be 0, fd must be -1, and prot should
        include at least PROT_READ and PROT_WRITE.  This
        option creates a memory region that grows to at
        most len bytes in size, starting from the stack
        top and growing down.  The stack top is the start‐
        ing address returned by the call, plus len bytes.
        The bottom of the stack at maximum growth is the
        starting address returned by the call.

        The entire area is reserved from the point of view
        of other mmap() calls, even if not faulted in yet.

Reported-by: Jann Horn <jannh@google.com>
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 12:19:21 +01:00
Jakub Wilk 0f2b59f5ca strftime.3: wfix
Fix comma splice.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-13 20:35:53 +01:00
Michael Kerrisk 8dd6b0bcd2 clone.2: Minor tweaks after feedback from Christian Brauner
Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-10 20:39:17 +01:00
Jakub Wilk edf93e146d clone.2: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 12:54:41 +01:00
Michael Kerrisk baa435c66c clone.2: Tidy up the description of CLONE_DETACHED
The obsolete CLONE_DETACHED flag has never been properly
documented, but now the discussion CLONE_PIDFD also requires
mention of CLONE_DETACHED. So, properly document CLONE_DETACHED,
and mention its interactions with CLONE_PIDFD.

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk f6183e5b21 clone.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk 981eda4aa5 clone.2: Consistently order paragraphs for CLONE_NEW* flags
Sometimes the descriptions of these flags mentioned the
corresponding section 7 namespace manual page and then the
required capabilities, and sometimes the order was the was
the reverse. Make it consistent.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk d2799a466c clone.2: Remove various details that are already covered in namespaces pages
Remove details of UTS, IPC, and network namespaces that are
already covered in the corresponding namespaces pages in
section 7. This change is for consistency, since corresponding
details were not provided for other namespace types in clone(2)
and these details do not appear in unshare(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk 4791ea7fda uts_namespaces.7: Add a little more detail on scope of UTS namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk 1270276bc3 clone.2: Remove wording that suggests CLONE_NEW* flags are for containers
These flags are used for implementing many other interesting
things by now.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk f5d5180f5c clone.2: Adjustments to clone3() text as well as some other details in the page
After feedback from Christian Brauner [1], I've adjusted a few pieces
of the clone3() text, and also adjusted some of the older text in
the page.

[1] https://lore.kernel.org/linux-man/20191107151941.dw4gtul5lrtax4se@wittgenstein/

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:02 +01:00
Michael Kerrisk 1033756742 clone.2: Give the introductory paragraph a new coat of paint
Change the text in the introductory paragraph (which was written
20 years ago) to reflect the fact that clone*() does more things
nowadays.

Cowritten-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-08 16:32:38 +01:00
Michael Kerrisk 85d764718b resolv.conf.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-07 13:21:53 +01:00
Florian Weimer 551162f54f resolv.conf.5: Attempt clarify domain/search interaction
The domain directive is historic at this point; it should not
be used.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-07 13:20:35 +01:00
Michael Kerrisk 49cb13ca52 signal-safety.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 10:38:54 +01:00
Michael Kerrisk 1373b98190 ioctl_iflags.2: Emphasize that FS_IOC_GETFLAGS and FS_IOC_SETFLAGS argument is 'int *'
Reported-by: Robert Edmonds <edmonds@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 10:31:39 +01:00
Michael Kerrisk 556e715a8a ioctl_list.2: Add reference to ioctl(2) SEE ALSO section
The referenced section lists various pages that document ioctls.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 10:06:03 +01:00
Michael Kerrisk a1b3319b7c netdevice.7: Small wording fix in description of SIOCGIFCONF
SIOCGIFCONF returns "network layer" addresses (not "transport
layer").

Reported-by: Silviu Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 09:25:21 +01:00
Andrew Price 3bf86e7d53 fallocate.2: Add gfs2 to the list of punch hole-capable filesystems
Also remove a stray " from the previous item.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-01 09:35:12 +01:00
Michael Kerrisk 75e28ebad4 clone.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 14:22:13 +01:00
Michael Kerrisk 400027959e clone.2, proc.5: Adjust references to namespaces(7)
Adjust references to namespaces(7) to be references to pages
describing specific namespace types.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 11:34:08 +01:00
Michael Kerrisk 96e60ae500 quotactl.2: wfix: consistently use 'operation', rather than 'command'
A mix of the two words was being used, with 'operation' being
more common.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 07:02:10 +01:00
Michael Kerrisk a5394cba1c quotactl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 07:02:10 +01:00
Michael Kerrisk f5fd82cc4e quotactl.2: Minor tweaks to Yang Xu's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 07:02:10 +01:00
Yang Xu ae848b1d80 quotactl.2: Add some details about Q_QUOTAON
For Q_QUOTAON, on old kernel we can use quotacheck -ug to generate
quota files. But in current kernel, we can also hide them in
system inodes and indicate them by using "quota" or project
feature.

For user or group quota, we can do as below (etc ext4):

mkfs.ext4 -F -o quota /dev/sda5
mount /dev/sda5 /mnt
quotactl(QCMD(Q_QUOTAON, USRQUOTA), /dev/sda5, QFMT_VFS_V0, NULL);

For project quota, we can do as below (etc ext4):

mkfs.ext4 -F -o quota,project /dev/sda5
mount /dev/sda5 /mnt
quotactl(QCMD(Q_QUOTAON, PRJQUOTA), /dev/sda5, QFMT_VFS_V0, NULL);

Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 07:01:59 +01:00
Yang Xu 13a07cc485 copy_file_range.2: tfix
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:24:58 +01:00
Jakub Wilk a9e52b437f clone.2: Include clone3 in NAME section.
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:22:15 +01:00
Jakub Wilk 1191b4e7b2 netlink.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:21:50 +01:00
Torin Carey 897367f900 unix.7: tfix
In the given example, the second recvmsg(2) call should receive four bytes,
as the third sendmsg(2) call only sends four.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:18:30 +01:00
Torin Carey 6a14132925 unix.7: tfix
Signed-off-by: Torin Carey <torin@tcarey.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:18:19 +01:00
Michael Kerrisk 4e4e9e83b6 pidfd_open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-30 10:23:10 +01:00
Michael Kerrisk 640453bbea cgroups.7: Switch to "considerate language"
Thanks-to: https://twitter.com/expensivestevie
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-28 14:32:07 +01:00
Michael Kerrisk 462ce23d49 seccomp.2: Switch to "considerate language"
Thanks-to: https://twitter.com/expensivestevie
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-28 12:40:36 +01:00
Michael Kerrisk 16853a31ee clone.2: Introduce "flags mask" as a generic term for clone()/clone3()
Use "flags mask" as a generic term to refer to the clone()
'flags' argument and the clone3() 'cl_args.flags' field.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-25 21:51:04 +02:00
Michael Kerrisk 5261b0fe75 clone.2: Minor improvements following clone3() additions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-25 21:20:38 +02:00