* [dpdk-stable] [PATCH 1/3] crypto/qat: handle error msg of block size properly [not found] <20181212195904.8160-1-arkadiuszx.kusztal@intel.com> @ 2018-12-12 19:59 ` Arek Kusztal 2018-12-17 12:12 ` [dpdk-stable] [dpdk-dev] " Kovacevic, Marko 2018-12-12 19:59 ` [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter Arek Kusztal 2018-12-12 19:59 ` [dpdk-stable] [PATCH 3/3] crypto/qat: fix message for NULL algo " Arek Kusztal 2 siblings, 1 reply; 7+ messages in thread From: Arek Kusztal @ 2018-12-12 19:59 UTC (permalink / raw) To: akhil.goyal; +Cc: dev, fiona.trahe, Arek Kusztal, stable Error code of qat_hash_get_block_size needs to be handle properly. Fixes: 10b49880e3c5 ("crypto/qat: make the session struct variable in size") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> --- drivers/crypto/qat/qat_sym_session.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 8196e23..272177f 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1143,8 +1143,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, } block_size = qat_hash_get_block_size(hash_alg); - if (block_size <= 0) - return -EFAULT; + if (block_size < 0) + return block_size; /* init ipad and opad from key and xor with fixed values */ memset(ipad, 0, block_size); memset(opad, 0, block_size); @@ -1490,9 +1490,13 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC ) hash->auth_counter.counter = 0; - else - hash->auth_counter.counter = rte_bswap32( - qat_hash_get_block_size(cdesc->qat_hash_alg)); + else { + int block_size = qat_hash_get_block_size(cdesc->qat_hash_alg); + + if (block_size < 0) + return block_size; + hash->auth_counter.counter = rte_bswap32(block_size); + } cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_auth_setup); -- 2.1.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/3] crypto/qat: handle error msg of block size properly 2018-12-12 19:59 ` [dpdk-stable] [PATCH 1/3] crypto/qat: handle error msg of block size properly Arek Kusztal @ 2018-12-17 12:12 ` Kovacevic, Marko 0 siblings, 0 replies; 7+ messages in thread From: Kovacevic, Marko @ 2018-12-17 12:12 UTC (permalink / raw) To: Kusztal, ArkadiuszX, akhil.goyal Cc: dev, Trahe, Fiona, Kusztal, ArkadiuszX, stable Tested-by: Marko Kovacevic <marko.kovacevic@intel.com> Acked-by: Marko Kovacevic <marko.kovacevic@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter [not found] <20181212195904.8160-1-arkadiuszx.kusztal@intel.com> 2018-12-12 19:59 ` [dpdk-stable] [PATCH 1/3] crypto/qat: handle error msg of block size properly Arek Kusztal @ 2018-12-12 19:59 ` Arek Kusztal 2018-12-14 14:23 ` [dpdk-stable] [dpdk-dev] " Akhil Goyal 2018-12-17 12:16 ` Kovacevic, Marko 2018-12-12 19:59 ` [dpdk-stable] [PATCH 3/3] crypto/qat: fix message for NULL algo " Arek Kusztal 2 siblings, 2 replies; 7+ messages in thread From: Arek Kusztal @ 2018-12-12 19:59 UTC (permalink / raw) To: akhil.goyal; +Cc: dev, fiona.trahe, Arek Kusztal, stable AES-CCM algo does not to set counter flag so it should be zeroed. Fixes: ab56c4d9ed9a ("crypto/qat: support AES-CCM") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> --- drivers/crypto/qat/qat_sym_session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 272177f..d8cc702 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1488,6 +1488,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_KASUMI_F9 || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC + || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC ) hash->auth_counter.counter = 0; else { -- 2.1.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter 2018-12-12 19:59 ` [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter Arek Kusztal @ 2018-12-14 14:23 ` Akhil Goyal 2018-12-14 14:39 ` Kusztal, ArkadiuszX 2018-12-17 12:16 ` Kovacevic, Marko 1 sibling, 1 reply; 7+ messages in thread From: Akhil Goyal @ 2018-12-14 14:23 UTC (permalink / raw) To: Arek Kusztal; +Cc: dev, fiona.trahe, stable On 12/13/2018 1:29 AM, Arek Kusztal wrote: > AES-CCM algo does not to set counter flag so it should be zeroed. > > Fixes: ab56c4d9ed9a ("crypto/qat: support AES-CCM") > Cc: stable@dpdk.org > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > --- > drivers/crypto/qat/qat_sym_session.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c > index 272177f..d8cc702 100644 > --- a/drivers/crypto/qat/qat_sym_session.c > +++ b/drivers/crypto/qat/qat_sym_session.c > @@ -1488,6 +1488,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, > || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_KASUMI_F9 > || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 > || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC > + || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC > ) > hash->auth_counter.counter = 0; > else { title and code change do not match. AES-CCM or AES-CBC?? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter 2018-12-14 14:23 ` [dpdk-stable] [dpdk-dev] " Akhil Goyal @ 2018-12-14 14:39 ` Kusztal, ArkadiuszX 0 siblings, 0 replies; 7+ messages in thread From: Kusztal, ArkadiuszX @ 2018-12-14 14:39 UTC (permalink / raw) To: Akhil Goyal; +Cc: dev, Trahe, Fiona, stable Hi Akhil, > -----Original Message----- > From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Friday, December 14, 2018 3:23 PM > To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com> > Cc: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 2/3] crypto/qat: fix message for CCM when > setting unused counter > > > > On 12/13/2018 1:29 AM, Arek Kusztal wrote: > > AES-CCM algo does not to set counter flag so it should be zeroed. > > > > Fixes: ab56c4d9ed9a ("crypto/qat: support AES-CCM") > > Cc: stable@dpdk.org > > > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > > --- > > drivers/crypto/qat/qat_sym_session.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/crypto/qat/qat_sym_session.c > b/drivers/crypto/qat/qat_sym_session.c > > index 272177f..d8cc702 100644 > > --- a/drivers/crypto/qat/qat_sym_session.c > > +++ b/drivers/crypto/qat/qat_sym_session.c > > @@ -1488,6 +1488,7 @@ int > qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, > > || cdesc->qat_hash_alg == > ICP_QAT_HW_AUTH_ALGO_KASUMI_F9 > > || cdesc->qat_hash_alg == > ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 > > || cdesc->qat_hash_alg == > ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC > > + || cdesc->qat_hash_alg == > ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC > > ) > > hash->auth_counter.counter = 0; > > else { > title and code change do not match. > AES-CCM or AES-CBC?? CCM is AEAD mode where Counter for cipher and CBC-MAC for hash is used. Hence CBC-MAC for hash. Ref. RFC 3610, SP800-38C. Thanks, Arek ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter 2018-12-12 19:59 ` [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter Arek Kusztal 2018-12-14 14:23 ` [dpdk-stable] [dpdk-dev] " Akhil Goyal @ 2018-12-17 12:16 ` Kovacevic, Marko 1 sibling, 0 replies; 7+ messages in thread From: Kovacevic, Marko @ 2018-12-17 12:16 UTC (permalink / raw) To: Kusztal, ArkadiuszX, akhil.goyal Cc: dev, Trahe, Fiona, Kusztal, ArkadiuszX, stable Tested-by: Marko Kovacevic <marko.kovacevic@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-stable] [PATCH 3/3] crypto/qat: fix message for NULL algo setting unused counter [not found] <20181212195904.8160-1-arkadiuszx.kusztal@intel.com> 2018-12-12 19:59 ` [dpdk-stable] [PATCH 1/3] crypto/qat: handle error msg of block size properly Arek Kusztal 2018-12-12 19:59 ` [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter Arek Kusztal @ 2018-12-12 19:59 ` Arek Kusztal 2 siblings, 0 replies; 7+ messages in thread From: Arek Kusztal @ 2018-12-12 19:59 UTC (permalink / raw) To: akhil.goyal; +Cc: dev, fiona.trahe, Arek Kusztal, stable NULL algo algo does not to set counter flag so it should be zeroed. Fixes: db0e952a5c01 ("crypto/qat: add NULL capability") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> --- drivers/crypto/qat/qat_sym_session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index d8cc702..4d7ec01 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1489,6 +1489,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3 || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC + || cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL ) hash->auth_counter.counter = 0; else { -- 2.1.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-17 12:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20181212195904.8160-1-arkadiuszx.kusztal@intel.com> 2018-12-12 19:59 ` [dpdk-stable] [PATCH 1/3] crypto/qat: handle error msg of block size properly Arek Kusztal 2018-12-17 12:12 ` [dpdk-stable] [dpdk-dev] " Kovacevic, Marko 2018-12-12 19:59 ` [dpdk-stable] [PATCH 2/3] crypto/qat: fix message for CCM when setting unused counter Arek Kusztal 2018-12-14 14:23 ` [dpdk-stable] [dpdk-dev] " Akhil Goyal 2018-12-14 14:39 ` Kusztal, ArkadiuszX 2018-12-17 12:16 ` Kovacevic, Marko 2018-12-12 19:59 ` [dpdk-stable] [PATCH 3/3] crypto/qat: fix message for NULL algo " Arek Kusztal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).