From: Longfang Liu liulongfang@huawei.com
Before calling this function, it is guaranteed that the tag is not empty.
In addition, some alarm issues in hpre have been modified.
Signed-off-by: Longfang Liu liulongfang@huawei.com --- v1/drv/hisi_hpre_udrv.c | 4 ++-- v1/drv/hisi_sec_udrv.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/v1/drv/hisi_hpre_udrv.c b/v1/drv/hisi_hpre_udrv.c index de614f2..eaee4b1 100644 --- a/v1/drv/hisi_hpre_udrv.c +++ b/v1/drv/hisi_hpre_udrv.c @@ -212,13 +212,13 @@ static int qm_fill_rsa_pubkey(struct wcrypto_rsa_pubkey *pubkey, void **data) wd_e->bsize, wd_e->dsize, "rsa pubkey e"); if (unlikely(ret)) return ret; - wd_e->dsize = wd_e->dsize; + wd_e->dsize = wd_e->bsize;
ret = qm_crypto_bin_to_hpre_bin(wd_n->data, (const char *)wd_n->data, wd_n->bsize, wd_n->dsize, "rsa pubkey n"); if (unlikely(ret)) return ret; - wd_n->dsize = wd_n->dsize; + wd_n->dsize = wd_n->bsize;
*data = wd_e->data; return (int)(wd_n->bsize + wd_e->bsize); diff --git a/v1/drv/hisi_sec_udrv.c b/v1/drv/hisi_sec_udrv.c index d046327..c0bd73d 100644 --- a/v1/drv/hisi_sec_udrv.c +++ b/v1/drv/hisi_sec_udrv.c @@ -759,8 +759,7 @@ static int fill_cipher_bd2(struct wd_queue *q, struct hisi_sec_sqe *sqe, return ret; }
- if (tag) - sqe->type2.tag = tag->wcrypto_tag.ctx_id; + sqe->type2.tag = tag->wcrypto_tag.ctx_id;
return ret; }