RE: [PATCH] fanotify support save thread id
Date: Mon Sep 17 2018 - 10:57:46 EST
On Mon, Sep 17, 2018 6:54 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>On Mon, Sep 17, 2018 at 1:02 PM nixiaoming <nixiaoming@xxxxxxxxxx> wrote:
>> Added FAN_EVENT_INFO_TID to select the thread id of the event trigger
>Maybe "to report the thread id of the task that caused the event".
>Also in commit title, I think "reporting thread id" is more to the point
>than "save thread id".
Very good advice, I will update the patch description based on your suggestions.
>> Signed-off-by: nixiaoming <nixiaoming@xxxxxxxxxx>
>> --- a/include/uapi/linux/fanotify.h
>> +++ b/include/uapi/linux/fanotify.h
>> @@ -18,6 +18,7 @@
>> #define FAN_ONDIR 0x40000000 /* event occurred against dir */
>> +#define FAN_EVENT_INFO_TID 0x02000000 /* event save thread id replace tgid */
>> #define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */
>You misunderstood me.
>I meant that you should add support for flag FAN_EVENT_INFO_TID
>for the fanotify_init() syscall, not the fanotify_mark() syscall.
I mistakenly thought that adding a tag to group->fanotify_data in the fanotify_init system call would affect the system ABI.
local tests found that Module.symvers did not change before and after the modification.
According to your opinion, I have re-modified a version of fanotify_init
I will send the patch later.
>See this commit from Steve Grubb for example of adding new opt-in
>behavior to fanotify:
>de8cd83e91bc audit: Record fanotify access control decisions
>BTW, Steve, did you ever follow up with a man-pages patch?