Re: [PATCH v2] fanotify reports the thread id of the event trigger

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

 



On Tue, Sep 18, 2018 at 3:02 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Tue, Sep 18, 2018 at 12:50 PM Nixiaoming <nixiaoming@xxxxxxxxxx> wrote:
> >
> > On Tue, Sep 18, 2018 3:07 PM Amir Goldstein <amir73il@xxxxxxxxx>
> > >On Tue, Sep 18, 2018 at 6:01 AM Nixiaoming <nixiaoming@xxxxxxxxxx> wrote:
> > >>
> > >> On Mon, Sep 17, 2018 11:51 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> > >> >On Mon, Sep 17, 2018 at 6:05 PM nixiaoming <nixiaoming@xxxxxxxxxx> wrote:
> > >...
> > >> >> diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
> > >> >> index b8f4182..44c659f 100644
> > >> >> --- a/include/linux/fsnotify_backend.h
> > >> >> +++ b/include/linux/fsnotify_backend.h
> > >> >> @@ -193,6 +193,7 @@ struct fsnotify_group {
> > >> >>                         unsigned int max_marks;
> > >> >>                         struct user_struct *user;
> > >> >>                         bool audit;
> > >> >> +                       bool should_report_tid;
> > >> >
> > >> >For brevity I would call that report_tid, but not insisting.
> > >> >
> > >>
> > >> Whether it is better to change to "unsigned int flags"
> > >> Save "group->fanotify_data.flags=flags;" in "fanotify_init"
> > >> Determine whether "group->fanotify_data.flags" contains "FAN_EVENT_INFO_TID" in "fanotify_alloc_event";
> > >>
> > >> At the same time, if there are other flags that need to be used later, there is no need to add new members.
> > >>
> > >> By the way, whether or not "bool audit" can also be included by flags
> > >>
> > >
> > >I strongly agree. Didn't want to impose this change on you, but in
> > >fact, I already did
> > >that in my own patch set, so you can use my patches as reference:
> > >https://github.com/amir73il/linux/commit/5225fe1e19c74f4d7a4a4cc98ff6ef5872c8e620
> > >https://github.com/amir73il/linux/commit/0d1a226f5c18012f19ed6eabfab46f0f125ec190
> > >
> > >If you do this you need to separate your change into 2 patches.
> > >First make the fanotify_data.flags change collecting the pieces from both
> > >my patches.
> > >Then make your TID change using fanotify_data.flags.
> > >
> > >Thanks,
> > >Amir.
> > >
> > Should I do this:
> > 1 git cherry-pick 5225fe1e19c74f4d7a4a4cc98ff6ef5872c8e620
> >     Git cherry-pick 0d1a226f5c18012f19ed6eabfab46f0f125ec190
> >   Manually handle patch conflicts
> > 2 Add a new flag "FAN_EVENT_INFO_TID" into fanotify_data.flags
> > 3 Incorporate "bool audit" into fanotify_data.flags
> > 4 Submit 4 patches
> >
>
> No there is stuff in my patches that is irrelevant.
> Let me prepare a clean patch for fanotify_data.flags and you can work
> on top of that.
>

Nixiaoming,

I posted the prep patch earlier today. You can also find a slightly
modified version of
the patch it on this branch with example for adding a new flag
(FAN_UNPRIVILEGED):
https://github.com/amir73il/linux/commits/fanotify_unpriv

Note that my FAN_UNPRIVILEGED adds the flag at 0x80.
Not that it matters much, but it would be nice if you add your flag at 0x100
because I have more FAN_EVENT_INFO_ flags in the works, so its
nice if we can group them all on byte 3 (at least for start).

For your next posting please don't forget to CC linux-api@xxxxxxxxxxxxxxx
and specify the branch your patch applies to and mention the required prep
patch unless you re-send it as a series.

Thanks,
Amir.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux