]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
6 years agoReady for 4.14 man-pages-4.14
Michael Kerrisk [Sun, 26 Nov 2017 11:42:33 +0000 (12:42 +0100)] 
Ready for 4.14

6 years agoRemoved trailing white space at end of lines
Michael Kerrisk [Sun, 26 Nov 2017 11:42:22 +0000 (12:42 +0100)] 
Removed trailing white space at end of lines

6 years agogetpid.2, pipe.2, abort.3, daemon.3, pthread_yield.3, stdio.3, sysconf.3, tty.4,...
Michael Kerrisk [Sun, 26 Nov 2017 11:38:46 +0000 (12:38 +0100)] 
getpid.2, pipe.2, abort.3, daemon.3, pthread_yield.3, stdio.3, sysconf.3, tty.4, shells.5, sysfs.5, fifo.7, hier.7, icmp.7, path_resolution.7, pid_namespaces.7, standards.7: tstamp

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoveth.4: Add missing license tags
Michael Kerrisk [Sun, 26 Nov 2017 11:36:20 +0000 (12:36 +0100)] 
veth.4: Add missing license tags

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoChanges: Ready for 4.14
Michael Kerrisk [Sun, 26 Nov 2017 09:25:53 +0000 (10:25 +0100)] 
Changes: Ready for 4.14

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoChanges.old: wsfix
Michael Kerrisk [Sun, 26 Nov 2017 10:28:07 +0000 (11:28 +0100)] 
Changes.old: wsfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomakedev.3: Minor fixes to Adrian Bunk's patch
Michael Kerrisk [Sat, 25 Nov 2017 13:23:05 +0000 (14:23 +0100)] 
makedev.3: Minor fixes to Adrian Bunk's patch

Note glibc version where deprecation occurred.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomakedev.3: glibc has deprecated exposing the definitions via <sys/types.h>
Adrian Bunk [Sat, 25 Nov 2017 10:12:07 +0000 (12:12 +0200)] 
makedev.3: glibc has deprecated exposing the definitions via <sys/types.h>

Compile warning with glibc 2.25:

    warning: In the GNU C Library, "makedev" is defined by
    <sys/sysmacros.h>. For historical compatibility, it is
    currently defined by <sys/types.h> as well, but we plan to
    remove this soon.  To use "makedev", include <sys/sysmacros.h>
    directly. If you did not intend to use a system-defined macro
    "makedev", you should undefine it after including
    <sys/types.h>.

Background: glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoopen_by_handle_at.2: srcfix
Michael Kerrisk [Fri, 24 Nov 2017 08:32:27 +0000 (09:32 +0100)] 
open_by_handle_at.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoopen_by_handle_at.2: Clarify MAX_HANDLE_SZ
NeilBrown [Thu, 23 Nov 2017 23:53:36 +0000 (10:53 +1100)] 
open_by_handle_at.2: Clarify MAX_HANDLE_SZ

As hinted in the kernel source, MAX_HANDLE_SZ is a hint
rather than a promise:

    /* limit the handle size to NFSv4 handle size now */
    #define MAX_HANDLE_SZ 128

Note the "now" (probably should be "for now").
So change the description to make this clear.

Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agogetgroups.2: Minor restructuring of CONFORMING TO
Michael Kerrisk [Thu, 23 Nov 2017 20:46:50 +0000 (21:46 +0100)] 
getgroups.2: Minor restructuring of CONFORMING TO

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoarch_prctl.2: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:45:02 +0000 (21:45 +0100)] 
arch_prctl.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosetuid.2: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:43:45 +0000 (21:43 +0100)] 
setuid.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agollseek.2, lseek.2: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:42:11 +0000 (21:42 +0100)] 
llseek.2, lseek.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoioctl.2: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:39:45 +0000 (21:39 +0100)] 
ioctl.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoconnect.2: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:38:24 +0000 (21:38 +0100)] 
connect.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Remove an unnecessary sentence
Michael Kerrisk [Thu, 23 Nov 2017 20:24:53 +0000 (21:24 +0100)] 
errno.3: Remove an unnecessary sentence

Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: wfix
Michael Kerrisk [Thu, 23 Nov 2017 20:24:21 +0000 (21:24 +0100)] 
errno.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agopipe.2: Since Linux 4.5, fcntl() can be used to set O_DIRECT for a pipe
Michael Kerrisk [Thu, 23 Nov 2017 12:35:01 +0000 (13:35 +0100)] 
pipe.2: Since Linux 4.5, fcntl() can be used to set O_DIRECT for a pipe

