]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
fanotify: fanotify_init syscall declaration
authorEric Paris <eparis@redhat.com>
Fri, 18 Dec 2009 02:24:25 +0000 (21:24 -0500)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 13:58:55 +0000 (09:58 -0400)
This patch defines a new syscall fanotify_init() of the form:

int sys_fanotify_init(unsigned int flags, unsigned int event_f_flags,
      unsigned int priority)

This syscall is used to create and fanotify group.  This is very similar to
the inotify_init() syscall.

Signed-off-by: Eric Paris <eparis@redhat.com>
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/syscall_table_32.S
fs/notify/fanotify/Makefile
fs/notify/fanotify/fanotify_user.c [new file with mode: 0644]
include/linux/syscalls.h
kernel/sys_ni.c

index e790bc1fbfa3a3f5b925b2dcabe82caced57a8bb..586cb3be2e323f989f7a738b34419b8c49ba3456 100644 (file)
@@ -842,4 +842,5 @@ ia32_sys_call_table:
        .quad compat_sys_rt_tgsigqueueinfo      /* 335 */
        .quad sys_perf_event_open
        .quad compat_sys_recvmmsg
+       .quad sys_fanotify_init
 ia32_syscall_end:
index beb9b5f8f8a4183299d8cfbdd9816cf0391ab2ed..981c7e7ad8040eb0d6150dd4e7083426d361731e 100644 (file)
 #define __NR_rt_tgsigqueueinfo 335
 #define __NR_perf_event_open   336
 #define __NR_recvmmsg          337
+#define __NR_fanotify_init     338
 
 #ifdef __KERNEL__
 
-#define NR_syscalls 338
+#define NR_syscalls 339
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
index ff4307b0e81e13544c5f34455713214d58c4e464..4f23e04bdb345ffa1bfd17c265837ea45ddc307c 100644 (file)
@@ -663,6 +663,8 @@ __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo)
 __SYSCALL(__NR_perf_event_open, sys_perf_event_open)
 #define __NR_recvmmsg                          299
 __SYSCALL(__NR_recvmmsg, sys_recvmmsg)
+#define __NR_fanotify_init                     300
+__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
 
 #ifndef __NO_STUBS
 #define __ARCH_WANT_OLD_READDIR
index 8b3729341216c011a1599c752f457b1acc8fee44..e38793b50e1d7e7c5582bc029f0e47abb7abc4b9 100644 (file)
@@ -337,3 +337,4 @@ ENTRY(sys_call_table)
        .long sys_rt_tgsigqueueinfo     /* 335 */
        .long sys_perf_event_open
        .long sys_recvmmsg
+       .long sys_fanotify_init
index e7d39c05b0feebcab1cae193767a86c211ad630a..0999213e7e6e6f84969a86b12acf599038c4c7bd 100644 (file)
@@ -1 +1 @@
-obj-$(CONFIG_FANOTIFY)         += fanotify.o
+obj-$(CONFIG_FANOTIFY)         += fanotify.o fanotify_user.o
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
new file mode 100644 (file)
index 0000000..cf176fc
--- /dev/null
@@ -0,0 +1,13 @@
+#include <linux/fcntl.h>
+#include <linux/fs.h>
+#include <linux/fsnotify_backend.h>
+#include <linux/security.h>
+#include <linux/syscalls.h>
+
+#include "fanotify.h"
+
+SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags,
+               unsigned int, priority)
+{
+       return -ENOSYS;
+}
index 13ebb5413a7982c5fdd1153432794f39a708f362..198dcc9bd025c1d2ce0d87b7d82816346464d9d3 100644 (file)
@@ -813,6 +813,8 @@ asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *,
 asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int,
                          struct timespec __user *, const sigset_t __user *,
                          size_t);
+asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags,
+                                 unsigned int priority);
 
 int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
 
index 70f2ea758ffec524715554e9e552edab4252ea9e..2c4adc2decc380279a81dfbc3c27fdc7a9c52a66 100644 (file)
@@ -181,3 +181,6 @@ cond_syscall(sys_eventfd2);
 
 /* performance counters: */
 cond_syscall(sys_perf_event_open);
+
+/* fanotify! */
+cond_syscall(sys_fanotify_init);