Skip to content
  • Joe Richey's avatar
    fscrypt: Move key structure and constants to uapi · 9c8268de
    Joe Richey authored
    
    
    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: default avatarJoe Richey <joerichey@google.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    9c8268de