diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-01-09 18:16:29 -0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@google.com> | 2017-10-03 17:19:14 -0700 |
| commit | 13f002354db13a029aef84aa1a8bfa51bd6b8d56 (patch) | |
| tree | 1edef6487d2b259ce5fb01aa2c0458c633bf2007 /include/uapi/linux | |
| parent | b0fa18e1caa5390619cfb6878b1b63879908ed10 (diff) | |
f2fs: catch up to v4.14-rc1
This is cherry-picked from upstrea-f2fs-stable-linux-4.4.y.
Changes include:
commit c7fd9e2b4a6876 ("f2fs: hurry up to issue discard after io interruption")
commit 603dde39653d6d ("f2fs: fix to show correct discard_granularity in sysfs")
...
commit 565f0225f95f15 ("f2fs: factor out discard command info into discard_cmd_control")
commit c4cc29d19eaf01 ("f2fs: remove batched discard in f2fs_trim_fs")
Change-Id: Icd8a85ac0c19a8aa25cd2591a12b4e9b85bdf1c5
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/fs.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 15048097910f..60d27496c328 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -178,6 +178,23 @@ struct inodes_stat_t { /* 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 +#define FS_ENCRYPTION_MODE_AES_128_CBC 5 +#define FS_ENCRYPTION_MODE_AES_128_CTS 6 + + struct fscrypt_policy { __u8 version; __u8 contents_encryption_mode; @@ -190,6 +207,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) +/* Parameters for passing an encryption key into the kernel keyring */ +#define FS_KEY_DESC_PREFIX "fscrypt:" +#define FS_KEY_DESC_PREFIX_SIZE 8 + +/* Structure that userspace passes to the kernel keyring */ +#define FS_MAX_KEY_SIZE 64 + +struct fscrypt_key { + __u32 mode; + __u8 raw[FS_MAX_KEY_SIZE]; + __u32 size; +}; + /* * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) */ |
