All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Evgeniy Polyakov <zbr-i6C2adt8DTjR7s880joybQ@public.gmane.org>
Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	Robert Love <rlove-L7G0xEPcOZbYtjvyW6yDsg@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	john-jueV0HHMeujJJrXXpGQQMAC/G2K4zDHf@public.gmane.org
Subject: Re: [take 3] Use pid in inotify events.
Date: Wed, 19 Nov 2008 09:43:41 -0500	[thread overview]
Message-ID: <cfd18e0f0811190643j7769f768q53889bbc950ef251@mail.gmail.com> (raw)
In-Reply-To: <cfd18e0f0811190634g276b4a2dm5b3d5de25a5c9222-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[RESENT, because LKML bounced some HTML that accidentally got put in the mail.]
[CC+=John McCutchan, this time with hopefully a live email address;
John, some context here: http://marc.info/?t=122633022400003&r=1&w=2 ]

Evgeniy,

On Wed, Nov 19, 2008 at 9:05 AM, Evgeniy Polyakov <zbr-i6C2adt8DTjR7s880joybQ@public.gmane.org> wrote:
>
> Hi Christoph.
>
> On Tue, Nov 18, 2008 at 02:19:37PM +0100, Christoph Hellwig (hch-jcswGhMUV9g@public.gmane.org) wrote:
> > Yes, this kind of thing should be enable using an flag to inotify1, and
> > be consistant even for rename.  Doing it as a flag to inotify1 also has
> > the advantage to be able to return an -EPERM when the feature is
> > requested but not allowed instead of letting applications that assume it
> > silently fail.
>
> So effectively you propose to have second generation of the inotify
> which will have additional pid field, which will be unused by all but
> the same uid events?

I suspect that Christoph wants the same thing as I do: some thinking
towards a future-proof design, rather than a quick hack to address the
needs of a single application.

> If you want to return -EPERM, than it will be _always_ returned for non
> sysadmin capable user, which effectively makes it unusable.

Again, appropriate flags in inotify_init1() could fix this -- e.g.,
only fill the field (and give an error if no perms) if a flag is set.

I think what is really needed at this point is some consideration of
what other extensions (if any) might be desired for inotify, and how
we might be best create a design that suits those and future needs.

Cheers,

Michael


--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Evgeniy Polyakov" <zbr@ioremap.net>
Cc: "Christoph Hellwig" <hch@lst.de>, "Robert Love" <rlove@rlove.org>,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	john@johnmccutchan.com
Subject: Re: [take 3] Use pid in inotify events.
Date: Wed, 19 Nov 2008 09:43:41 -0500	[thread overview]
Message-ID: <cfd18e0f0811190643j7769f768q53889bbc950ef251@mail.gmail.com> (raw)
In-Reply-To: <cfd18e0f0811190634g276b4a2dm5b3d5de25a5c9222@mail.gmail.com>

[RESENT, because LKML bounced some HTML that accidentally got put in the mail.]
[CC+=John McCutchan, this time with hopefully a live email address;
John, some context here: http://marc.info/?t=122633022400003&r=1&w=2 ]

Evgeniy,

On Wed, Nov 19, 2008 at 9:05 AM, Evgeniy Polyakov <zbr@ioremap.net> wrote:
>
> Hi Christoph.
>
> On Tue, Nov 18, 2008 at 02:19:37PM +0100, Christoph Hellwig (hch@lst.de) wrote:
> > Yes, this kind of thing should be enable using an flag to inotify1, and
> > be consistant even for rename.  Doing it as a flag to inotify1 also has
> > the advantage to be able to return an -EPERM when the feature is
> > requested but not allowed instead of letting applications that assume it
> > silently fail.
>
> So effectively you propose to have second generation of the inotify
> which will have additional pid field, which will be unused by all but
> the same uid events?

I suspect that Christoph wants the same thing as I do: some thinking
towards a future-proof design, rather than a quick hack to address the
needs of a single application.

> If you want to return -EPERM, than it will be _always_ returned for non
> sysadmin capable user, which effectively makes it unusable.

Again, appropriate flags in inotify_init1() could fix this -- e.g.,
only fill the field (and give an error if no perms) if a flag is set.

I think what is really needed at this point is some consideration of
what other extensions (if any) might be desired for inotify, and how
we might be best create a design that suits those and future needs.

Cheers,

Michael


--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html

  parent reply	other threads:[~2008-11-19 14:43 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <acdcfe7e0811081035l56eedf05x8b3b7ee2fc01eee6@mail.gmail.com>
     [not found] ` <acdcfe7e0811081035l56eedf05x8b3b7ee2fc01eee6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-08 18:40   ` [1/1] Use pid in inotify events Evgeniy Polyakov
2008-11-08 18:40     ` Evgeniy Polyakov
     [not found]     ` <20081108184013.GA11888-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-08 22:03       ` Evgeniy Polyakov
2008-11-08 22:03         ` Evgeniy Polyakov
2008-11-10 15:13   ` [take 2] " Evgeniy Polyakov
2008-11-10 15:13     ` Evgeniy Polyakov
2008-11-16 23:24   ` [take 3] " Evgeniy Polyakov
2008-11-16 23:24     ` Evgeniy Polyakov
     [not found]     ` <20081116232450.GA13547-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-17 16:59       ` Michael Kerrisk
2008-11-17 16:59         ` Michael Kerrisk
     [not found]         ` <cfd18e0f0811170859w1d3f903ej1d5626f2d2bf4496-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-17 17:15           ` Evgeniy Polyakov
2008-11-17 17:15             ` Evgeniy Polyakov
     [not found]             ` <20081117171508.GA564-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-17 17:23               ` Michael Kerrisk
2008-11-17 17:23                 ` Michael Kerrisk
     [not found]                 ` <cfd18e0f0811170923q6b72bd0fn9d319bbceb8fa6a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-17 17:52                   ` Evgeniy Polyakov
2008-11-17 17:52                     ` Evgeniy Polyakov
     [not found]                     ` <20081117175212.GA2224-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-20 13:09                       ` Pavel Machek
2008-11-20 13:09                         ` Pavel Machek
     [not found]                         ` <20081120130902.GA1408-+ZI9xUNit7I@public.gmane.org>
2008-11-21 14:03                           ` Evgeniy Polyakov
2008-11-21 14:03                             ` Evgeniy Polyakov
     [not found]                             ` <20081121140325.GA12384-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-21 14:20                               ` Michael Kerrisk
2008-11-21 14:20                                 ` Michael Kerrisk
     [not found]                                 ` <517f3f820811210620o34307610hf926bbe3b3828e8c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-21 14:37                                   ` Evgeniy Polyakov
2008-11-21 14:37                                     ` Evgeniy Polyakov
2008-11-21 14:30                               ` Robert Love
2008-11-21 14:30                                 ` Robert Love
     [not found]                                 ` <acdcfe7e0811210630s65404ef5pf2b94731c2a872e1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-21 14:53                                   ` Evgeniy Polyakov
2008-11-21 14:53                                     ` Evgeniy Polyakov
2008-11-21 14:57                                   ` Pavel Machek
2008-11-21 14:57                                     ` Pavel Machek
     [not found]                                     ` <20081121145709.GC1554-+ZI9xUNit7I@public.gmane.org>
2008-11-21 15:08                                       ` Evgeniy Polyakov
2008-11-21 15:08                                         ` Evgeniy Polyakov
2008-11-18 13:19           ` Christoph Hellwig
2008-11-18 13:19             ` Christoph Hellwig
     [not found]             ` <20081118131937.GC16944-jcswGhMUV9g@public.gmane.org>
2008-11-19 14:05               ` Evgeniy Polyakov
2008-11-19 14:05                 ` Evgeniy Polyakov
     [not found]                 ` <cfd18e0f0811190634g276b4a2dm5b3d5de25a5c9222@mail.gmail.com>
     [not found]                   ` <cfd18e0f0811190634g276b4a2dm5b3d5de25a5c9222-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-19 14:43                     ` Michael Kerrisk [this message]
2008-11-19 14:43                       ` Michael Kerrisk
2008-11-20 19:17                       ` Ville Syrjälä
2008-11-19 14:53                     ` Evgeniy Polyakov
2008-11-19 14:53                       ` Evgeniy Polyakov
     [not found]                       ` <20081119145351.GA2652-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-20 22:34                         ` John McCutchan
2008-11-20 22:34                           ` John McCutchan
     [not found]                           ` <cfec22b10811201434v2230d11dvc9797018e433fd20-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-20 23:06                             ` Evgeniy Polyakov
2008-11-20 23:06                               ` Evgeniy Polyakov
     [not found]                               ` <20081120230612.GB6536-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-21 18:39                                 ` Arnd Bergmann
2008-11-21 18:39                                   ` Arnd Bergmann
2008-11-22  7:12                                   ` David Newall
     [not found]                                     ` <4927B0D5.4020907-KzQzY1MbaKjAHznzqCTclw@public.gmane.org>
2008-11-22  9:41                                       ` Evgeniy Polyakov
2008-11-22  9:41                                         ` Evgeniy Polyakov
     [not found]                                         ` <20081122094144.GB12543-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-22 11:41                                           ` David Newall
2008-11-22 11:41                                             ` David Newall
     [not found]                                   ` <200811211939.46812.arnd-r2nGTMty4D4@public.gmane.org>
2008-11-22  9:37                                     ` Evgeniy Polyakov
2008-11-22  9:37                                       ` Evgeniy Polyakov
     [not found]                                       ` <20081122093749.GA12543-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-24  5:08                                         ` John McCutchan
2008-11-24  5:08                                           ` John McCutchan
     [not found]                                           ` <cfec22b10811232108u3ade8b66w58999054c03549fc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-24  7:30                                             ` Evgeniy Polyakov
2008-11-24  7:30                                               ` Evgeniy Polyakov

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=cfd18e0f0811190643j7769f768q53889bbc950ef251@mail.gmail.com \
    --to=mtk.manpages-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=john-jueV0HHMeujJJrXXpGQQMAC/G2K4zDHf@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=rlove-L7G0xEPcOZbYtjvyW6yDsg@public.gmane.org \
    --cc=zbr-i6C2adt8DTjR7s880joybQ@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 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.