diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-08 14:40:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-08 14:40:34 -0400 |
| commit | 677375cef8cb7763ef620e007873117b9bad72a0 (patch) | |
| tree | 9bddb2ce01662aee47f9232a1c92b4416105b813 /include/uapi/linux | |
| parent | dd727dad37297f497dc69ac00182abf9651e7b6c (diff) | |
| parent | 6f9d696f016f5b42f6c6e8c9f723f8d3380e5903 (diff) | |
Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt
Pull fscrypt updates from Ted Ts'o:
"Only bug fixes and cleanups for this merge window"
* tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt:
fscrypt: correct collision claim for digested names
MAINTAINERS: fscrypt: update mailing list, patchwork, and git
ext4: clean up ext4_match() and callers
f2fs: switch to using fscrypt_match_name()
ext4: switch to using fscrypt_match_name()
fscrypt: introduce helper function for filename matching
fscrypt: avoid collisions when presenting long encrypted filenames
f2fs: check entire encrypted bigname when finding a dentry
ubifs: check for consistent encryption contexts in ubifs_lookup()
f2fs: sync f2fs_lookup() with ext4_lookup()
ext4: remove "nokey" check from ext4_lookup()
fscrypt: fix context consistency check when key(s) unavailable
fscrypt: Remove __packed from fscrypt_policy
fscrypt: Move key structure and constants to uapi
fscrypt: remove fscrypt_symlink_data_len()
fscrypt: remove unnecessary checks for NULL operations
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/fs.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 048a85e9f017..24e61a54feaa 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
| @@ -279,12 +279,25 @@ struct fscrypt_policy { | |||
| 279 | __u8 filenames_encryption_mode; | 279 | __u8 filenames_encryption_mode; |
| 280 | __u8 flags; | 280 | __u8 flags; |
| 281 | __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; | 281 | __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; |
| 282 | } __packed; | 282 | }; |
| 283 | 283 | ||
| 284 | #define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy) | 284 | #define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy) |
| 285 | #define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) | 285 | #define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) |
| 286 | #define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy) | 286 | #define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy) |
| 287 | 287 | ||
| 288 | /* Parameters for passing an encryption key into the kernel keyring */ | ||
| 289 | #define FS_KEY_DESC_PREFIX "fscrypt:" | ||
| 290 | #define FS_KEY_DESC_PREFIX_SIZE 8 | ||
| 291 | |||
| 292 | /* Structure that userspace passes to the kernel keyring */ | ||
| 293 | #define FS_MAX_KEY_SIZE 64 | ||
| 294 | |||
| 295 | struct fscrypt_key { | ||
| 296 | __u32 mode; | ||
| 297 | __u8 raw[FS_MAX_KEY_SIZE]; | ||
| 298 | __u32 size; | ||
| 299 | }; | ||
| 300 | |||
| 288 | /* | 301 | /* |
| 289 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) | 302 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) |
| 290 | * | 303 | * |
