Re: Fanotify Directory exclusion not working when using FAN_MARK_MOUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 14-04-22 14:02:27, Amir Goldstein wrote:
> > > Jan,
> > >
> > > Just a heads up - you were right about this inconsistency and I have both
> > > patches to fix it [1] and LTP test to reproduce the issue [2] and started work
> > > on the new FAN_MARK_IGNORE API.
> > > The new API has no tests yet, but it has a man page draft [3].
> > >
> > > The description of the bugs as I wrote them in the fix commit message:
> > >
> > >     This results in several subtle changes of behavior, hopefully all
> > >     desired changes of behavior, for example:
> > >
> > >     - Group A has a mount mark with FS_MODIFY in mask
> > >     - Group A has a mark with ignored mask that does not survive FS_MODIFY
> > >       and does not watch children on directory D.
> > >     - Group B has a mark with FS_MODIFY in mask that does watch children
> > >       on directory D.
> > >     - FS_MODIFY event on file D/foo should not clear the ignored mask of
> > >       group A, but before this change it does
> > >
> > >     And if group A ignored mask was set to survive FS_MODIFY:
> > >     - FS_MODIFY event on file D/foo should be reported to group A on account
> > >       of the mount mark, but before this change it is wrongly ignored
> > >
> > >     Fixes: 2f02fd3fa13e ("fanotify: fix ignore mask logic for events
> > > on child and on dir")
> >
> > Thanks for looking into this! Yeah, the change in behavior looks OK to me.
> >
> 
> And I got sufficiently annoyed by our mixed terminology of "ignored mask"
> and "ignore mask". Man pages only use the latter and also most of the
> comments in code and many of the commit messages but not all of them
> and variable name is of course the former, so I decided to take action:
> 
> commit 6c6f07348c0c587e2bdcdb997caa30f852e818ef
> Author: Amir Goldstein <amir73il@xxxxxxxxx>
> Date:   Tue Apr 12 13:25:34 2022 +0300
> 
>     fanotify: prepare for setting event flags in ignore mask
> 
> [...]
> 
>     To emphasize the change in terminology, also rename ignored_mask mark
>     member to ignore_mask and use accessor to get only ignored events or
>     events and flags.
> 
>     This change in terminology finally aligns with the "ignore mark"
>     language in man pages and in most of the comments.
> 
> I hope I didn't take it too far...

Forgot to respond to this one but it makes sense to me.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux