Skip to content

Commit bd2c6e0

Browse files
jxu75herbertx
authored andcommitted
crypto: qat - remove unused members in suof structure
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 <[email protected]> Reviewed-by: Ahsan Atta <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent ce33135 commit bd2c6e0

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

drivers/crypto/intel/qat/qat_common/icp_qat_uclo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,6 @@ struct icp_qat_suof_img_hdr {
404404
char *simg_buf;
405405
unsigned long simg_len;
406406
char *css_header;
407-
char *css_key;
408-
char *css_signature;
409407
char *css_simg;
410408
unsigned long simg_size;
411409
unsigned int ae_num;

drivers/crypto/intel/qat/qat_common/qat_uclo.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
10641064
struct icp_qat_suof_chunk_hdr *suof_chunk_hdr)
10651065
{
10661066
struct icp_qat_suof_handle *suof_handle = handle->sobj_handle;
1067+
unsigned int offset = ICP_QAT_AE_IMG_OFFSET(handle);
10671068
struct icp_qat_simg_ae_mode *ae_mode;
10681069
struct icp_qat_suof_objhdr *suof_objhdr;
10691070

@@ -1075,13 +1076,7 @@ static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle,
10751076
suof_chunk_hdr->offset))->img_length;
10761077

10771078
suof_img_hdr->css_header = suof_img_hdr->simg_buf;
1078-
suof_img_hdr->css_key = (suof_img_hdr->css_header +
1079-
sizeof(struct icp_qat_css_hdr));
1080-
suof_img_hdr->css_signature = suof_img_hdr->css_key +
1081-
ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) +
1082-
ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle);
1083-
suof_img_hdr->css_simg = suof_img_hdr->css_signature +
1084-
ICP_QAT_CSS_SIGNATURE_LEN(handle);
1079+
suof_img_hdr->css_simg = suof_img_hdr->css_header + offset;
10851080

10861081
ae_mode = (struct icp_qat_simg_ae_mode *)(suof_img_hdr->css_simg);
10871082
suof_img_hdr->ae_mask = ae_mode->ae_mask;

0 commit comments

Comments
 (0)