Merge branch 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / include / uapi / linux / fs.h
index d2463396125c61974083ae196746cdd378ee24a6..a079d50376e15bd0a3db5ab7ce04fb24c0ef33ea 100644 (file)
@@ -246,6 +246,24 @@ struct fsxattr {
 #define FS_IOC_FSGETXATTR              _IOR ('X', 31, struct fsxattr)
 #define FS_IOC_FSSETXATTR              _IOW ('X', 32, struct fsxattr)
 
+/*
+ * File system encryption support
+ */
+/* Policy provided via an ioctl on the topmost directory */
+#define FS_KEY_DESCRIPTOR_SIZE 8
+
+struct fscrypt_policy {
+       __u8 version;
+       __u8 contents_encryption_mode;
+       __u8 filenames_encryption_mode;
+       __u8 flags;
+       __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE];
+} __packed;
+
+#define FS_IOC_SET_ENCRYPTION_POLICY   _IOR('f', 19, struct fscrypt_policy)
+#define FS_IOC_GET_ENCRYPTION_PWSALT   _IOW('f', 20, __u8[16])
+#define FS_IOC_GET_ENCRYPTION_POLICY   _IOW('f', 21, struct fscrypt_policy)
+
 /*
  * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
  *
This page took 0.025778 seconds and 5 git commands to generate.