Re: [PATCH] fs: don't block write during exec on pre-content watched files

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

 



On Fri, Nov 29, 2024 at 11:57 AM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Thu, Nov 28, 2024 at 6:00 PM Mateusz Guzik <mjguzik@xxxxxxxxx> wrote:
> >
> > On Thu, Nov 28, 2024 at 5:57 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> > >
> > > On Thu, Nov 28, 2024 at 3:34 PM Mateusz Guzik <mjguzik@xxxxxxxxx> wrote:
> > > > so this depends on FMODE_FSNOTIFY_HSM showing up on the file before any
> > > > of the above calls and staying there for its lifetime -- does that hold?
> > >
> > > Yes!
> > >
> >
> > ok
> >
> > In this case the new routines should come with a comment denoting it,
> > otherwise the code looks incredibly suspicious.
>
> How's this:
>
> /*
>  * Do not prevent write to executable file when watched by pre-content events.
>  *
>  * (*) FMODE_FSNOTIFY_HSM mode is set depending on pre-content watches at the
>  *     time of file open and remains for entire lifetime of the file, so if
>  *     pre-content watches are added post execution or removed before the end
>  *     of the execution, it will not cause i_writecount reference leak.
>  */
>

Looks good, thank you!

-- 
Mateusz Guzik <mjguzik gmail.com>





[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