See https://bugzilla.kernel.org/show_bug.cgi?id=197917

Reported-by: Marin H. <mar-tSIEzQ@neutronstar.noip.me>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agofifo.7: Refer reader to pipe(7) for details of I/O semantics of FIFOs
Michael Kerrisk [Thu, 23 Nov 2017 12:20:38 +0000 (13:20 +0100)] 
fifo.7: Refer reader to pipe(7) for details of I/O semantics of FIFOs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Note the use of perror(3) and strerror(3)
Michael Kerrisk [Thu, 23 Nov 2017 09:48:58 +0000 (10:48 +0100)] 
errno.3: Note the use of perror(3) and strerror(3)

Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Minor wording change
Michael Kerrisk [Thu, 23 Nov 2017 09:39:59 +0000 (10:39 +0100)] 
errno.3: Minor wording change

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Explicitly note that error numbers vary also across UNIX systems
Michael Kerrisk [Thu, 23 Nov 2017 09:31:32 +0000 (10:31 +0100)] 
errno.3: Explicitly note that error numbers vary also across UNIX systems

Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Recast the advice against manually declaring 'errno'
Michael Kerrisk [Thu, 23 Nov 2017 09:25:45 +0000 (10:25 +0100)] 
errno.3: Recast the advice against manually declaring 'errno'

Recast the advice against manually declaring 'errno' to
a more modern perspective. It's 13 years since the original
text was added, and even then it was describing old behavior.
Cast the description to be about behavior further away in
time, and note more clearly that manual declaration will
cause problems with modern C libraries.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: tfix
Michael Kerrisk [Thu, 23 Nov 2017 09:14:03 +0000 (10:14 +0100)] 
errno.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Note use of errno(1) to look up error names and numbers
Michael Kerrisk [Thu, 23 Nov 2017 09:03:40 +0000 (10:03 +0100)] 
errno.3: Note use of errno(1) to look up error names and numbers

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Note that error numbers vary somewhat across architectures
Michael Kerrisk [Thu, 23 Nov 2017 09:00:24 +0000 (10:00 +0100)] 
errno.3: Note that error numbers vary somewhat across architectures

Added after a patch from Wesley Aptekar-Cassels that proposed
to add error numbers to the text.

Reported-by: Wesley Aptekar-Cassels <w.aptekar@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Error numbers are positive values (rather than nonzero values)
Michael Kerrisk [Thu, 23 Nov 2017 08:53:28 +0000 (09:53 +0100)] 
errno.3: Error numbers are positive values (rather than nonzero values)

POSIX.1-2008 noted the explicitly the change (to align with
the C standards) that error numbers are positive, rather
than nonzero.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Reorganize the text and and some subheadings
Michael Kerrisk [Thu, 23 Nov 2017 08:52:17 +0000 (09:52 +0100)] 
errno.3: Reorganize the text and and some subheadings

Restructure the text and add some subheadings for better
readability. No (intentional) content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Note the <errno.h> also provides the symbolic error names
Michael Kerrisk [Thu, 23 Nov 2017 08:46:19 +0000 (09:46 +0100)] 
errno.3: Note the <errno.h> also provides the symbolic error names

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Minor text reorganization
Michael Kerrisk [Thu, 23 Nov 2017 08:45:09 +0000 (09:45 +0100)] 
errno.3: Minor text reorganization

No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Minor rewording/reformatting
Michael Kerrisk [Thu, 23 Nov 2017 08:35:21 +0000 (09:35 +0100)] 
errno.3: Minor rewording/reformatting

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Update error list for POSIX.1-2008
Michael Kerrisk [Thu, 23 Nov 2017 08:17:40 +0000 (09:17 +0100)] 
errno.3: Update error list for POSIX.1-2008

POSIX.1-2008 specified a couple of new errors not present in
POSIX.1-2001.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: srcfix
Michael Kerrisk [Thu, 23 Nov 2017 08:09:46 +0000 (09:09 +0100)] 
errno.3: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoerrno.3: Add some missing errors
Michael Kerrisk [Thu, 23 Nov 2017 07:49:08 +0000 (08:49 +0100)] 
errno.3: Add some missing errors

