Commit Graph

10700 Commits

Author SHA1 Message Date
Michael Kerrisk 8d2ee5c85d fanotify.7: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:43:40 +02:00
Michael Kerrisk 815df19b29 fanotify.7: Declare handle_events() in example code as 'static'
To avoid warning "no previous prototype for..."
when compiling with "-Wmissing-prototypes"

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:43:11 +02:00
Michael Kerrisk b34cbc4530 fanotify.7: Change a comment in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:43:10 +02:00
Michael Kerrisk def5c668e8 fanotify.7: Merge two printf() calls
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:43:10 +02:00
Michael Kerrisk 48fd9fe08a fanotify.7: Change a comment in example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:43:10 +02:00
Michael Kerrisk 8cc4f7a94e fanotify.7: Remove unneeded close() calls
The fanotify file descriptor will be implicitly closed by process
termination, and in any case it was not closed explicitly in all
process termination paths.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:42:57 +02:00
Michael Kerrisk f776794974 fanotify.7: Minor tweaks to example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 10:00:53 +02:00
Michael Kerrisk ddb112c281 fanotify.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 09:49:19 +02:00
Michael Kerrisk 6d8c5d015d fanotify.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 09:20:45 +02:00
Michael Kerrisk d9b086d625 fanotify.7: Mention inotify(7) in opening paragraph
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 08:06:41 +02:00
Michael Kerrisk 7ea227bdde fanotify.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 08:06:41 +02:00
Heinrich Schuchardt f75d27e6b0 inotify.7: SEE ALSO: add fanotify(7)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 07:57:41 +02:00
Heinrich Schuchardt c200b422df fanotify_mark.2: New page documenting fanotify_mark(2)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 07:56:49 +02:00
Heinrich Schuchardt 3e6ebb33e5 fanotify_init.2: New page documenting fanotify_init(2)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 07:56:02 +02:00
Heinrich Schuchardt 597aaea2f7 fanotify.7: New page providing overview of the fanotify API
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 07:55:05 +02:00
Stefan Puiu a29edaeef6 packet.7: Status in PACKET_RX_RING is actually a bit mask
Stefan:
I'm playing with the PACKET_RX_RING option to packet sockets and I
noticed that the status field from the tpacket_hdr structures
inside the mmaped buffer is actually a bit mask. I'm testing with
4Gbps traffic rates and sometimes I get status=5. I'm using Ubuntu
12.04 with a 3.8.0-29 kernel, and at least from the code (I got it
using "sudo apt-get source linux-image-$(uname -r)") it seems the
5 means TP_STATUS_USER | TP_STATUS_LOSING. The 3.8.0 kernel code
has this line in tpacket_rcv():

    /*
     * LOSING will be reported till you read the stats,
     * because it's COR - Clear On Read.
     * Anyways, moving it for V1/V2 only as V3 doesn't need this
     * at packet level.
     */
            if (po->stats.tp_drops)
                    status |= TP_STATUS_LOSING;

Daniel:
Now to your question. It can easily be seen from the if_packet.h header
file http://lingrok.org/xref/linux-net-next/include/uapi/linux/if_packet.h#93
that TP_STATUS_* are individual bits that are set in tp_status field.

TP_STATUS_USER simply means a frame was received in the ring and is
ready for user space to be processed. If the field also indicates
TP_STATUS_LOSING then this means that there were packet drops in the
rx ring itself so a user knows it didn't get all traffic. This bit
is being reset on getsockopt() when querying PACKET_STATISTICS,
otherwise it stays. Drops occur when the ring buffer was not emptied
fast enough by user space (so no free slot with TP_STATUS_KERNEL), e.g.
due to high incoming traffic load. However, the current frame you're
reading that has TP_STATUS_USER|TP_STATUS_LOSING is fine by itself.

Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Carsten Andrich <carsten.andrich@tu-ilmenau.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-24 11:52:39 +02:00
Michael Kerrisk 84f573db60 rename.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:55:44 +02:00
Michael Kerrisk 8f60952e38 rename.2: Improve wording of renameat2() ENOENT error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:55:38 +02:00
Michael Kerrisk 5c1517fa0a rename.2: Improve description or renameat2() EINVAL 'flags' error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:45 +02:00
Michael Kerrisk 4e6c4ab2ff rename.2: Add CONFORMING TO and VERSIONS for renameat2()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:45 +02:00
Miklos Szeredi ab99efddee rename.2: Document renameat2()
Some light edits to this patch by mtk.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:45 +02:00
Michael Kerrisk bf253d9b61 syscalls.2: Add renameat2()
And bump kernel version.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:45 +02:00
Michael Kerrisk 11b520ed8f alloc_hugepages.2, futex.2, vm86.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:01 +02:00
Michael Kerrisk 82e683e6bd msync.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:01 +02:00
Peter Schiffer f6374cc2cd set_mempolicy.2: wfix
Hi Michael,

sending minor wording fix for set_mempolicy(2) man page.

