Loading security/pfe/pfk.c +5 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ typedef int (*pfk_parse_inode_type)(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); typedef bool (*pfk_allow_merge_bio_type)(const struct bio *bio1, Loading Loading @@ -294,13 +293,17 @@ static int pfk_get_key_for_bio(const struct bio *bio, which_pfe = pfk_get_pfe_type(inode); s_type = (char *)pfk_kc_get_storage_type(); if (data_unit && (bio_dun(bio) || !memcmp(s_type, "ufs", strlen("ufs")))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; if (which_pfe != INVALID_PFE) { /* Encrypted file; override ->bi_crypt_key */ pr_debug("parsing inode %lu with PFE type %d\n", inode->i_ino, which_pfe); return (*(pfk_parse_inode_ftable[which_pfe])) (bio, inode, key_info, algo_mode, is_pfe, data_unit, (const char *)s_type); (const char *)s_type); } /* Loading security/pfe/pfk_ext4.c +0 −14 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type) { int ret = 0; Loading @@ -157,19 +156,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, */ *is_pfe = true; /* Update dun based upon storage type. * For ext4 FS UFS has 4k dun whereas eMMC * uses 512Byte dun. */ if (storage_type && data_unit) { if (!memcmp(storage_type, "ufs", strlen("ufs"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; else if (!memcmp(storage_type, "sdcc", strlen("sdcc"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_512_B; else return -EINVAL; } if (!pfk_ext4_is_ready()) return -ENODEV; Loading security/pfe/pfk_ext4.h +0 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); bool pfk_ext4_allow_merge_bio(const struct bio *bio1, Loading security/pfe/pfk_f2fs.c +0 −13 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type) { int ret = 0; Loading @@ -132,18 +131,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, */ *is_pfe = true; /* Update the dun based upon storage type. * Right now both UFS and eMMC storage uses 4KB dun * for F2FS */ if (storage_type && data_unit) { if (!memcmp(storage_type, "ufs", strlen("ufs")) || !memcmp(storage_type, "sdcc", strlen("sdcc"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; else return -EINVAL; } if (!pfk_f2fs_is_ready()) return -ENODEV; Loading security/pfe/pfk_f2fs.h +0 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); bool pfk_f2fs_allow_merge_bio(const struct bio *bio1, Loading Loading
security/pfe/pfk.c +5 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ typedef int (*pfk_parse_inode_type)(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); typedef bool (*pfk_allow_merge_bio_type)(const struct bio *bio1, Loading Loading @@ -294,13 +293,17 @@ static int pfk_get_key_for_bio(const struct bio *bio, which_pfe = pfk_get_pfe_type(inode); s_type = (char *)pfk_kc_get_storage_type(); if (data_unit && (bio_dun(bio) || !memcmp(s_type, "ufs", strlen("ufs")))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; if (which_pfe != INVALID_PFE) { /* Encrypted file; override ->bi_crypt_key */ pr_debug("parsing inode %lu with PFE type %d\n", inode->i_ino, which_pfe); return (*(pfk_parse_inode_ftable[which_pfe])) (bio, inode, key_info, algo_mode, is_pfe, data_unit, (const char *)s_type); (const char *)s_type); } /* Loading
security/pfe/pfk_ext4.c +0 −14 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type) { int ret = 0; Loading @@ -157,19 +156,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, */ *is_pfe = true; /* Update dun based upon storage type. * For ext4 FS UFS has 4k dun whereas eMMC * uses 512Byte dun. */ if (storage_type && data_unit) { if (!memcmp(storage_type, "ufs", strlen("ufs"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; else if (!memcmp(storage_type, "sdcc", strlen("sdcc"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_512_B; else return -EINVAL; } if (!pfk_ext4_is_ready()) return -ENODEV; Loading
security/pfe/pfk_ext4.h +0 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ int pfk_ext4_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); bool pfk_ext4_allow_merge_bio(const struct bio *bio1, Loading
security/pfe/pfk_f2fs.c +0 −13 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type) { int ret = 0; Loading @@ -132,18 +131,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, */ *is_pfe = true; /* Update the dun based upon storage type. * Right now both UFS and eMMC storage uses 4KB dun * for F2FS */ if (storage_type && data_unit) { if (!memcmp(storage_type, "ufs", strlen("ufs")) || !memcmp(storage_type, "sdcc", strlen("sdcc"))) *data_unit = 1 << ICE_CRYPTO_DATA_UNIT_4_KB; else return -EINVAL; } if (!pfk_f2fs_is_ready()) return -ENODEV; Loading
security/pfe/pfk_f2fs.h +0 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ int pfk_f2fs_parse_inode(const struct bio *bio, struct pfk_key_info *key_info, enum ice_cryto_algo_mode *algo, bool *is_pfe, unsigned int *data_unit, const char *storage_type); bool pfk_f2fs_allow_merge_bio(const struct bio *bio1, Loading