diff options
author | Matthew Bobrowski <[email protected]> | 2021-08-08 15:25:58 +1000 |
---|---|---|
committer | Jan Kara <[email protected]> | 2021-08-10 12:55:37 +0200 |
commit | 0aca67bb7f0d8c997dfef8ff0bfeb0afb361f0e6 (patch) | |
tree | ea67a7e163a2d6cf24d18212da2c525ce6afb0a7 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | d3424c9bac893bd06f38a20474cd622881d384ca (diff) |
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 <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions