* Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY
@ 2018-03-19 4:40 Amir Goldstein
2018-03-20 19:58 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2018-03-19 4:40 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
Jan,
Do you know why config FANOTIFY_ACCESS_PERMISSIONS depends on SECURITY?
I didn't find any obvious dependency in the code and FANOTIFY_ACCESS_PERMISSIONS
compiles when I remove SECURITY dependency, but FANOTIFY_ACCESS_PERMISSIONS
tests failed.
What am I missing?
Thanks,
Amir.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY
2018-03-19 4:40 Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY Amir Goldstein
@ 2018-03-20 19:58 ` Jan Kara
2018-03-21 6:35 ` Amir Goldstein
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2018-03-20 19:58 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Jan Kara, linux-fsdevel
Hi Amir!
On Mon 19-03-18 06:40:30, Amir Goldstein wrote:
> Do you know why config FANOTIFY_ACCESS_PERMISSIONS depends on SECURITY?
>
> I didn't find any obvious dependency in the code and
> FANOTIFY_ACCESS_PERMISSIONS compiles when I remove SECURITY dependency,
> but FANOTIFY_ACCESS_PERMISSIONS tests failed.
No idea at the first moment. On a second though I believe the reason for
this is that fsnotify_perm() gets called from security_file_open() which is
non-trivial only in CONFIG_SECURITY is set... Which explains why things are
the way you observe.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY
2018-03-20 19:58 ` Jan Kara
@ 2018-03-21 6:35 ` Amir Goldstein
0 siblings, 0 replies; 3+ messages in thread
From: Amir Goldstein @ 2018-03-21 6:35 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
On Tue, Mar 20, 2018 at 9:58 PM, Jan Kara <jack@suse.cz> wrote:
> Hi Amir!
>
> On Mon 19-03-18 06:40:30, Amir Goldstein wrote:
>> Do you know why config FANOTIFY_ACCESS_PERMISSIONS depends on SECURITY?
>>
>> I didn't find any obvious dependency in the code and
>> FANOTIFY_ACCESS_PERMISSIONS compiles when I remove SECURITY dependency,
>> but FANOTIFY_ACCESS_PERMISSIONS tests failed.
>
> No idea at the first moment. On a second though I believe the reason for
> this is that fsnotify_perm() gets called from security_file_open() which is
> non-trivial only in CONFIG_SECURITY is set... Which explains why things are
> the way you observe.
>
Wow. That's completely unneeded.
We should call fsnotify_perm() directly from do_dentry_open(), just like
fsnotify_open(). Can also make fsnotify_perm() NOOP if
FANOTIFY_ACCESS_PERMISSIONS
is not defined. Will send a patch.
Thanks,
Amir.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-21 6:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 4:40 Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY Amir Goldstein
2018-03-20 19:58 ` Jan Kara
2018-03-21 6:35 ` Amir Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).