diff options
author | Theodore Ts'o <tytso@mit.edu> | 2016-11-26 22:18:59 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-12-11 16:26:10 -0500 |
commit | 41d5319af3368127b55f6587f1c747dd6a7b9b04 (patch) | |
tree | 257632be4894f6d505ac676b466a4fd4adf0a1a7 | |
parent | cc4e0df038ddb73510c01712abf302b3f0130147 (diff) |
fscrypt: move the policy flags and encryption mode definitions to uapi header
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>
-rw-r--r-- | include/linux/fscrypto.h | 14 | ||||
-rw-r--r-- | include/uapi/linux/fs.h | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h index 71e8a20711ec..42ef82d60790 100644 --- a/include/linux/fscrypto.h +++ b/include/linux/fscrypto.h | |||
@@ -18,20 +18,6 @@ | |||
18 | #include <crypto/skcipher.h> | 18 | #include <crypto/skcipher.h> |
19 | #include <uapi/linux/fs.h> | 19 | #include <uapi/linux/fs.h> |
20 | 20 | ||
21 | #define FS_POLICY_FLAGS_PAD_4 0x00 | ||
22 | #define FS_POLICY_FLAGS_PAD_8 0x01 | ||
23 | #define FS_POLICY_FLAGS_PAD_16 0x02 | ||
24 | #define FS_POLICY_FLAGS_PAD_32 0x03 | ||
25 | #define FS_POLICY_FLAGS_PAD_MASK 0x03 | ||
26 | #define FS_POLICY_FLAGS_VALID 0x03 | ||
27 | |||
28 | /* Encryption algorithms */ | ||
29 | #define FS_ENCRYPTION_MODE_INVALID 0 | ||
30 | #define FS_ENCRYPTION_MODE_AES_256_XTS 1 | ||
31 | #define FS_ENCRYPTION_MODE_AES_256_GCM 2 | ||
32 | #define FS_ENCRYPTION_MODE_AES_256_CBC 3 | ||
33 | #define FS_ENCRYPTION_MODE_AES_256_CTS 4 | ||
34 | |||
35 | #define FS_CRYPTO_BLOCK_SIZE 16 | 21 | #define FS_CRYPTO_BLOCK_SIZE 16 |
36 | 22 | ||
37 | struct fscrypt_info; | 23 | struct fscrypt_info; |
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index acb2b6152ba0..0496d37abe28 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
@@ -254,6 +254,20 @@ struct fsxattr { | |||
254 | /* Policy provided via an ioctl on the topmost directory */ | 254 | /* Policy provided via an ioctl on the topmost directory */ |
255 | #define FS_KEY_DESCRIPTOR_SIZE 8 | 255 | #define FS_KEY_DESCRIPTOR_SIZE 8 |
256 | 256 | ||
257 | #define FS_POLICY_FLAGS_PAD_4 0x00 | ||
258 | #define FS_POLICY_FLAGS_PAD_8 0x01 | ||
259 | #define FS_POLICY_FLAGS_PAD_16 0x02 | ||
260 | #define FS_POLICY_FLAGS_PAD_32 0x03 | ||
261 | #define FS_POLICY_FLAGS_PAD_MASK 0x03 | ||
262 | #define FS_POLICY_FLAGS_VALID 0x03 | ||
263 | |||
264 | /* Encryption algorithms */ | ||
265 | #define FS_ENCRYPTION_MODE_INVALID 0 | ||
266 | #define FS_ENCRYPTION_MODE_AES_256_XTS 1 | ||
267 | #define FS_ENCRYPTION_MODE_AES_256_GCM 2 | ||
268 | #define FS_ENCRYPTION_MODE_AES_256_CBC 3 | ||
269 | #define FS_ENCRYPTION_MODE_AES_256_CTS 4 | ||
270 | |||
257 | struct fscrypt_policy { | 271 | struct fscrypt_policy { |
258 | __u8 version; | 272 | __u8 version; |
259 | __u8 contents_encryption_mode; | 273 | __u8 contents_encryption_mode; |