linux/fs/notify
Matthew Bobrowski 0aca67bb7f fanotify: introduce a generic info record copying helper
The copy_info_records_to_user() helper allows for the separation of
info record copying routines/conditionals from copy_event_to_user(),
which reduces the overall clutter within this function. This becomes
especially true as we start introducing additional info records in the
future i.e. struct fanotify_event_info_pidfd. On success, this helper
returns the total amount of bytes that have been copied into the user
supplied buffer and on error, a negative value is returned to the
caller.

The newly defined macro FANOTIFY_INFO_MODES can be used to obtain info
record types that have been enabled for a specific notification
group. This macro becomes useful in the subsequent patch when the
FAN_REPORT_PIDFD initialization flag is introduced.

Link: https://lore.kernel.org/r/8872947dfe12ce8ae6e9a7f2d49ea29bc8006af0.1628398044.git.repnop@google.com
Signed-off-by: Matthew Bobrowski <repnop@google.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2021-08-10 12:55:37 +02:00
..
dnotify \n 2020-12-17 10:56:27 -08:00
fanotify fanotify: introduce a generic info record copying helper 2021-08-10 12:55:37 +02:00
inotify fsnotify: use hash table for faster events merge 2021-03-16 16:37:51 +01:00
fdinfo.c fanotify: fix permission model of unprivileged group 2021-05-25 12:21:14 +02:00
fdinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsnotify.c fsnotify: fix events reported to watching parent and child 2020-12-11 11:40:43 +01:00
fsnotify.h fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h 2019-10-17 10:31:12 +02:00
group.c fanotify: configurable limits via sysfs 2021-03-16 16:49:31 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mark.c fanotify: configurable limits via sysfs 2021-03-16 16:49:31 +01:00
notification.c fsnotify: use hash table for faster events merge 2021-03-16 16:37:51 +01:00