aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-10-28 17:21:58 -0400
committerEric Paris <eparis@redhat.com>2010-10-28 17:22:15 -0400
commitac7e22dcfafd04c842a02057afd6541c1d613ef9 (patch)
tree54e84b0596d9915f29e56e6b6a8d8370771202c5 /include/linux
parente7099d8a5a34d2876908a9fab4952dabdcfc5909 (diff)
fanotify: allow userspace to override max marks
Some fanotify groups, especially those like AV scanners, will need to place lots of marks, particularly ignore marks. Since ignore marks do not pin inodes in cache and are cleared if the inode is removed from core (usually under memory pressure) we expose an interface for listeners, with CAP_SYS_ADMIN, to override the maximum number of marks and be allowed to set and 'unlimited' number of marks. Programs which make use of this feature will be able to OOM a machine. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fanotify.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index e37f559c95e1..7592a366a57b 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -32,9 +32,11 @@
32 FAN_CLASS_PRE_CONTENT) 32 FAN_CLASS_PRE_CONTENT)
33 33
34#define FAN_UNLIMITED_QUEUE 0x00000010 34#define FAN_UNLIMITED_QUEUE 0x00000010
35#define FAN_UNLIMITED_MARKS 0x00000020
35 36
36#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ 37#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
37 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE) 38 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\
39 FAN_UNLIMITED_MARKS)
38 40
39/* flags used for fanotify_modify_mark() */ 41/* flags used for fanotify_modify_mark() */
40#define FAN_MARK_ADD 0x00000001 42#define FAN_MARK_ADD 0x00000001