Commit Graph

68 Commits

Author SHA1 Message Date
Heinrich Schuchardt 8e38f6d391 fanotify.7: wfix
Removed duplicate "using".

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-11-11 06:36:36 +01:00
Michael Kerrisk c5a000246c fanotify.7: Tweaks to Heinrich Schuchard's patch on mount paths
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-10-28 12:59:24 +01:00
Heinrich Schuchardt a4b394f246 fanotify.7: fanotify notifies only events generated on the same mount
Unfortunately, fanotify does not inform listeners for all paths
under which a touched filesystem object is visible, but only the
listener using the same path as the process touching the
filesystem object.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-10-28 12:59:24 +01:00
Heinrich Schuchardt 9ee7cc4faa fanotify.7: fallocate(2) creates no events
fallocate(2) should create FAN_MODIFY events but does not.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-10-28 12:59:24 +01:00
Heinrich Schuchardt d5b26a6978 fanotify.7: Update BUGS to note bugs still not fixed in 3.17
I bumped the Linux version number in the BUGS section to 3.17.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-10-28 12:59:24 +01:00
Michael Kerrisk bea08fec7e adjtimex.2, bind.2, cacheflush.2, clone.2, fallocate.2, fanotify_init.2, fanotify_mark.2, flock.2, futex.2, getdents.2, getpriority.2, getrlimit.2, gettid.2, gettimeofday.2, ioprio_set.2, kexec_load.2, migrate_pages.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, msgop.2, nfsservctl.2, perf_event_open.2, pread.2, ptrace.2, recvmmsg.2, rename.2, restart_syscall.2, sched_setattr.2, send.2, shmop.2, shutdown.2, sigaction.2, signalfd.2, syscalls.2, timer_create.2, timerfd_create.2, tkill.2, vmsplice.2, wait.2, aio_init.3, confstr.3, exit.3, fmemopen.3, fopen.3, getaddrinfo.3, getauxval.3, getspnam.3, isalpha.3, isatty.3, mallinfo.3, malloc.3, mallopt.3, psignal.3, pthread_attr_setinheritsched.3, qecvt.3, queue.3, rtnetlink.3, strerror.3, strftime.3, toupper.3, towlower.3, towupper.3, initrd.4, locale.5, proc.5, bootparam.7, capabilities.7, ddp.7, fanotify.7, icmp.7, inotify.7, ip.7, ipv6.7, netdevice.7, netlink.7, path_resolution.7, rtld-audit.7, rtnetlink.7, sched.7, signal.7, socket.7, svipc.7, tcp.7, unix.7, ld.so.8: srcfix: Update FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 16:47:44 -05:00
Heinrich Schuchardt 864eccb901 fanotify.7: fanotify_read should use aligned buffer
Michael Kerrisk pointed me to alignment issues which may
arise when reading misaligned integers.

On some systems integer values can only be read if they are
correctly aligned. Other system have a lower performance when
reading from or writing to misaligned memory positions.

Therefore, the buffer used to call read(2) for a fanotify
file descriptor should have the same alignment as
struct fanotify_event_metadata.

Due to the casting to char* inside the macros
FAN_EVENT_OK and FAN_EVENT_NEXT we can use any
data structure for the buffer.

With the patch an array of struct fanotify_event_metadata is
used as buffer which seems a natural choice to ensure proper
alignment.

It should be remembered that the offset between events is given
by field event_len and iterating over the array may not be
allowable in future. Instead the macros should be used.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-22 08:49:30 +02:00
Michael Kerrisk 1aa556aba3 fanotify.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-21 12:47:54 +02:00
Michael Kerrisk 7c0f0ce0f0 fanotify.7: Minor wording changes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-21 12:45:21 +02:00
Heinrich Schuchardt 3c36e6351a fanotify.7: Document FAN_EVENT_METADATA_LEN
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-21 12:40:35 +02:00
Michael Kerrisk 98f7d53c92 fanotify.7: Fix description of FAN_EVENT_NEXT()
FAN_EVENT_NEXT() does not update 'meta'; rather, it returns a
pointer to the next metadata structure. In addition, generally
rework the description to be a bit clearer and more detailed.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2014-05-21 08:59:04 +02:00
Michael Kerrisk e100191686 fanotify.7: Minor improvements to Heinrich Schuchardt's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-15 05:40:12 +02:00
Michael Kerrisk 1c61252673 fanotify.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-15 05:40:12 +02:00
Heinrich Schuchardt f96adfdc9f fanotify.7: BUGS: error events can be lost when reading from fanotify FD
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-15 05:28:56 +02:00
Michael Kerrisk 3d1ee4971b delete_module.2, perf_event_open.2, sched_setscheduler.2, shmctl.2, gai.conf.5, resolv.conf.5, fanotify.7, man-pages.7: wsfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-12 08:44:56 +02:00
Michael Kerrisk ffb30e75da Removed trailing white space at end of lines 2014-05-08 11:04:30 +02:00
Michael Kerrisk 89613d5046 fanotify.7: Add mtk to copyright
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-08 10:24:22 +02:00
Michael Kerrisk ce87be978f fanotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 21:59:08 +02:00
Michael Kerrisk a4cd12a95f fanotify.7: Add some details on event_f_flags
Note the use of fanotify_mark() 'event_f_flags' to control
the file status flags for the file descriptors returned via
'fanotify_event_metadata.fd'.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 10:10:28 +02:00
Michael Kerrisk 3253bbc3d4 fanotify.7: Clarify details of buffer size for read() and 'event_len' field
* Using large buffer sizes for read(2) is orthogonal to the
  discussion of variable-length event structures.
