]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: qat - remove unused members in suof structure
authorJack Xu <jack.xu@intel.com>
Fri, 14 Mar 2025 12:57:52 +0000 (12:57 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Mar 2025 09:33:39 +0000 (17:33 +0800)
Remove the members `css_key` and `css_signature` which are not used for
doing the firmware authentication.

The signed image pointer can be calculated using the pointer to the CSS
header and the length of the CSS header, making these members redundant.

Signed-off-by: Jack Xu <jack.xu@intel.com>
Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/icp_qat_uclo.h
drivers/crypto/intel/qat/qat_common/qat_uclo.c

index e28241bdd0f4efe045bfa8f326af71f68f383239..4b5e7dcd11d1e8f4b473c8a9a7afb5b70ccdb5d1 100644 (file)
@@ -404,8 +404,6 @@ struct icp_qat_suof_img_hdr {
        char          *simg_buf;
        unsigned long simg_len;
        char          *css_header;
-       char          *css_key;
-       char          *css_signature;
        char          *css_simg;
        unsigned long simg_size;
        unsigned int  ae_num;
index 7ea40b4f6e5b4fb8b31c074202dc057ca380b45e..5ace036addeca8689d8eeab63eca9d51dd914cac 100644 (file)
@@ -1064,6 +1064,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
                              struct icp_qat_suof_chunk_hdr *suof_chunk_hdr)
 {
        struct icp_qat_suof_handle *suof_handle = handle->sobj_handle;
+       unsigned int offset = ICP_QAT_AE_IMG_OFFSET(handle);
        struct icp_qat_simg_ae_mode *ae_mode;
        struct icp_qat_suof_objhdr *suof_objhdr;
 
@@ -1075,13 +1076,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
                                   suof_chunk_hdr->offset))->img_length;
 
        suof_img_hdr->css_header = suof_img_hdr->simg_buf;
-       suof_img_hdr->css_key = (suof_img_hdr->css_header +
-                                sizeof(struct icp_qat_css_hdr));
-       suof_img_hdr->css_signature = suof_img_hdr->css_key +
-                                     ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) +
-                                     ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle);
-       suof_img_hdr->css_simg = suof_img_hdr->css_signature +
-                                ICP_QAT_CSS_SIGNATURE_LEN(handle);
+       suof_img_hdr->css_simg = suof_img_hdr->css_header + offset;
 
        ae_mode = (struct icp_qat_simg_ae_mode *)(suof_img_hdr->css_simg);
        suof_img_hdr->ae_mask = ae_mode->ae_mask;