Based on comparing the filtered content of the two main
kernel errno files:

    cat include/uapi/asm-generic/errno.h \
        include/uapi/asm-generic/errno-base.h | grep define | \
        grep -v 'define _' | awk '{print $2}' | sort -u

to see what is absent from this page, and used in either kernel
or glibc.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoopen_by_handle_at.2: Minor fixes to NeilBrown's patch
Michael Kerrisk [Wed, 22 Nov 2017 16:47:24 +0000 (17:47 +0100)] 
open_by_handle_at.2: Minor fixes to NeilBrown's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoopen_by_handle_at.2: Clarifications needed due to NFS reexport
NeilBrown [Tue, 21 Nov 2017 21:15:13 +0000 (08:15 +1100)] 
open_by_handle_at.2: Clarifications needed due to NFS reexport

The recent addition of NFS re-export and the possibility of using
name_to_handle_at() on an NFS filesystem raises issues with
name_to_handle_at() which have not been properly documented.

Getting the file handle for an untriggered automount point is
arguably meaningless and in certainly not supported by NFS.
name_to_handle_at() will return -EOVERFLOW even though the
requested "handle_bytes" is large enough.  This is an unfortunate
overloading of the error code, but is manageable.

So clarify this and also note that the mount_id is returned when
EOVERFLOW is reported.

Thought: it would be nice if mount_id were returned in the
EOPNOTSUPP case too.  I guess it is too late to fix that (?).

Link: https://github.com/systemd/systemd/issues/7082
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: tfix
Jakub Wilk [Mon, 20 Nov 2017 22:44:09 +0000 (23:44 +0100)] 
io_submit.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: tfix
Jakub Wilk [Mon, 20 Nov 2017 22:44:08 +0000 (23:44 +0100)] 
proc.5: tfix

Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoioctl_getfsmap.2, membarrier.2, seccomp.2: spfix
Michael Kerrisk [Mon, 20 Nov 2017 15:36:06 +0000 (16:36 +0100)] 
ioctl_getfsmap.2, membarrier.2, seccomp.2: spfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoexec.3: glibc 2.24 dropped CWD from the defaul path
Michael Kerrisk [Mon, 20 Nov 2017 19:28:11 +0000 (20:28 +0100)] 
exec.3: glibc 2.24 dropped CWD from the defaul path

Document the glibc 2.24 change that dropped CWD from the default
search path employed by execlp(), execvp() and execvpe() when
PATH is not defined.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agopopen.3: Add a cross reference to Caveats in system(3)
Michael Kerrisk [Mon, 20 Nov 2017 14:17:10 +0000 (15:17 +0100)] 
popen.3: Add a cross reference to Caveats in system(3)

