Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
@ 2020-04-23 10:36 Michael Kerrisk (man-pages)
  2020-04-23 11:23 ` Jan Kara
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-23 10:36 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Amir Goldstein, linux-man, alexandermv, Matthew Bobrowski, Jan Kara

Hi Heinrich,

Would you be able to take a look at
https://bugzilla.kernel.org/show_bug.cgi?id=198569

It relates to some text you added to the fanotify_mark(2) manual page:

       FAN_Q_OVERFLOW
              Create an event when an overflow of the event queue occurs.
              The size of the event queue is limited to 16384 entries  if
              FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).

This was in the following commit

[[
commit 5d730f864a6603b090cd1078668cede05d02b8c4
Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date:   Tue Nov 8 23:13:38 2016 +0100

    fanotify_mark.2: Mention FAN_Q_OVERFLOW

    To receive overflow events it is necessary to set this bit
    in fanotify_mark().
]]

As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
source) is only an output flag. But on the other hand, I know you are
generally careful, so I wonder if something changed (though, at a
quick glance, I could not see evidence that it has).

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
  2020-04-23 10:36 Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW Michael Kerrisk (man-pages)
@ 2020-04-23 11:23 ` Jan Kara
  2020-04-23 12:19   ` Amir Goldstein
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2020-04-23 11:23 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Heinrich Schuchardt, Amir Goldstein, linux-man, alexandermv,
	Matthew Bobrowski, Jan Kara

Hi Michael!

On Thu 23-04-20 12:36:26, Michael Kerrisk (man-pages) wrote:
> Would you be able to take a look at
> https://bugzilla.kernel.org/show_bug.cgi?id=198569
> 
> It relates to some text you added to the fanotify_mark(2) manual page:
> 
>        FAN_Q_OVERFLOW
>               Create an event when an overflow of the event queue occurs.
>               The size of the event queue is limited to 16384 entries  if
>               FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).
> 
> This was in the following commit
> 
> [[
> commit 5d730f864a6603b090cd1078668cede05d02b8c4
> Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Date:   Tue Nov 8 23:13:38 2016 +0100
> 
>     fanotify_mark.2: Mention FAN_Q_OVERFLOW
> 
>     To receive overflow events it is necessary to set this bit
>     in fanotify_mark().
> ]]
> 
> As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
> source) is only an output flag. But on the other hand, I know you are
> generally careful, so I wonder if something changed (though, at a
> quick glance, I could not see evidence that it has).

Yeah, the manpage is wrong AFAICT. FAN_Q_OVERFLOW is not accepted in the
input mask. It is only output event flag.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
  2020-04-23 11:23 ` Jan Kara
@ 2020-04-23 12:19   ` Amir Goldstein
  2020-04-23 12:42     ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 6+ messages in thread
From: Amir Goldstein @ 2020-04-23 12:19 UTC (permalink / raw)
  To: Jan Kara
  Cc: Michael Kerrisk (man-pages),
	Heinrich Schuchardt, linux-man, alexandermv, Matthew Bobrowski

On Thu, Apr 23, 2020 at 2:23 PM Jan Kara <jack@suse.cz> wrote:
>
> Hi Michael!
>
> On Thu 23-04-20 12:36:26, Michael Kerrisk (man-pages) wrote:
> > Would you be able to take a look at
> > https://bugzilla.kernel.org/show_bug.cgi?id=198569
> >
> > It relates to some text you added to the fanotify_mark(2) manual page:
> >
> >        FAN_Q_OVERFLOW
> >               Create an event when an overflow of the event queue occurs.
> >               The size of the event queue is limited to 16384 entries  if
> >               FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).
> >
> > This was in the following commit
> >
> > [[
> > commit 5d730f864a6603b090cd1078668cede05d02b8c4
> > Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > Date:   Tue Nov 8 23:13:38 2016 +0100
> >
> >     fanotify_mark.2: Mention FAN_Q_OVERFLOW
> >
> >     To receive overflow events it is necessary to set this bit
> >     in fanotify_mark().
> > ]]
> >
> > As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
> > source) is only an output flag. But on the other hand, I know you are
> > generally careful, so I wonder if something changed (though, at a
> > quick glance, I could not see evidence that it has).
>
> Yeah, the manpage is wrong AFAICT. FAN_Q_OVERFLOW is not accepted in the
> input mask. It is only output event flag.
>

Right.

Note that fanotify.7 documents FAN_Q_OVERFLOW as part of event output mask
so perhaps the FAN_Q_OVERFLOW entry for fanotify_mark.2 input mask should
just be removed?

Similarly, the input only flag FAN_EVENT_ON_CHILD is documented in
fanotify_mark.2, but not in fanotify.7.

FAN_ONDIR has been input only until v5.1 and since then it can also be
in output mask for group with FAN_REPORT_FID.
This is documented in fanotify_mark.2, but not in fanotify.7.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
  2020-04-23 12:19   ` Amir Goldstein
