On Thu, Dec 07, 2023 at 02:38:25PM +0200, Amir Goldstein wrote: > In preparation for pre-content permission events with file access range, > move fsnotify_file_perm() hook out of security_file_permission() and into > the callers that have the access range information and pass the access > range to fsnotify_file_perm(). Not pleasant tbh. I really dislike that we have all this extra hook machinery. In some places we have LSM hook, then IMA, then EVM, then fsnotify. Luckily there's a push to move IMA and EVM into the LSM hooks which is at least better and gets rid of some of that stuff. But not too fond that we're moving fsnotify out of the hooks. But since there's no obvious way to consolidate fsnotify and that LSM stuff it's ok as far as I'm concerned.