Loading fs/incfs/vfs.c +7 −5 Original line number Diff line number Diff line Loading @@ -866,9 +866,10 @@ static struct signature_info *incfs_copy_signature_info_from_user( goto err; } // TODO this sets the root_hash length to MAX_HASH_SIZE not // the actual size. Fix, then set INCFS_MAX_HASH_SIZE back // to 64 /* TODO this sets the root_hash length to MAX_HASH_SIZE not * the actual size. Fix, then set INCFS_MAX_HASH_SIZE back * to 64 */ result->root_hash = range(p, INCFS_MAX_HASH_SIZE); if (copy_from_user(p, u64_to_user_ptr(usr_si.root_hash), result->root_hash.len) > 0) { Loading Loading @@ -1003,8 +1004,9 @@ static int init_new_file(struct mount_info *mi, struct dentry *dentry, goto out; } // TODO This code seems wrong when len is zero - we // should error out?? /* TODO This code seems wrong when len is zero - we * should error out?? */ if (si->signature.len > 0) error = incfs_validate_pkcs7_signature( si->signature, Loading include/uapi/linux/incrementalfs.h +3 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,9 @@ #define INCFS_DATA_FILE_BLOCK_SIZE 4096 #define INCFS_HEADER_VER 1 // TODO: This value is assumed in incfs_copy_signature_info_from_user to be the // actual signature length. Set back to 64 when fixed. /* TODO: This value is assumed in incfs_copy_signature_info_from_user to be the * actual signature length. Set back to 64 when fixed. */ #define INCFS_MAX_HASH_SIZE 32 #define INCFS_MAX_FILE_ATTR_SIZE 512 Loading Loading
fs/incfs/vfs.c +7 −5 Original line number Diff line number Diff line Loading @@ -866,9 +866,10 @@ static struct signature_info *incfs_copy_signature_info_from_user( goto err; } // TODO this sets the root_hash length to MAX_HASH_SIZE not // the actual size. Fix, then set INCFS_MAX_HASH_SIZE back // to 64 /* TODO this sets the root_hash length to MAX_HASH_SIZE not * the actual size. Fix, then set INCFS_MAX_HASH_SIZE back * to 64 */ result->root_hash = range(p, INCFS_MAX_HASH_SIZE); if (copy_from_user(p, u64_to_user_ptr(usr_si.root_hash), result->root_hash.len) > 0) { Loading Loading @@ -1003,8 +1004,9 @@ static int init_new_file(struct mount_info *mi, struct dentry *dentry, goto out; } // TODO This code seems wrong when len is zero - we // should error out?? /* TODO This code seems wrong when len is zero - we * should error out?? */ if (si->signature.len > 0) error = incfs_validate_pkcs7_signature( si->signature, Loading
include/uapi/linux/incrementalfs.h +3 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,9 @@ #define INCFS_DATA_FILE_BLOCK_SIZE 4096 #define INCFS_HEADER_VER 1 // TODO: This value is assumed in incfs_copy_signature_info_from_user to be the // actual signature length. Set back to 64 when fixed. /* TODO: This value is assumed in incfs_copy_signature_info_from_user to be the * actual signature length. Set back to 64 when fixed. */ #define INCFS_MAX_HASH_SIZE 32 #define INCFS_MAX_FILE_ATTR_SIZE 512 Loading