* Move the discussion of the read() return value to follow
  discussion of what the read() actually returns in its buffer.
* Related rewordings.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 10:10:28 +02:00
Michael Kerrisk 4a57583f50 fanotify.7: Minor wording and formatting fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 10:10:28 +02:00
Michael Kerrisk 3302241970 fanotify.7: Minor tweaks to Heinrich's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 10:10:28 +02:00
Heinrich Schuchardt a662500625 fanotify.7: Adjust description of the fanotify queue
Update as per http://www.spinics.net/lists/linux-man/msg05624.html
where Jan Kara proposed to clarify the deletion of events from the
fanotify queue and the occurrence of ENOENT when writing to the
fanotify file descriptor.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-07 10:10:28 +02:00
Michael Kerrisk 5e443a5f9e fanotify.7: tfix
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-06 06:55:26 +02:00
Michael Kerrisk 1b24e2ee0e fanotify_init.2, fanotify_mark.2, fanotify.7: srcfix: rewrap long source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-05 11:48:44 +02:00
Michael Kerrisk 77bba7b589 fanotify.7: spfix
Reported-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-05 11:38:07 +02:00
Michael Kerrisk bfff73cb7a fanotify.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-29 15:35:54 +02:00
Michael Kerrisk 0554d3f77a fanotify.7: Add comment to example code noting that queue overflow is ignored
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 20:07:02 +02:00
Heinrich Schuchardt 3b483820b9 fanotify.7: Remove redundant mentioning of bugs
A bug mentioned in fanotify_mark(2) need not be repeated in
fanotify(7) again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 19:57:11 +02:00
Michael Kerrisk c8cc8bd2cb fanotify.7: Remove ppoll() and poll() from list of primary APIs
poll() and ppoll() are not among the primary calls in the API
(and anyway, select(), pselect(), and epoll were not mentioned).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 14:43:46 +02:00
Michael Kerrisk 5f6231f293 fanotify.7: srcfix: Add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 12:10:32 +02:00
Michael Kerrisk 370359a7c6 fanotify.7: Add some whitespace to example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:58:21 +02:00
Michael Kerrisk e1ca5880d4 fanotify.7: Add some comments to example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:57:29 +02:00
Michael Kerrisk 616fce491b fanotify.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:55:32 +02:00
Michael Kerrisk 3d4433fe17 fanotify.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:46:40 +02:00
Michael Kerrisk c00ff2dc16 fanotify.7: Add subheading for /proc/PID/fdinfo
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:46:16 +02:00
Michael Kerrisk 679a078389 fanotify.7: Remove a sentence from ETXTBSY description
No file descriptor is actually created...

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:51 +02:00
Michael Kerrisk 68bcc008cc fanotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:51 +02:00
Michael Kerrisk 72b9aa964c fanotify.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:51 +02:00
Michael Kerrisk 49894a5a8f fanotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk d7d24d40ec fanotify.7: Add sentence introducing fanotify_response fields
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk f897ec112f fanotify.7: Minor rewording of FAN_CLOSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk f2ac23e758 fanotify.7: Add introductory sentence for explanation of fanotify_event_metadata
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk ad02dd1f87 fanotify.7: Add a subheading for reading events
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk 75c3e3bd6b fanotify.7: Move the text on event merging
Place it near the discussion of the events bit mask.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk 2932564490 fanotify.7: Rework text on event bits a little
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk c9120323bf fanotify.7: Rework and enhance text introducing read() and events
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk 6c693f6de5 fanotify.7: Move text describing fanotify_mark()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk 488cdd819c fanotify.7: Move epoll/poll/select discussion to its own subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00
Michael Kerrisk 7fc5dd9466 fanotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 11:44:50 +02:00