From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 831411C01 for ; Mon, 30 Apr 2018 16:44:22 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id j5so14675055wme.5 for ; Mon, 30 Apr 2018 07:44:22 -0700 (PDT) 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; bh=BBRIhZ63DofNx/N1NMyIt75pXsBaZYs6PZlDOBwyTl0=; b=mAB5uoieTm8OQptW0ap5h5k4K29Ko15iX+3qRhMNw1LSSTh65hwFhpSm+16M69MF32 nuUr3U8jp+uTlgm3ya8ELlBuKOFMxmZuqa7YbDEUODy3gsiUvYjTCaUoNen1JltRnWdF YS/XnMP+faaJvKsVEKXAL3FhhHP335Yno+RALF0yngyYCmgAxpptgtNG1jKXlFRbidJh juvRol3WxlCjvxroo8Mk1CyQK/85rEVKl9qxqwwQU/it7PkPP9UjqY0ajZmK91WnFiUh 3KUka8ysvRBqTPgBu04fCID+iRfESclmhXQJ4zycfKy+FW8dwBDsDYZ3OjbuZJLCF5hc X78A== 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; bh=BBRIhZ63DofNx/N1NMyIt75pXsBaZYs6PZlDOBwyTl0=; b=PEdraJOErcfdMBOOy68PHAW9BGwnFIGQu2kzZX58PsR1isZSs1NX5lM8z7SOPGXUDs MgwVZ14d9MTCmTj+f+DOZ0ayR7644sKF6hKdxSOgIXxUnySZxBUvyjS06IGgeZ7eTJyO 5PBgbXlrRw3sRZo9MPfAMhIueoQBoA3bIN1XuYkDcK+PmQ70d5DbOd4e8ba13lqpsmYA VbyZA/Ol2Y4UFDnkkS0PO+XQoavCOxPHwJfSQUrwM9p2XVV3UL7rjHn73PubJn37lZjE 4aYZqqM82hREB8qWYgX8zer0nfK0HvJlVa1IP/uSWOFMkh7KuQcpuvWQRIcDG2OTgy6T 7EWw== X-Gm-Message-State: ALQs6tByRmV5sO/wg3OgZR0fjB7cGQpyKm5NLTSnLhxmbuJiP0HRXv5A otD3ScnBspK/xGAlu0XK/z2qP6KNe0Y= X-Google-Smtp-Source: AB8JxZrEwnOCIKN0FLBAkYc/GtAG905VKorbQDcG9UUGuYYVRR2RigPgutaAHW/b5EwP3mbFtXKEPw== X-Received: by 10.28.229.74 with SMTP id c71mr7146984wmh.55.1525099462246; Mon, 30 Apr 2018 07:44:22 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id k89sm7565394wmc.15.2018.04.30.07.44.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:44:21 -0700 (PDT) From: luca.boccassi@gmail.com To: Sunil Kumar Kori Cc: Akhil Goyal , dpdk stable Date: Mon, 30 Apr 2018 15:41:28 +0100 Message-Id: <20180430144223.18657-73-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'crypto/dpaa_sec: improve the error checking' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Mon, 30 Apr 2018 14:44:22 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From f3790c3be9824fac12d7f181368244653721a26e Mon Sep 17 00:00:00 2001 From: Sunil Kumar Kori Date: Thu, 5 Apr 2018 14:05:48 +0530 Subject: [PATCH] crypto/dpaa_sec: improve the error checking [ upstream commit 22788c2c6a23d9c6bd6b9766065f0f3c2d203fb1 ] Reported by NXP's internal coverity Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform") Signed-off-by: Sunil Kumar Kori Acked-by: Akhil Goyal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index c9bdd5640..c979c9ca6 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -388,7 +388,7 @@ static int dpaa_sec_prep_cdb(dpaa_sec_session *ses) { struct alginfo alginfo_c = {0}, alginfo_a = {0}, alginfo = {0}; - uint32_t shared_desc_len = 0; + int32_t shared_desc_len = 0; struct sec_cdb *cdb = &ses->cdb; int err; #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN @@ -530,6 +530,12 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) ses->digest_length, ses->dir); } } + + if (shared_desc_len < 0) { + PMD_TX_LOG(ERR, "error in preparing command block\n"); + return shared_desc_len; + } + cdb->sh_hdr.hi.field.idlen = shared_desc_len; cdb->sh_hdr.hi.word = rte_cpu_to_be_32(cdb->sh_hdr.hi.word); cdb->sh_hdr.lo.word = rte_cpu_to_be_32(cdb->sh_hdr.lo.word); -- 2.14.2