* [dpdk-stable] [PATCH] crypto/qat: fix aad capabilities for AES-GCM @ 2017-05-12 15:41 Arek Kusztal 2017-05-12 15:41 ` [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create Arek Kusztal 0 siblings, 1 reply; 3+ messages in thread From: Arek Kusztal @ 2017-05-12 15:41 UTC (permalink / raw) To: stable; +Cc: pablo.de.lara.guarch, Arkadiusz Kusztal From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com> Fix aad capabilities for AES-GCM authtentication, aad is changed from range 8-12 to 0-240 Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") [ backported from upstream commit 87516a8f918a4fa59e365983dd82c107c5073d50] Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- drivers/crypto/qat/qat_crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 798cd98..1611bca 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -233,9 +233,9 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { .increment = 4 }, .aad_size = { - .min = 8, - .max = 12, - .increment = 4 + .min = 0, + .max = 240, + .increment = 1 } }, } }, } -- 2.1.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create 2017-05-12 15:41 [dpdk-stable] [PATCH] crypto/qat: fix aad capabilities for AES-GCM Arek Kusztal @ 2017-05-12 15:41 ` Arek Kusztal 0 siblings, 0 replies; 3+ messages in thread From: Arek Kusztal @ 2017-05-12 15:41 UTC (permalink / raw) To: stable; +Cc: pablo.de.lara.guarch, Arkadiusz Kusztal From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com> This patch fixes segementation fault that may occur in case of wrong parameters being provided to the cryptographic session. Unused fields which would cause null dereference are removed. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") [ backported from upstream commit d099195ae7e0a64aaeba6fed290536f403dd5fe0] Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> --- drivers/crypto/qat/qat_crypto.c | 13 ++----------- drivers/crypto/qat/qat_crypto.h | 3 --- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 798cd98..540de59 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -573,11 +573,9 @@ qat_get_cipher_xform(struct rte_crypto_sym_xform *xform) return NULL; } void * -qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev, +qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev __rte_unused, struct rte_crypto_sym_xform *xform, void *session_private) { - struct qat_pmd_private *internals = dev->data->dev_private; - struct qat_session *session = session_private; struct rte_crypto_cipher_xform *cipher_xform = NULL; @@ -674,7 +672,6 @@ qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev, return session; error_out: - rte_mempool_put(internals->sess_mp, session); return NULL; } @@ -683,8 +680,6 @@ void * qat_crypto_sym_configure_session(struct rte_cryptodev *dev, struct rte_crypto_sym_xform *xform, void *session_private) { - struct qat_pmd_private *internals = dev->data->dev_private; - struct qat_session *session = session_private; int qat_cmd_id; @@ -733,17 +728,15 @@ qat_crypto_sym_configure_session(struct rte_cryptodev *dev, return session; error_out: - rte_mempool_put(internals->sess_mp, session); return NULL; } struct qat_session * -qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev, +qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev __rte_unused, struct rte_crypto_sym_xform *xform, struct qat_session *session_private) { - struct qat_pmd_private *internals = dev->data->dev_private; struct qat_session *session = session_private; struct rte_crypto_auth_xform *auth_xform = NULL; struct rte_crypto_cipher_xform *cipher_xform = NULL; @@ -828,8 +821,6 @@ qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev, return session; error_out: - if (internals->sess_mp != NULL) - rte_mempool_put(internals->sess_mp, session); return NULL; } diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h index 0afe74e..a3643b5 100644 --- a/drivers/crypto/qat/qat_crypto.h +++ b/drivers/crypto/qat/qat_crypto.h @@ -72,9 +72,6 @@ struct qat_qp { /** private data structure for each QAT device */ struct qat_pmd_private { - char sess_mp_name[RTE_MEMPOOL_NAMESIZE]; - struct rte_mempool *sess_mp; - unsigned max_nb_queue_pairs; /**< Max number of queue pairs supported by device */ unsigned max_nb_sessions; -- 2.1.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1490783506-18451-1-git-send-email-arkadiuszx.kusztal@intel.com>]
* Re: [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create [not found] <1490783506-18451-1-git-send-email-arkadiuszx.kusztal@intel.com> @ 2017-03-30 22:11 ` De Lara Guarch, Pablo 0 siblings, 0 replies; 3+ messages in thread From: De Lara Guarch, Pablo @ 2017-03-30 22:11 UTC (permalink / raw) To: Kusztal, ArkadiuszX, dev Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K, stable CC'ing stable repo. > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Wednesday, March 29, 2017 11:32 AM > To: dev@dpdk.org > Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K; > Kusztal, ArkadiuszX > Subject: [PATCH] crypto/qat: fix segmentation fault in session create > > This patch fixes segementation fault that may occur in case > of wrong parameters being provided to the cryptographic > session. Unused fields which would cause null dereference > are removed. > > Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") > > This patchset depends on the following patches/patchsets: > > "crypto/qat: adding docsisbpi mode support" > (http://dpdk.org/dev/patchwork/patch/21121/) > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > --- > drivers/crypto/qat/qat_crypto.c | 13 ++----------- > drivers/crypto/qat/qat_crypto.h | 3 --- > 2 files changed, 2 insertions(+), 14 deletions(-) > > diff --git a/drivers/crypto/qat/qat_crypto.c > b/drivers/crypto/qat/qat_crypto.c > index b851926..9310211 100644 > --- a/drivers/crypto/qat/qat_crypto.c > +++ b/drivers/crypto/qat/qat_crypto.c > @@ -739,11 +739,9 @@ qat_get_cipher_xform(struct > rte_crypto_sym_xform *xform) > return NULL; > } > void * > -qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev, > +qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev > __rte_unused, > struct rte_crypto_sym_xform *xform, void > *session_private) > { > - struct qat_pmd_private *internals = dev->data->dev_private; > - > struct qat_session *session = session_private; > > struct rte_crypto_cipher_xform *cipher_xform = NULL; > @@ -884,7 +882,6 @@ qat_crypto_sym_configure_session_cipher(struct > rte_cryptodev *dev, > bpi_cipher_ctx_free(session->bpi_ctx); > session->bpi_ctx = NULL; > } > - rte_mempool_put(internals->sess_mp, session); > return NULL; > } > > @@ -893,8 +890,6 @@ void * > qat_crypto_sym_configure_session(struct rte_cryptodev *dev, > struct rte_crypto_sym_xform *xform, void > *session_private) > { > - struct qat_pmd_private *internals = dev->data->dev_private; > - > struct qat_session *session = session_private; > > int qat_cmd_id; > @@ -943,17 +938,15 @@ qat_crypto_sym_configure_session(struct > rte_cryptodev *dev, > return session; > > error_out: > - rte_mempool_put(internals->sess_mp, session); > return NULL; > } > > struct qat_session * > -qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev, > +qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev > __rte_unused, > struct rte_crypto_sym_xform *xform, > struct qat_session *session_private) > { > > - struct qat_pmd_private *internals = dev->data->dev_private; > struct qat_session *session = session_private; > struct rte_crypto_auth_xform *auth_xform = NULL; > struct rte_crypto_cipher_xform *cipher_xform = NULL; > @@ -1038,8 +1031,6 @@ qat_crypto_sym_configure_session_auth(struct > rte_cryptodev *dev, > return session; > > error_out: > - if (internals->sess_mp != NULL) > - rte_mempool_put(internals->sess_mp, session); > return NULL; > } > > diff --git a/drivers/crypto/qat/qat_crypto.h > b/drivers/crypto/qat/qat_crypto.h > index 78bb2bc..67fa0e1 100644 > --- a/drivers/crypto/qat/qat_crypto.h > +++ b/drivers/crypto/qat/qat_crypto.h > @@ -76,9 +76,6 @@ struct qat_qp { > > /** private data structure for each QAT device */ > struct qat_pmd_private { > - char sess_mp_name[RTE_MEMPOOL_NAMESIZE]; > - struct rte_mempool *sess_mp; > - > unsigned max_nb_queue_pairs; > /**< Max number of queue pairs supported by device */ > unsigned max_nb_sessions; > -- > 2.7.4 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-12 15:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-05-12 15:41 [dpdk-stable] [PATCH] crypto/qat: fix aad capabilities for AES-GCM Arek Kusztal 2017-05-12 15:41 ` [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create Arek Kusztal [not found] <1490783506-18451-1-git-send-email-arkadiuszx.kusztal@intel.com> 2017-03-30 22:11 ` De Lara Guarch, Pablo
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).