|
|
@@ -13,6 +13,7 @@
|
|
|
#include <linux/slab.h>
|
|
|
#include <linux/types.h>
|
|
|
#include <linux/uaccess.h>
|
|
|
+#include <linux/compat.h>
|
|
|
|
|
|
#include <asm/ioctls.h>
|
|
|
|
|
|
@@ -857,6 +858,22 @@ SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+#ifdef CONFIG_COMPAT
|
|
|
+COMPAT_SYSCALL_DEFINE6(fanotify_mark,
|
|
|
+ int, fanotify_fd, unsigned int, flags,
|
|
|
+ __u32, mask0, __u32, mask1, int, dfd,
|
|
|
+ const char __user *, pathname)
|
|
|
+{
|
|
|
+ return sys_fanotify_mark(fanotify_fd, flags,
|
|
|
+#ifdef __BIG_ENDIAN
|
|
|
+ ((__u64)mask1 << 32) | mask0,
|
|
|
+#else
|
|
|
+ ((__u64)mask0 << 32) | mask1,
|
|
|
+#endif
|
|
|
+ dfd, pathname);
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
/*
|
|
|
* fanotify_user_setup - Our initialization function. Note that we cannot return
|
|
|
* error because we have compiled-in VFS hooks. So an (unlikely) failure here
|