peter

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk ab80da6e17 packet.7: SEE ALSO: add /tools/testing/selftests/net/psock_tpacket.c
Reported-by: Carsten Andrich <carsten.andrich@tu-ilmenau.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 3d4d5a0635 packet.7: Minor tweak to Carsten Andrich's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 896333c57e packet.7: Minor fixes to Carsten Andrich's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Carsten Andrich 8c26e99bce packet.7: PACKET_LOSS has inverse meaning
I stumbled upon an error in packet.7 regarding the meaning of the
PACKET_LOSS socket option. According to the current git version of
linux-man setting PACKET_LOSS causes malformed packets to *not* be
silently dropped.

However it is the other way round. If PACKET_LOSS is *not* set,
malformed packets will be marked TP_STATUS_WRONG_FORMAT and the
transmission process aborted, leaving untransmitted packets in
the ring.  If it *is* set, malformed packets will be silently
skipped, their status set to TP_STATUS_AVAILABLE and the
transmission process continued with the following packet.

This behaviour can be clearly seen in net/packet/af_packet.c:
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/net/packet/af_packet.c#n2300

The value accompanying TP_PACKET_LOSS translates into po->tp_loss:
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/net/packet/af_packet.c#n3304

I inverted the meaning of PACKET_LOSS and clarified the
description in the attached patch.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Jan Moskyto Matejka d63ff76e2a proc.5: Improve description of /proc/stat 'intr' field
The sum at the beginning of line "intr" includes also
unnumbered interrupts.

(Change made in kernel commit
a2eddfa95919a730e0e5ed17e9c303fe5ba249cd)

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 7fdec06564 open.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 21557928fa open.2: Minor tweaks to Peter Schiffer's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peter Schiffer e6042e4ad2 open.2: Update note on alignment of user buffer and file offset for O_DIRECT
The sentence in open(2) man page in notes for O_DIRECT flag:

    "Under Linux 2.6, alignment to 512-byte boundaries suffices."

is not universally correct. The alignment is a property of the
storage, for example, 4k-sector drives with no 512 byte sector
emulation will be unable to perform 512-byte direct I/O.

The patch clarifies this sentence.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 20ee63c18c open.2: Remove repetitious text on use of fcntl() to change file status flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 61b12e2b63 open.2: Note some of the various synonyms for "open file description"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peng Haitao 88b11b50cb pthread_attr_setstack.3: ATTRIBUTES: Note functions that are thread-safe
The functions pthread_attr_setstack() and pthread_attr_getstack()
are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peng Haitao 180a948b37 pthread_attr_setscope.3: ATTRIBUTES: Note functions that are thread-safe
The functions pthread_attr_setscope() and pthread_attr_getscope()
are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peng Haitao 1cfb294673 pthread_attr_setschedpolicy.3: ATTRIBUTES: Note functions that are thread-safe
The functions pthread_attr_setschedpolicy() and
pthread_attr_getschedpolicy() are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peng Haitao 6fea3867c0 pthread_attr_setschedparam.3: ATTRIBUTES: Note functions that are thread-safe
The functions pthread_attr_setschedparam() and
pthread_attr_getschedparam() are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Peng Haitao 47fb8a7f94 pthread_attr_setinheritsched.3: ATTRIBUTES: Note functions that are thread-safe
The functions pthread_attr_setinheritsched() and
pthread_attr_getinheritsched() are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 1df20d51b3 dlopen.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 61a37c81ef flock.2: Employ term "open file description" in DESCRIPTION
And include reference to open(2) for an explanation of the term.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 04346be5bb clone.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-23 20:40:00 +02:00
Michael Kerrisk 840324c0d5 msync.2: s/flushes... back to disk/flushes... back to filesystem/
As noted by Heinrich:

    The manpage of msync(2) says:
        "msync() flushes changes made to the in-core copy of a file
        that was mapped into memory using mmap(2) back to disk."
    ...
    "back to disk" implies that the file system is forced to
    actually write to the hard disk, somewhat equivalent to
    invoking sync(1).  Is that guaranteed for all file systems?

    Not all file systems are necessarily disk based
    (e.g. davfs, tmpfs).

    So shouldn't we write:
        "... back to the file system."

    http://pubs.opengroup.org/onlinepubs/007904875/functions/msync.html
    says "... to permanent storage locations, if any,"

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-21 11:35:20 +02:00
Michael Kerrisk 645de70f2f Start of man-pages-3.66: updating Changes and Changes.old 2014-04-20 11:08:56 +02:00
Michael Kerrisk 035e513fc1 Start of man-pages-3.66: updating .Announce and .lsm files 2014-04-20 11:08:56 +02:00
Michael Kerrisk 3a130ce6eb Start of man-pages-3.66: renaming .Announce and .lsm files 2014-04-20 11:08:56 +02:00
Michael Kerrisk e55b400ec6 Ready for 3.65 2014-04-20 11:06:11 +02:00
Michael Kerrisk fe8b1358a6 Removed trailing white space at end of lines 2014-04-20 11:06:01 +02:00
Michael Kerrisk 84b349919b madvise.2, msync.2, libc.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-20 11:05:32 +02:00