From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DEFDFA0553 for ; Mon, 17 Feb 2020 18:46:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6A101DAA3; Mon, 17 Feb 2020 18:46:18 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 0AED81DABA for ; Mon, 17 Feb 2020 18:46:18 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id w15so20795961wru.4 for ; Mon, 17 Feb 2020 09:46:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RHbxCiNAZCC6AEOpT0GfgGApZ5sr0XWJtU4akHmsbYM=; b=Nz09CbvO1w04GXEoR7s+Kb+P7JybuVUiRHYFzT+mqu+1Azx6lpeQQjbTCNdFq2TSeR HcAOosw0pF24GGx3Pbw/3zigunXZVq35wK2g4Z7r5AoccHB7YD7IOyfvkLmp8+1+RM81 u1xpDygWRLuJNwTVW1FLyxycSXYBWI49bx49yf1pvITLUHgcnys8gr1Iok0zRIWC1Qc1 sjsHW+QwKxA/acp/DyzNKAG54R8361XpuuYoMLa1eKcFKFVPWtcsyCrlT3siFU2gE5vi 9xfzbdpq+6ORDCNxIl8lTpOjYgh3UJJYzT5f13uXhxF8Fh+HG9/8ud6ODxlzNLbw8y/u 7pAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RHbxCiNAZCC6AEOpT0GfgGApZ5sr0XWJtU4akHmsbYM=; b=VyIiNmIsmWreUhX+hY8eEgJZMnG5OjPGauvK4A0dBaIhfP0ZrsVpGben1GQzo6xKrp YUkgZ4qWA55+DBBFZX5W195hUVhbL2orrHTIk2GNR5RqmKu8riJGe5znzI/H7en5BPLC sFYCURZ9FzbkdLaopkK+1w+lNE8n1+PPl/vbZ9VTkHivzmNAB6cQFzITcdSfc/2JevJP faaYIpzxATIc61BL/rdm6wkSdBQEcijX3UNtV8ojy/6/JaPMXc0LgcG+S0MtiuxdGXm/ WCFk1mUWK6PPS8D4AV1xFGDJbYFBL1xZGK7xi3VmlWg59IgOlzodHFwDkPN0Zv9KjuxR Is+Q== X-Gm-Message-State: APjAAAXxRyuv0gcCXyKo9D3UCQJ/EckhGN+4FdBNmeFVtJ0UDKV0zjzj EQ+7jZbvplp2LB2/iBit7V9bRBejqKM= X-Google-Smtp-Source: APXvYqyNBdpOLXf46o6D3PE3IuWCeDlcQr1JiMZnbr0PXM8MP5x6677n/3PPetFSAn/FNJfXflIz/Q== X-Received: by 2002:adf:f692:: with SMTP id v18mr23899166wrp.246.1581961577761; Mon, 17 Feb 2020 09:46:17 -0800 (PST) Received: from localhost (userh634.uk.uudial.com. [194.69.103.7]) by smtp.gmail.com with ESMTPSA id t9sm2060237wrv.63.2020.02.17.09.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:46:17 -0800 (PST) From: luca.boccassi@gmail.com To: Junxiao Shi Cc: dpdk stable Date: Mon, 17 Feb 2020 17:45:09 +0000 Message-Id: <20200217174546.25334-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200217174546.25334-1-luca.boccassi@gmail.com> References: <20200211112216.3929-190-luca.boccassi@gmail.com> <20200217174546.25334-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'drivers/crypto: fix session-less mode' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 042ea295df9722b4d41d8ddc5658863c6c8057fc Mon Sep 17 00:00:00 2001 From: Junxiao Shi Date: Mon, 27 Jan 2020 11:32:11 -0700 Subject: [PATCH] drivers/crypto: fix session-less mode [ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ] When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode for symmetric crypto operation (e.g. SHA256 hash), the driver prints error message: CRYPTODEV: set_sym_session_private_data() line 489: Set private data for driver 0 not allowed Then, AESNI-MB driver segfaults in post_process_mb_job(). Bugzilla ID: 377 Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions") Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros") Signed-off-by: Junxiao Shi --- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++-- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 97d9f81766..33f4167452 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -729,10 +729,10 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op) op->sym->session, cryptodev_driver_id); } else { - void *_sess = NULL; + void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp); void *_sess_private_data = NULL; - if (rte_mempool_get(qp->sess_mp, (void **)&_sess)) + if (_sess == NULL) return NULL; if (rte_mempool_get(qp->sess_mp_priv, diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 91f028308c..199097bf8c 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -762,10 +762,10 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op) return NULL; /* provide internal session */ - void *_sess = NULL; + void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp); void *_sess_private_data = NULL; - if (rte_mempool_get(qp->sess_mp, (void **)&_sess)) + if (_sess == NULL) return NULL; if (rte_mempool_get(qp->sess_mp_priv, -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-17 17:00:15.798058152 +0000 +++ 0017-drivers-crypto-fix-session-less-mode.patch 2020-02-17 17:00:15.287950172 +0000 @@ -1,8 +1,10 @@ -From a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 Mon Sep 17 00:00:00 2001 +From 042ea295df9722b4d41d8ddc5658863c6c8057fc Mon Sep 17 00:00:00 2001 From: Junxiao Shi Date: Mon, 27 Jan 2020 11:32:11 -0700 Subject: [PATCH] drivers/crypto: fix session-less mode +[ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ] + When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode for symmetric crypto operation (e.g. SHA256 hash), the driver prints error message: @@ -15,7 +17,6 @@ Bugzilla ID: 377 Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions") Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros") -Cc: stable@dpdk.org Signed-off-by: Junxiao Shi ---