]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fscrypt: Move key structure and constants to uapi
authorJoe Richey <joerichey@google.com>
Thu, 6 Apr 2017 23:14:05 +0000 (16:14 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 30 Apr 2017 05:26:34 +0000 (01:26 -0400)
commit9c8268def6127a9d9888b822a74becb80dfeab6f
tree5fd97eff49f60f3e4485b4082eb0c6baee6ec2a9
parent4bfd036221c0bf75a0f475b05e22f7be9abc3101
fscrypt: Move key structure and constants to uapi

This commit exposes the necessary constants and structures for a
userspace program to pass filesystem encryption keys into the keyring.
The fscrypt_key structure was already part of the kernel ABI, this
change just makes it so programs no longer have to redeclare these
structures (like e4crypt in e2fsprogs currently does).

Note that we do not expose the other FS_*_KEY_SIZE constants as they are
not necessary. Only XTS is supported for contents_encryption_mode, so
currently FS_MAX_KEY_SIZE bytes of key material must always be passed to
the kernel.

This commit also removes __packed from fscrypt_key as it does not
contain any implicit padding and does not refer to an on-disk structure.

Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/fscrypt_private.h
include/uapi/linux/fs.h