This is the first part of v2. Changes v2 => v3: 1. v3 is the fanotify part of v2. 2. Rebrand as fanotify in kernel filter (instead of fastpath handler). 3. Fix logic and add sample for permission mmode. [v2]: https://lore.kernel.org/linux-fsdevel/20241114084345.1564165-1-song@xxxxxxxxxx/ Changes v1 => v2: 1. Add sysfs entries for fastpath handler. 2. Rewrite the sample and bpf selftest to handle subtree monitoring. This requires quite some work from BPF side to properly handle inode, dentry, etc. 3. Add CONFIG_FANOTIFY_FASTPATH. 4. Add more documents.