All of the same risks regarding system() also apply to popen().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Mention file capabilities in discussion of privileged programs
Michael Kerrisk [Mon, 20 Nov 2017 14:11:55 +0000 (15:11 +0100)] 
system.3: Mention file capabilities in discussion of privileged programs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Note that user input for system() should be carefully sanitized
Michael Kerrisk [Mon, 20 Nov 2017 14:07:14 +0000 (15:07 +0100)] 
system.3: Note that user input for system() should be carefully sanitized

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Minor rewording
Michael Kerrisk [Mon, 20 Nov 2017 14:03:09 +0000 (15:03 +0100)] 
system.3: Minor rewording

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: ffix
Michael Kerrisk [Mon, 20 Nov 2017 14:02:14 +0000 (15:02 +0100)] 
system.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Mention PATH explicitly in discussion of system and set-UID programs
Michael Kerrisk [Mon, 20 Nov 2017 13:56:13 +0000 (14:56 +0100)] 
system.3: Mention PATH explicitly in discussion of system and set-UID programs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Correctly note which shell Debian uses as (noninteractive) /bin/sh
Michael Kerrisk [Mon, 20 Nov 2017 13:57:55 +0000 (14:57 +0100)] 
system.3: Correctly note which shell Debian uses as (noninteractive) /bin/sh

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosystem.3: Create a "Caveats" subsection to hold warnings about the use of system()
Michael Kerrisk [Mon, 20 Nov 2017 13:54:00 +0000 (14:54 +0100)] 
system.3: Create a "Caveats" subsection to hold warnings about the use of system()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: wfix
Michael Kerrisk [Mon, 20 Nov 2017 13:37:12 +0000 (14:37 +0100)] 
proc.5: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: Add cross-reference to io_getevents(2)
Michael Kerrisk [Mon, 20 Nov 2017 11:59:24 +0000 (12:59 +0100)] 
io_submit.2: Add cross-reference to io_getevents(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: Cross reference pwritev(2) in discussion of RWF_SYNC and RWF_DSYNC
Michael Kerrisk [Mon, 20 Nov 2017 11:54:32 +0000 (12:54 +0100)] 
io_submit.2: Cross reference pwritev(2) in discussion of RWF_SYNC and RWF_DSYNC

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: Minor fixes to Goldwyn Rodrigues's patch
Michael Kerrisk [Mon, 20 Nov 2017 11:49:06 +0000 (12:49 +0100)] 
io_submit.2: Minor fixes to Goldwyn Rodrigues's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: Rewrap source lines
Michael Kerrisk [Mon, 20 Nov 2017 11:43:20 +0000 (12:43 +0100)] 
io_submit.2: Rewrap source lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoio_submit.2: Add iocb details to io_submit
Goldwyn Rodrigues [Mon, 5 Jun 2017 05:51:52 +0000 (00:51 -0500)] 
io_submit.2: Add iocb details to io_submit

Add more information about the iocb structure. It explains the
fields of the I/O control block structure which is passed to the
io_submit call.

The work also includes the nowait feature flags which is currently
posted at http://marc.info/?l=linux-fsdevel&m=149664103900715&w=2

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosocket.7: Correct the description of SO_RXQ_OVFL
Michael Kerrisk [Mon, 20 Nov 2017 11:13:25 +0000 (12:13 +0100)] 
socket.7: Correct the description of SO_RXQ_OVFL

Two reports that the description of SO_RXQ_OVFL was wrong.

======

Commentary from Tobias:

This bug pertains to the manpage as visible on man7.org right
now.

The socket(7) man page has this paragraph:

       SO_RXQ_OVFL (since Linux 2.6.33)
              Indicates that an unsigned 32-bit value ancillary
              message (cmsg) should be attached to received skbs
              indicating the number of packets dropped by the
              socket between the last received packet and this
              received packet.

The second half is wrong: the counter (internally,
SOCK_SKB_CB(skb)->dropcount is *not* reset after every packet.
That is, it is a proper counter, not a gauge, in monitoring
parlance.

A better version of that paragraph:

       SO_RXQ_OVFL (since Linux 2.6.33)
              Indicates that an unsigned 32-bit value ancillary
              message (cmsg) should be attached to received skbs
              indicating the number of packets dropped by the
              socket since its creation.
======
Commentary from Petr

Generic SO_RXQ_OVFL helpers sock_skb_set_dropcount() and
sock_recv_drops() implements returning of sk->sk_drops (the total
number of dropped packets), although the documentation says the
number of dropped packets since the last received one should be
returned (quoting the current socket.7):

  SO_RXQ_OVFL (since Linux 2.6.33)
  Indicates that an unsigned 32-bit value ancillary message (cmsg)
  should be attached to received skbs indicating the number of packets
  dropped by the socket between the last received packet and this
  received packet.

I assume the documentation needs to be updated, as fixing this in
the code could break programs depending on the current behavior,
although the formerly planned functionality seems to be more
useful.

The problem can be revealed with the following program:

int extract_drop(struct msghdr *msg)
{
        struct cmsghdr *cmsg;
        int rtn;

        for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg,cmsg)) {
                if (cmsg->cmsg_level == SOL_SOCKET &&
                    cmsg->cmsg_type == SO_RXQ_OVFL) {
                        memcpy(&rtn, CMSG_DATA(cmsg), sizeof rtn);
                        return rtn;
                }
        }
        return -1;
}

