Re: [PATCH 06/10] fanotify: pass optional file access range in pre-content event

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

 



On Thu, Aug 1, 2024 at 7:16 PM Jan Kara <jack@xxxxxxx> wrote:
>
> On Thu 25-07-24 14:19:43, Josef Bacik wrote:
> > From: Amir Goldstein <amir73il@xxxxxxxxx>
> >
> > We would like to add file range information to pre-content events.
> >
> > Pass a struct file_range with optional offset and length to event handler
> > along with pre-content permission event.
> >
> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
>
> ...
>
> > @@ -565,6 +569,10 @@ static struct fanotify_event *fanotify_alloc_perm_event(const struct path *path,
> >       pevent->hdr.len = 0;
> >       pevent->state = FAN_EVENT_INIT;
> >       pevent->path = *path;
> > +     if (range) {
> > +             pevent->ppos = range->ppos;
> > +             pevent->count = range->count;
> > +     }
>
> Shouldn't we initialze ppos & count in case range info isn't passed?

Currently, range info is always passed in case of
fanotify_event_has_access_range(), but for robustness I guess we should.

Thanks,
Amir.





[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