lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Sep 2020 06:44:49 +0300
From:   Amir Goldstein <amir73il@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Xiaoming Ni <nixiaoming@...wei.com>, Jan Kara <jack@...e.cz>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        wangle6@...wei.com
Subject: Re: Question: Why is there no notification when a file is opened
 using filp_open()?

On Tue, Sep 8, 2020 at 8:19 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Tue, Sep 08, 2020 at 04:18:29PM +0300, Amir Goldstein wrote:
> > On Tue, Sep 8, 2020 at 3:53 PM Xiaoming Ni <nixiaoming@...wei.com> wrote:
> > > For example, in fs/coredump.c, do_coredump() calls filp_open() to
> > > generate core files.
> > > In this scenario, the fsnotify_open() notification is missing.
> >
> > I am not convinced that we should generate an event.
> > You will have to explain in what is the real world use case that requires this
> > event to be generated.
>
> Take the typical usage for fsnotify of a graphical file manager.
> It would be nice if the file manager showed a corefile as soon as it
> appeared in a directory rather than waiting until some other operation
> in that directory caused those directory contents to be refreshed.

fsnotify_open() is not the correct notification for file managers IMO.
fsnotify_create() is and it will be called in this case.

If the reason you are interested in open events is because you want
to monitor the entire filesystem then welcome to the future -
FAN_CREATE is supported since kernel v5.1.

Is there another real life case you have in mind where you think users
should be able to get an open fd for a file that the kernel has opened?
Because that is what FAN_OPEN will do.

Thanks,
Amir.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