int main(int argc, char *argv[])
{
        struct sockaddr_in addr = { .sin_family = AF_INET };
        char msg[48*1024], cmsgbuf[256];
        struct iovec iov = { .iov_base = msg, .iov_len = sizeof msg };
        int sk1, sk2, i, one = 1;

        sk1 = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
        sk2 = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);

        inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr);
        addr.sin_port = htons(53333);

        bind(sk1, (struct sockaddr*)&addr, sizeof addr);
        connect(sk2, (struct sockaddr*)&addr, sizeof addr);

        // Kernel doubles this limit, but it accounts also the SKB overhead,
        // but it receives as long as there is at least 1 byte free.
        i = sizeof msg;
        setsockopt(sk1, SOL_SOCKET, SO_RCVBUF, &i, sizeof i);
        setsockopt(sk1, SOL_SOCKET, SO_RXQ_OVFL, &one, sizeof one);

        for (i = 0; i < 4; i++) {
                int rtn;

                send(sk2, msg, sizeof msg, 0);
                send(sk2, msg, sizeof msg, 0);
                send(sk2, msg, sizeof msg, 0);

                do {
                        struct msghdr msghdr = {
                                        .msg_iov = &iov, .msg_iovlen = 1,
                                        .msg_control = &cmsgbuf,
                                        .msg_controllen = sizeof cmsgbuf };
                        rtn = recvmsg(sk1, &msghdr, MSG_DONTWAIT);
                        if (rtn > 0) {
                                printf("rtn: %d drop %d\n", rtn,
                                                extract_drop(&msghdr));
                        } else {
                                printf("rtn: %d\n", rtn);
                        }
                } while (rtn > 0);
        }

        return 0;
}

which prints
  rtn: 49152 drop -1
  rtn: 49152 drop -1
  rtn: -1
  rtn: 49152 drop 1
  rtn: 49152 drop 1
  rtn: -1
  rtn: 49152 drop 2
  rtn: 49152 drop 2
  rtn: -1
  rtn: 49152 drop 3
  rtn: 49152 drop 3
  rtn: -1
although it should print (according to the documentation):
  rtn: 49152 drop 0
  rtn: 49152 drop 0
  rtn: -1
  rtn: 49152 drop 1
  rtn: 49152 drop 0
  rtn: -1
  rtn: 49152 drop 1
  rtn: 49152 drop 0
  rtn: -1
  rtn: 49152 drop 1
  rtn: 49152 drop 0
  rtn: -1

Reported-by: Petr Malat <oss@malat.biz>
Reported-by: Tobias Klausmann <klausman@schwarzvogel.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agopkey_alloc.2: Fix argument order
Breno Leitao [Tue, 7 Nov 2017 12:23:15 +0000 (10:23 -0200)] 
pkey_alloc.2: Fix argument order

Currently pkey_alloc() syscall has two arguments, and the very
first argument is still not supported as in kernel 4.14-rc8 and
should be set to zero, as showed in the following syscall
implementation:

