lkml.org 
[lkml]   [2020]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Question: Why is there no notification when a file is opened using filp_open()?
From
Date
On 2020/9/8 18:06, Amir Goldstein wrote:
> On Tue, Sep 8, 2020 at 11:02 AM Xiaoming Ni <nixiaoming@huawei.com> wrote:
>>
>> The file opening action on the system may be from user-mode sys_open()
>> or kernel-mode filp_open().
>> Currently, fsnotify_open() is invoked in do_sys_openat2().
>> But filp_open() is not notified. Why? Is this an omission?
>>
>> Do we need to call fsnotify_open() in filp_open() or do_filp_open() to
>> ensure that both user-mode and kernel-mode file opening operations can
>> be notified?
>>
>
> Do you have a specific use case of kernel filp_open() in mind?
>

For example, in fs/coredump.c, do_coredump() calls filp_open() to
generate core files.
In this scenario, the fsnotify_open() notification is missing.

Thanks
Xiaoming Ni

\
 
 \ /
  Last update: 2020-09-08 19:02    [W:0.048 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site