@ 2020-04-23 12:42     ` Michael Kerrisk (man-pages)
  2020-04-23 16:42       ` Amir Goldstein
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-23 12:42 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Jan Kara, Heinrich Schuchardt, linux-man, alexandermv, Matthew Bobrowski

Hello Amir, Jan,

On Thu, 23 Apr 2020 at 14:19, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Thu, Apr 23, 2020 at 2:23 PM Jan Kara <jack@suse.cz> wrote:
> >
> > Hi Michael!
> >
> > On Thu 23-04-20 12:36:26, Michael Kerrisk (man-pages) wrote:
> > > Would you be able to take a look at
> > > https://bugzilla.kernel.org/show_bug.cgi?id=198569
> > >
> > > It relates to some text you added to the fanotify_mark(2) manual page:
> > >
> > >        FAN_Q_OVERFLOW
> > >               Create an event when an overflow of the event queue occurs.
> > >               The size of the event queue is limited to 16384 entries  if
> > >               FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).
> > >
> > > This was in the following commit
> > >
> > > [[
> > > commit 5d730f864a6603b090cd1078668cede05d02b8c4
> > > Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > Date:   Tue Nov 8 23:13:38 2016 +0100
> > >
> > >     fanotify_mark.2: Mention FAN_Q_OVERFLOW
> > >
> > >     To receive overflow events it is necessary to set this bit
> > >     in fanotify_mark().
> > > ]]
> > >
> > > As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
> > > source) is only an output flag. But on the other hand, I know you are
> > > generally careful, so I wonder if something changed (though, at a
> > > quick glance, I could not see evidence that it has).
> >
> > Yeah, the manpage is wrong AFAICT. FAN_Q_OVERFLOW is not accepted in the
> > input mask. It is only output event flag.
> >
>
> Right.
>
> Note that fanotify.7 documents FAN_Q_OVERFLOW as part of event output mask
> so perhaps the FAN_Q_OVERFLOW entry for fanotify_mark.2 input mask should
> just be removed?

Yes, I'll just remove that piece from fanotify_mark.2.
>
> Similarly, the input only flag FAN_EVENT_ON_CHILD is documented in
> fanotify_mark.2, but not in fanotify.7.
>
> FAN_ONDIR has been input only until v5.1 and since then it can also be
> in output mask for group with FAN_REPORT_FID.
> This is documented in fanotify_mark.2, but not in fanotify.7.

I'm overlooking something: where is this detail documented in
fanotify_mark.2? (I mean, I see mention of FAN_ONDIR, but no mention
of a change in v5.1.)

And would you be willing to write a small patch for fanotify.7 :-) ?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
  2020-04-23 12:42     ` Michael Kerrisk (man-pages)
@ 2020-04-23 16:42       ` Amir Goldstein
  2020-05-15 11:44         ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 6+ messages in thread
From: Amir Goldstein @ 2020-04-23 16:42 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Jan Kara, Heinrich Schuchardt, linux-man, alexandermv, Matthew Bobrowski

On Thu, Apr 23, 2020 at 3:42 PM Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
>
> Hello Amir, Jan,
>
> On Thu, 23 Apr 2020 at 14:19, Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Thu, Apr 23, 2020 at 2:23 PM Jan Kara <jack@suse.cz> wrote:
> > >
> > > Hi Michael!
> > >
> > > On Thu 23-04-20 12:36:26, Michael Kerrisk (man-pages) wrote:
> > > > Would you be able to take a look at
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=198569
> > > >
> > > > It relates to some text you added to the fanotify_mark(2) manual page:
> > > >
> > > >        FAN_Q_OVERFLOW
> > > >               Create an event when an overflow of the event queue occurs.
> > > >               The size of the event queue is limited to 16384 entries  if
> > > >               FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).
> > > >
> > > > This was in the following commit
> > > >
> > > > [[
> > > > commit 5d730f864a6603b090cd1078668cede05d02b8c4
> > > > Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > > Date:   Tue Nov 8 23:13:38 2016 +0100
> > > >
> > > >     fanotify_mark.2: Mention FAN_Q_OVERFLOW
> > > >
> > > >     To receive overflow events it is necessary to set this bit
> > > >     in fanotify_mark().
> > > > ]]
> > > >
> > > > As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
> > > > source) is only an output flag. But on the other hand, I know you are
> > > > generally careful, so I wonder if something changed (though, at a
> > > > quick glance, I could not see evidence that it has).
> > >
> > > Yeah, the manpage is wrong AFAICT. FAN_Q_OVERFLOW is not accepted in the
> > > input mask. It is only output event flag.
> > >
> >
> > Right.
> >
> > Note that fanotify.7 documents FAN_Q_OVERFLOW as part of event output mask
> > so perhaps the FAN_Q_OVERFLOW entry for fanotify_mark.2 input mask should
> > just be removed?
>
> Yes, I'll just remove that piece from fanotify_mark.2.
> >
> > Similarly, the input only flag FAN_EVENT_ON_CHILD is documented in
> > fanotify_mark.2, but not in fanotify.7.
> >
> > FAN_ONDIR has been input only until v5.1 and since then it can also be
> > in output mask for group with FAN_REPORT_FID.
> > This is documented in fanotify_mark.2, but not in fanotify.7.
>
> I'm overlooking something: where is this detail documented in
> fanotify_mark.2? (I mean, I see mention of FAN_ONDIR, but no mention
> of a change in v5.1.)