SYSCALL_DEFINE2(pkey_alloc, unsigned long, flags, ...)
{
int pkey;
int ret;

/* No flags supported yet. */
if (flags)
return -EINVAL;

This behaviour is also documented correctly in the kernel
documentation as Documentation/x86/protection-keys.txt

The second argument is the one that should specify the page
access rights.

This patch fixes the manpage to describe how the code behaves.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoposixoptions.7: tfix
Michael Kerrisk [Mon, 20 Nov 2017 09:18:18 +0000 (10:18 +0100)] 
posixoptions.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agokeyctl.2: ffix: add some soft hyphenation points to long URL
Michael Kerrisk [Mon, 20 Nov 2017 09:17:31 +0000 (10:17 +0100)] 
keyctl.2: ffix: add some soft hyphenation points to long URL

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoMakefile: Remove a redundant comment
Michael Kerrisk [Mon, 20 Nov 2017 09:15:39 +0000 (10:15 +0100)] 
Makefile: Remove a redundant comment

Reported-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: Rework the description of /proc/PID/mountinfo parent-ID field
Michael Kerrisk [Mon, 20 Nov 2017 08:59:43 +0000 (09:59 +0100)] 
proc.5: Rework the description of /proc/PID/mountinfo parent-ID field

After comments from Miklos, and further digging in the kernel
source that showed that chroot() can also result in "hidden"
parent-IDs in mountinfo, I've revised the description of
mountinfo.

In fs/proc_namespace.cs::how_mountinfo() there is:

        /* mountpoints outside of chroot jail will give SEQ_SKIP on this */
        err = seq_path_root(m, &mnt_path, &p->root, " \t\n\\");
        if (err)
                goto out;

I instrumented the 'if (err)' code path with printk()
to show that there is indeed a record corresponding to the
parent-ID for the process root that is being skipped.

Reported-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: Correct the description of the parent mount ID for /proc/PID/mountinfo
Michael Kerrisk [Sun, 12 Nov 2017 15:55:35 +0000 (16:55 +0100)] 
proc.5: Correct the description of the parent mount ID for /proc/PID/mountinfo

I do not have an exact handle on the details, but I can see
roughly what is going on.  Internally, there seems to be one
("hidden") mount ID reserved to each mount namespace, and that ID
is the parent of the root mount point.

Looking through the (4.14) kernel source, mount IDs are allocated
by a kernel function called mnt_alloc_id() (in fs/namespace.c),
which is in turn called by alloc_vfsmnt() which is in turn called
by clone_mnt().

A new mount namespace is created by the kernel function
copy_mnt_ns() (in fs/namespace.c, called by
create_new_namespaces() in kernel/nsproxy.c). The copy_mnt_ns()
function calls copy_tree() (in fs/namespace.c), and copy_tree()
calls clone_mnt() in *two* places.  The first of these is the call
that creates the "hidden" mount ID that becomes the parent of the
root mount point. (I verified this by instrumenting the kernel
with a few printk() calls to display the IDs.)  The second place
where copy_tree() calls clone_mnt() is in a loop that replicates
each of the mount points (including the root mount point) in the
source mount namespace.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: wfix
Michael Kerrisk [Sun, 19 Nov 2017 23:37:40 +0000 (00:37 +0100)] 
seccomp.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: tfix
Michael Kerrisk [Sun, 19 Nov 2017 19:27:37 +0000 (20:27 +0100)] 
proc.5: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoproc.5: Update description of /proc/<pid>/oom_score
Marcus Folkesson [Fri, 17 Nov 2017 12:09:44 +0000 (13:09 +0100)] 
proc.5: Update description of /proc/<pid>/oom_score

After Linux 2.6.36, the heuristic calculation of oom_score
has changed to only consider used memory and CAP_SYS_ADMIN.

See kernel commit a63d83f427fbce97a6cea0db2e64b0eb8435cd10.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoioctl_tty.2: tfix
Michael Kerrisk [Sun, 19 Nov 2017 12:21:53 +0000 (13:21 +0100)] 
ioctl_tty.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomembarrier.2: tfix
Michael Kerrisk [Sun, 19 Nov 2017 10:35:29 +0000 (11:35 +0100)] 
membarrier.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomembarrier.2: Minor fixes to Mathieu's patch
Michael Kerrisk [Sun, 19 Nov 2017 10:26:01 +0000 (11:26 +0100)] 
membarrier.2: Minor fixes to Mathieu's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomembarrier.2: srcfix: rewrap source lines
Michael Kerrisk [Sun, 19 Nov 2017 10:06:31 +0000 (11:06 +0100)] 
membarrier.2: srcfix: rewrap source lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomembarrier.2: srcfix FIXME
Michael Kerrisk [Sun, 19 Nov 2017 10:05:04 +0000 (11:05 +0100)] 
membarrier.2: srcfix FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agomembarrier.2: Update membarrier manpage for 4.14
Mathieu Desnoyers [Thu, 16 Nov 2017 15:17:11 +0000 (10:17 -0500)] 
membarrier.2: Update membarrier manpage for 4.14

Add documentation for those new membarrier() commands:
        MEMBARRIER_CMD_PRIVATE_EXPEDITED
        MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED

Adapt the MEMBARRIER_CMD_SHARED return value documentation to reflect
that it now returns -EINVAL when issued on a system configured for
nohz_full.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Paul Turner <pjt@google.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Andrew Hunter <ahh@google.com>
CC: Andy Lutomirski <luto@amacapital.net>
CC: Andi Kleen <andi@firstfloor.org>
CC: Dave Watson <davejwatson@fb.com>
CC: Chris Lameter <cl@linux.com>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Ben Maurer <bmaurer@fb.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Josh Triplett <josh@joshtriplett.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Russell King <linux@arm.linux.org.uk>
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Will Deacon <will.deacon@arm.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
CC: Boqun Feng <boqun.feng@gmail.com>
CC: linux-api@vger.kernel.org
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Document the "default" filter return action
Michael Kerrisk [Sun, 19 Nov 2017 09:26:59 +0000 (10:26 +0100)] 
seccomp.2: Document the "default" filter return action

The kernel defaults to either SECCOMP_RET_KILL_PROCESS
or SECCOMP_RET_KILL_THREAD for unrecognized filter
return action values.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosend.2: Add EALREADY to ERRORS
Grégory Vander Schueren [Sun, 19 Nov 2017 09:05:35 +0000 (10:05 +0100)] 
send.2: Add EALREADY to ERRORS

From linux/v4.14-rc6/source/net/ipv4/tcp.c:

    if (tp->fastopen_req)
        return -EALREADY; /* Another Fast Open is in progress */

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agouser_namespaces.7: tfix
Michael Kerrisk [Sun, 19 Nov 2017 08:53:01 +0000 (09:53 +0100)] 
user_namespaces.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agouser_namespaces.7: Restore historical details about UID maps
Michael Kerrisk [Sun, 19 Nov 2017 08:50:41 +0000 (09:50 +0100)] 
user_namespaces.7: Restore historical details about UID maps

Christian Brauner's patch added the Linux 4.15 details,
but we need to retain the historical details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agouser_namespaces.7: Document new 340 line idmap limit
Christian Brauner [Sun, 19 Nov 2017 01:25:05 +0000 (02:25 +0100)] 
user_namespaces.7: Document new 340 line idmap limit

This patch documents the following kernel commit:

    commit 6397fac4915ab3002dc15aae751455da1a852f25
    Author: Christian Brauner <christian.brauner@ubuntu.com>
    Date:   Wed Oct 25 00:04:41 2017 +0200

        userns: bump idmap limits to 340

Since Linux 4.15 the number of idmap lines has been bumped to 340.
The patch also removes the "(arbitrary)" in "There is an
(arbitrary) limit on the number of lines in the file." since the
340 line limit is well-explained by the current implementation.
The struct recording the idmaps is 12 bytes and quite some proc
files only allow writes the size of a single page size which is
4096kB. This leaves room for 340 idmappings (340 * 12 = 4080
bytes).  The struct layout itself has been chosen very carefully
to allow for an implementation that limits the time-complexity for
the idmap codepaths to O(log n). However, I think it's unnecessary
to expose this much implementation detail to users in the man
page. So only mention this in the commit message.  Furthermore,
the comment about the page size restriction is misleading. The
kernel sources show that >= page size is considered an error.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Document the seccomp audit logging feature added in Linux 4.14
Michael Kerrisk [Sun, 19 Nov 2017 08:13:45 +0000 (09:13 +0100)] 
seccomp.2: Document the seccomp audit logging feature added in Linux 4.14

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Change SECCOMP_RET_ACTION to SECCOMP_RET_ACTION_FULL
Michael Kerrisk [Sat, 18 Nov 2017 22:13:44 +0000 (23:13 +0100)] 
seccomp.2: Change SECCOMP_RET_ACTION to SECCOMP_RET_ACTION_FULL

In Linux 4.14, the action component of the return value
switched from being 15 bits to being 16 bits. A new macro,
SECCOMP_RET_ACTION_FULL, that masks the 16 bits was added,
to replace the older SECCOMP_RET_ACTION.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Minor wording change
Michael Kerrisk [Sat, 18 Nov 2017 21:47:55 +0000 (22:47 +0100)] 
seccomp.2: Minor wording change

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Consolidate some common text
Michael Kerrisk [Sat, 18 Nov 2017 19:03:00 +0000 (20:03 +0100)] 
seccomp.2: Consolidate some common text

Consolidate some common text for SECCOMP_RET_KILL_PROCESS
and SECCOMP_RET_KILL_THREAD.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Add description of SECCOMP_RET_KILL_PROCESS
Michael Kerrisk [Sat, 18 Nov 2017 18:58:42 +0000 (19:58 +0100)] 
seccomp.2: Add description of SECCOMP_RET_KILL_PROCESS

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Explicitly note that other threads survive SECCOMP_RET_KILL_THREAD
Michael Kerrisk [Sat, 18 Nov 2017 18:04:51 +0000 (19:04 +0100)] 
seccomp.2: Explicitly note that other threads survive SECCOMP_RET_KILL_THREAD

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Add SECCOMP_RET_KILL_THREAD description and rework SECCOMP_RET_KILL text
Michael Kerrisk [Sat, 18 Nov 2017 18:00:32 +0000 (19:00 +0100)] 
seccomp.2: Add SECCOMP_RET_KILL_THREAD description and rework SECCOMP_RET_KILL text

Linux 4.14 added SECCOMP_RET_KILL_THREAD as a synonym for
SECCOMP_RET_KILL. Remove also the discussion of multithreaded
processes, since that will be addressed in the documentation
of SECCOMP_RET_KILL_PROCESS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Minor consolidation/reworking of EINVAL descriptions
Michael Kerrisk [Fri, 17 Nov 2017 23:24:54 +0000 (00:24 +0100)] 
seccomp.2: Minor consolidation/reworking of EINVAL descriptions

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: Minor wording fix
Michael Kerrisk [Fri, 17 Nov 2017 23:23:41 +0000 (00:23 +0100)] 
seccomp.2: Minor wording fix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Add some details on how to find controller User Guide
Michael Kerrisk [Fri, 17 Nov 2017 19:24:59 +0000 (20:24 +0100)] 
smartpqi.4: Add some details on how to find controller User Guide

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Add explanation of ioaccel
Michael Kerrisk [Wed, 15 Nov 2017 11:57:17 +0000 (12:57 +0100)] 
smartpqi.4: Add explanation of ioaccel

Based on text sent by Don Brace.

Reported-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: ffix
Michael Kerrisk [Mon, 13 Nov 2017 06:59:32 +0000 (07:59 +0100)] 
smartpqi.4: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Add VERSIONS section
Michael Kerrisk [Mon, 13 Nov 2017 06:56:31 +0000 (07:56 +0100)] 
smartpqi.4: Add VERSIONS section

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Reorder various pieces of text to follow usual conventions
Michael Kerrisk [Mon, 13 Nov 2017 06:54:29 +0000 (07:54 +0100)] 
smartpqi.4: Reorder various pieces of text to follow usual conventions

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: ffix
Michael Kerrisk [Mon, 13 Nov 2017 06:21:35 +0000 (07:21 +0100)] 
smartpqi.4: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Minor wording fixes
Michael Kerrisk [Mon, 13 Nov 2017 06:21:21 +0000 (07:21 +0100)] 
smartpqi.4: Minor wording fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: ffix
Michael Kerrisk [Mon, 13 Nov 2017 06:14:44 +0000 (07:14 +0100)] 
smartpqi.4: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: srcfix: add some FIXME markers
Michael Kerrisk [Mon, 13 Nov 2017 06:11:03 +0000 (07:11 +0100)] 
smartpqi.4: srcfix: add some FIXME markers

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi.4: Various fixes, mostly formatting related
G. Branden Robinson [Tue, 7 Nov 2017 22:20:46 +0000 (23:20 +0100)] 
smartpqi.4: Various fixes, mostly formatting related

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agosmartpqi: initial submit of smartpqi man page
Don Brace [Wed, 18 Oct 2017 15:10:39 +0000 (10:10 -0500)] 
smartpqi: initial submit of smartpqi man page

This patch contains the initial submission of the
smartpqi man page.

Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agochown.2: ffix
Michael Kerrisk [Fri, 17 Nov 2017 18:18:28 +0000 (19:18 +0100)] 
chown.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoseccomp.2: srcfix: Update copyright notice
Michael Kerrisk [Fri, 17 Nov 2017 17:36:55 +0000 (18:36 +0100)] 
seccomp.2: srcfix: Update copyright notice

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agoconnect.2: Clarify that ECONREFUSED is for stream sockets
Michael Kerrisk [Thu, 16 Nov 2017 17:43:19 +0000 (18:43 +0100)] 
connect.2: Clarify that ECONREFUSED is for stream sockets

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
6 years agofutex.2: wfix
Michael Kerrisk [Thu, 16 Nov 2017 17:27:50 +0000 (18:27 +0100)] 
futex.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>