fscrypt: move the policy flags and encryption mode definitions to uapi header
authorTheodore Ts'o <tytso@mit.edu>
Sun, 27 Nov 2016 03:18:59 +0000 (22:18 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 11 Dec 2016 21:26:10 +0000 (16:26 -0500)
These constants are part of the UAPI, so they belong in
include/uapi/linux/fs.h instead of include/linux/fscrypto.h

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Biggers <ebiggers@google.com>
include/linux/fscrypto.h
include/uapi/linux/fs.h

index 71e8a20711ecb5c042767086953207dd81e61e9a..42ef82d60790ba7c359c520be9a6ea89b26fc170 100644 (file)
 #include <crypto/skcipher.h>
 #include <uapi/linux/fs.h>
 
-#define FS_POLICY_FLAGS_PAD_4          0x00
-#define FS_POLICY_FLAGS_PAD_8          0x01
-#define FS_POLICY_FLAGS_PAD_16         0x02
-#define FS_POLICY_FLAGS_PAD_32         0x03
-#define FS_POLICY_FLAGS_PAD_MASK       0x03
-#define FS_POLICY_FLAGS_VALID          0x03
-
-/* Encryption algorithms */
-#define FS_ENCRYPTION_MODE_INVALID             0
-#define FS_ENCRYPTION_MODE_AES_256_XTS         1
-#define FS_ENCRYPTION_MODE_AES_256_GCM         2
-#define FS_ENCRYPTION_MODE_AES_256_CBC         3
-#define FS_ENCRYPTION_MODE_AES_256_CTS         4
-
 #define FS_CRYPTO_BLOCK_SIZE           16
 
 struct fscrypt_info;
index acb2b6152ba01243a363bbb199a525c28d9e1101..0496d37abe289884310add3545a2ede4d7de04a8 100644 (file)
@@ -254,6 +254,20 @@ struct fsxattr {
 /* Policy provided via an ioctl on the topmost directory */
 #define FS_KEY_DESCRIPTOR_SIZE 8
 
+#define FS_POLICY_FLAGS_PAD_4          0x00
+#define FS_POLICY_FLAGS_PAD_8          0x01
+#define FS_POLICY_FLAGS_PAD_16         0x02
+#define FS_POLICY_FLAGS_PAD_32         0x03
+#define FS_POLICY_FLAGS_PAD_MASK       0x03
+#define FS_POLICY_FLAGS_VALID          0x03
+
+/* Encryption algorithms */
+#define FS_ENCRYPTION_MODE_INVALID             0
+#define FS_ENCRYPTION_MODE_AES_256_XTS         1
+#define FS_ENCRYPTION_MODE_AES_256_GCM         2
+#define FS_ENCRYPTION_MODE_AES_256_CBC         3
+#define FS_ENCRYPTION_MODE_AES_256_CTS         4
+
 struct fscrypt_policy {
        __u8 version;
        __u8 contents_encryption_mode;