fanotify_mark.2:
The FAN_ONDIR flag is reported in an event mask only if the fanotify_fd
file descriptor has been initialized with the flag FAN_REPORT_FID.

fanotify_init.2:
FAN_REPORT_FID (since Linux 5.1)

>
> And would you be willing to write a small patch for fanotify.7 :-) ?
>

I guess I was asking for it ;-)
I have some more work cut out for me on this man page for v5.7 or later.
Adding yet another fanotify_init flag, so I'll make this change part of my
next series.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW
  2020-04-23 16:42       ` Amir Goldstein
@ 2020-05-15 11:44         ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-15 11:44 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Jan Kara, Heinrich Schuchardt, linux-man, alexandermv, Matthew Bobrowski

On Thu, 23 Apr 2020 at 18:42, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Thu, Apr 23, 2020 at 3:42 PM Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
> >
> > Hello Amir, Jan,
> >
> > On Thu, 23 Apr 2020 at 14:19, Amir Goldstein <amir73il@gmail.com> wrote:
> > >
> > > On Thu, Apr 23, 2020 at 2:23 PM Jan Kara <jack@suse.cz> wrote:
> > > >
> > > > Hi Michael!
> > > >
> > > > On Thu 23-04-20 12:36:26, Michael Kerrisk (man-pages) wrote:
> > > > > Would you be able to take a look at
> > > > > https://bugzilla.kernel.org/show_bug.cgi?id=198569
> > > > >
> > > > > It relates to some text you added to the fanotify_mark(2) manual page:
> > > > >
> > > > >        FAN_Q_OVERFLOW
> > > > >               Create an event when an overflow of the event queue occurs.
> > > > >               The size of the event queue is limited to 16384 entries  if
> > > > >               FAN_UNLIMITED_QUEUE is not set in fanotify_init(2).
> > > > >
> > > > > This was in the following commit
> > > > >
> > > > > [[
> > > > > commit 5d730f864a6603b090cd1078668cede05d02b8c4
> > > > > Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > > > Date:   Tue Nov 8 23:13:38 2016 +0100
> > > > >
> > > > >     fanotify_mark.2: Mention FAN_Q_OVERFLOW
> > > > >
> > > > >     To receive overflow events it is necessary to set this bit
> > > > >     in fanotify_mark().
> > > > > ]]
> > > > >
> > > > > As far as I can see, FAN_Q_OVERFLOW (test program, reading the kernel
> > > > > source) is only an output flag. But on the other hand, I know you are
> > > > > generally careful, so I wonder if something changed (though, at a
> > > > > quick glance, I could not see evidence that it has).
> > > >
> > > > Yeah, the manpage is wrong AFAICT. FAN_Q_OVERFLOW is not accepted in the
> > > > input mask. It is only output event flag.
> > > >
> > >
> > > Right.
> > >
> > > Note that fanotify.7 documents FAN_Q_OVERFLOW as part of event output mask
> > > so perhaps the FAN_Q_OVERFLOW entry for fanotify_mark.2 input mask should
> > > just be removed?
> >
> > Yes, I'll just remove that piece from fanotify_mark.2.
> > >
> > > Similarly, the input only flag FAN_EVENT_ON_CHILD is documented in
> > > fanotify_mark.2, but not in fanotify.7.
> > >
> > > FAN_ONDIR has been input only until v5.1 and since then it can also be
> > > in output mask for group with FAN_REPORT_FID.
> > > This is documented in fanotify_mark.2, but not in fanotify.7.
> >
> > I'm overlooking something: where is this detail documented in
> > fanotify_mark.2? (I mean, I see mention of FAN_ONDIR, but no mention
> > of a change in v5.1.)
>
> fanotify_mark.2:
> The FAN_ONDIR flag is reported in an event mask only if the fanotify_fd
> file descriptor has been initialized with the flag FAN_REPORT_FID.
>
> fanotify_init.2:
> FAN_REPORT_FID (since Linux 5.1)
>
> >
> > And would you be willing to write a small patch for fanotify.7 :-) ?
> >
>
> I guess I was asking for it ;-)
> I have some more work cut out for me on this man page for v5.7 or later.
> Adding yet another fanotify_init flag, so I'll make this change part of my
> next series.

Thanks, Amir. I look forward to the patch(es).

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 10:36 Kernel bugzilla 198569: fanotify_mark() and FAN_Q_OVERFLOW Michael Kerrisk (man-pages)
2020-04-23 11:23 ` Jan Kara
2020-04-23 12:19   ` Amir Goldstein
2020-04-23 12:42     ` Michael Kerrisk (man-pages)
2020-04-23 16:42       ` Amir Goldstein
2020-05-15 11:44         ` Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git