diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2018-10-03 17:25:35 -0400 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2018-10-04 07:28:38 -0400 |
| commit | 23c9deeb3285d34fd243abb3d6b9f07db60c3cf4 (patch) | |
| tree | 85b9ab86150fcc5294b2f0d82f6a970571203c07 /include/uapi/linux | |
| parent | a72fd224e37bf6a0630bce302deebbccbc236ba2 (diff) | |
fanotify: deprecate uapi FAN_ALL_* constants
We do not want to add new bits to the FAN_ALL_* uapi constants
because they have been exposed to userspace. If there are programs
out there using these constants, those programs could break if
re-compiled with modified FAN_ALL_* constants and run on an old kernel.
We deprecate the uapi constants FAN_ALL_* and define new FANOTIFY_*
constants for internal use to replace them. New feature bits will be
added only to the new constants.
Cc: <linux-api@vger.kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/fanotify.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h index ad81234d1919..d0c05de670ef 100644 --- a/include/uapi/linux/fanotify.h +++ b/include/uapi/linux/fanotify.h | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | #define FAN_CLASS_NOTIF 0x00000000 | 31 | #define FAN_CLASS_NOTIF 0x00000000 |
| 32 | #define FAN_CLASS_CONTENT 0x00000004 | 32 | #define FAN_CLASS_CONTENT 0x00000004 |
| 33 | #define FAN_CLASS_PRE_CONTENT 0x00000008 | 33 | #define FAN_CLASS_PRE_CONTENT 0x00000008 |
| 34 | |||
| 35 | /* Deprecated - do not use this in programs and do not add new flags here! */ | ||
| 34 | #define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ | 36 | #define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ |
| 35 | FAN_CLASS_PRE_CONTENT) | 37 | FAN_CLASS_PRE_CONTENT) |
| 36 | 38 | ||
| @@ -38,6 +40,7 @@ | |||
| 38 | #define FAN_UNLIMITED_MARKS 0x00000020 | 40 | #define FAN_UNLIMITED_MARKS 0x00000020 |
| 39 | #define FAN_ENABLE_AUDIT 0x00000040 | 41 | #define FAN_ENABLE_AUDIT 0x00000040 |
| 40 | 42 | ||
| 43 | /* Deprecated - do not use this in programs and do not add new flags here! */ | ||
| 41 | #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ | 44 | #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ |
| 42 | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\ | 45 | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\ |
| 43 | FAN_UNLIMITED_MARKS) | 46 | FAN_UNLIMITED_MARKS) |
| @@ -57,23 +60,18 @@ | |||
| 57 | #define FAN_MARK_INODE 0x00000000 | 60 | #define FAN_MARK_INODE 0x00000000 |
| 58 | #define FAN_MARK_MOUNT 0x00000010 | 61 | #define FAN_MARK_MOUNT 0x00000010 |
| 59 | #define FAN_MARK_FILESYSTEM 0x00000100 | 62 | #define FAN_MARK_FILESYSTEM 0x00000100 |
| 60 | #define FAN_MARK_TYPE_MASK (FAN_MARK_INODE | FAN_MARK_MOUNT | \ | ||
| 61 | FAN_MARK_FILESYSTEM) | ||
| 62 | 63 | ||
| 64 | /* Deprecated - do not use this in programs and do not add new flags here! */ | ||
| 63 | #define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\ | 65 | #define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\ |
| 64 | FAN_MARK_REMOVE |\ | 66 | FAN_MARK_REMOVE |\ |
| 65 | FAN_MARK_DONT_FOLLOW |\ | 67 | FAN_MARK_DONT_FOLLOW |\ |
| 66 | FAN_MARK_ONLYDIR |\ | 68 | FAN_MARK_ONLYDIR |\ |
| 69 | FAN_MARK_MOUNT |\ | ||
| 67 | FAN_MARK_IGNORED_MASK |\ | 70 | FAN_MARK_IGNORED_MASK |\ |
| 68 | FAN_MARK_IGNORED_SURV_MODIFY |\ | 71 | FAN_MARK_IGNORED_SURV_MODIFY |\ |
| 69 | FAN_MARK_FLUSH|\ | 72 | FAN_MARK_FLUSH) |
| 70 | FAN_MARK_TYPE_MASK) | ||
| 71 | 73 | ||
| 72 | /* | 74 | /* Deprecated - do not use this in programs and do not add new flags here! */ |
| 73 | * All of the events - we build the list by hand so that we can add flags in | ||
| 74 | * the future and not break backward compatibility. Apps will get only the | ||
| 75 | * events that they originally wanted. Be sure to add new events here! | ||
| 76 | */ | ||
| 77 | #define FAN_ALL_EVENTS (FAN_ACCESS |\ | 75 | #define FAN_ALL_EVENTS (FAN_ACCESS |\ |
| 78 | FAN_MODIFY |\ | 76 | FAN_MODIFY |\ |
| 79 | FAN_CLOSE |\ | 77 | FAN_CLOSE |\ |
| @@ -82,9 +80,11 @@ | |||
| 82 | /* | 80 | /* |
| 83 | * All events which require a permission response from userspace | 81 | * All events which require a permission response from userspace |
| 84 | */ | 82 | */ |
| 83 | /* Deprecated - do not use this in programs and do not add new flags here! */ | ||
| 85 | #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\ | 84 | #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\ |
| 86 | FAN_ACCESS_PERM) | 85 | FAN_ACCESS_PERM) |
| 87 | 86 | ||
| 87 | /* Deprecated - do not use this in programs and do not add new flags here! */ | ||
| 88 | #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\ | 88 | #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\ |
| 89 | FAN_ALL_PERM_EVENTS |\ | 89 | FAN_ALL_PERM_EVENTS |\ |
| 90 | FAN_Q_OVERFLOW) | 90 | FAN_Q_OVERFLOW) |
