All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: ivo welch <ivo.welch@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>, linux-kernel@vger.kernel.org
Subject: Re: fanotify bug on gdb -- hard crash
Date: Tue, 30 Dec 2014 19:21:49 -0500	[thread overview]
Message-ID: <1419985309.5162.79.camel@localhost> (raw)
In-Reply-To: <CAPr7RtVSojwe5Q9k=EE6SSUAE1a46beqOV0TCZbkfhvrADQEGg@mail.gmail.com>

On Mon, 2014-12-29 at 13:06 +0800, ivo welch wrote:
> thank you, eric.  will do.  I read up on it above and now understand it better.

Great let us know if it keeps giving you trouble!

> the example in the man page seems somewhat misfortunate.  I would use
> an example that does not, by default, lock up the user system.
> (perhaps add a second example with the _PERM feature that shows how it
> responds.)

The link you gave does respond and allow permissions:

               if (metadata->fd >= 0) {

                       /* Handle open permission event */

                       if (metadata->mask & FAN_OPEN_PERM) {
                           printf("FAN_OPEN_PERM: ");

                           /* Allow file to be opened */

                           response.fd = metadata->fd;
                           response.response = FAN_ALLOW;
                           write(fd, &response,
                                 sizeof(struct fanotify_response));
                       }

That's the key bit of the example...  If you use gdb and never get to
there, you are in a bit of trouble, I agree!


  reply	other threads:[~2014-12-31  0:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26 14:45 fanotify bug on gdb -- hard crash ivo welch
2014-12-26 18:40 ` Heinrich Schuchardt
2014-12-28 23:13   ` Eric Paris
     [not found]     ` <CAPr7RtWQ6bt4M8f-2-w0nbLvgpupb0kckE=VQDYbC8EXwiPDJg@mail.gmail.com>
2014-12-29  4:29       ` Eric Paris
2014-12-29  5:06         ` ivo welch
2014-12-31  0:21           ` Eric Paris [this message]
2014-12-26 22:14 ` Pavel Machek
2014-12-26 23:48   ` ivo welch

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=1419985309.5162.79.camel@localhost \
    --to=eparis@redhat.com \
    --cc=ivo.welch@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xypron.glpk@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.