linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Michael Kerrisk
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH man] kcmp: Add KCMP_EPOLL_TFD description
Date: Sun, 6 Aug 2017 10:38:58 +0300	[thread overview]
Message-ID: <20170806073858.GB1916@uranus.lan> (raw)

       KCMP_EPOLL_TFD
              Check whether the file descriptor idx1 of process pid1 present in epoll(7)
              instance described by idx2 of process  pid2.   The  argument  idx2  is  an
              address of structure where the target file is described.

                  struct kcmp_epoll_slot {
                       __u32 efd;
                       __u32 tfd;
                       __u64 toff;
                  };

              where  efd  is  epoll  file descriptor from epoll_create(2) call, tfd is a
              target file number, toff is a target file offset counted from zero.   Sev‐
              eral  different  targets  may  be registered with the same file descriptor
              number and setting specific offset helps to investigate each of them.

Signed-off-by: Cyrill Gorcunov <gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
---
 man2/kcmp.2 |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

Index: man-pages/man2/kcmp.2
===================================================================
--- man-pages.orig/man2/kcmp.2
+++ man-pages/man2/kcmp.2
@@ -156,6 +156,44 @@ See the discussion of the
 .BR CLONE_VM
 flag in
 .BR clone (2).
+.TP
+.BR KCMP_EPOLL_TFD
+Check whether the file descriptor
+.I idx1
+of the process
+.I pid1
+present in
+.BR epoll (7)
+instance described by
+.I idx2
+of the process
+.IR pid2 .
+The argument
+.I idx2
+is an address of a structure where the target file is described.
+.in +4n
+.nf
+.sp
+struct kcmp_epoll_slot {
+	__u32 efd;
+	__u32 tfd;
+	__u64 toff;
+};
+.fi
+.in
+.sp
+where
+.I efd
+is epoll file descriptor from
+.BR epoll_create (2)
+call,
+.I tfd
+is a target file number,
+.I toff
+is a target file offset counted from zero.
+Several different targets may be registered with
+the same file descriptor number and setting specific
+offset helps to investigate each of them.
 .PP
 Note the
 .BR kcmp ()
@@ -246,6 +284,16 @@ Process
 or
 .I pid2
 does not exist.
+.TP
+.B EFAULT
+The epoll slot addressed by
+.I idx2
+is outside of the user's address space.
+.TP
+.B ENOENT
+The target file is not present in
+.BR epoll ()
+instance.
 .SH VERSIONS
 The
 .BR kcmp ()

             reply	other threads:[~2017-08-06  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06  7:38 Cyrill Gorcunov [this message]
     [not found] ` <20170806073858.GB1916-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2017-08-15 19:49   ` [PATCH man] kcmp: Add KCMP_EPOLL_TFD description Michael Kerrisk (man-pages)
     [not found]     ` <1529b66d-5caa-7f34-251f-ec23428c418e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-15 19:57       ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170806073858.GB1916@uranus.lan \
    --to=gorcunov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).