From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 44A045A4A; Wed, 27 Mar 2019 11:18:07 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CF68C01089C; Wed, 27 Mar 2019 10:18:06 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AEEA26E64; Wed, 27 Mar 2019 10:18:05 +0000 (UTC) To: Fan Zhang , dev@dpdk.org Cc: stable@dpdk.org References: <20190325143731.6488-1-roy.fan.zhang@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 27 Mar 2019 11:18:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190325143731.6488-1-roy.fan.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 27 Mar 2019 10:18:06 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost/crypto: fix coverity issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 10:18:07 -0000 On 3/25/19 3:37 PM, Fan Zhang wrote: > Fixes: cd1e8f03abf0 ("vhost/crypto: fix packet copy in chaining mode") > > Coverity Issue: 277214 > Coverity Issue: 277220 > Coverity Issue: 277233 > Coverity Issue: 277236 > > Cc: stable@dpdk.org > > Signed-off-by: Fan Zhang > --- > lib/librte_vhost/vhost_crypto.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c > index 9b4b850e8..0edf12d52 100644 > --- a/lib/librte_vhost/vhost_crypto.c > +++ b/lib/librte_vhost/vhost_crypto.c > @@ -1109,7 +1109,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, > > if (unlikely(copy_data(digest_addr, vc_req, &digest_desc, > chain->para.hash_result_len, > - nb_descs, vq_size)) < 0) { > + nb_descs, vq_size) < 0)) { > ret = VIRTIO_CRYPTO_BADMSG; > goto error_exit; > } > @@ -1627,7 +1627,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid, > op->sym->m_src->data_off = 0; > > if (unlikely(vhost_crypto_process_one_req(vcrypto, vq, > - op, head, desc_idx)) < 0) > + op, head, desc_idx) < 0)) > break; > } > > Good catch from Coverity! Reviewed-by: Maxime Coquelin Thanks, Maxime From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8F982A05D3 for ; Wed, 27 Mar 2019 11:18:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A7155B2E; Wed, 27 Mar 2019 11:18:08 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 44A045A4A; Wed, 27 Mar 2019 11:18:07 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CF68C01089C; Wed, 27 Mar 2019 10:18:06 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AEEA26E64; Wed, 27 Mar 2019 10:18:05 +0000 (UTC) To: Fan Zhang , dev@dpdk.org Cc: stable@dpdk.org References: <20190325143731.6488-1-roy.fan.zhang@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 27 Mar 2019 11:18:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190325143731.6488-1-roy.fan.zhang@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 27 Mar 2019 10:18:06 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost/crypto: fix coverity issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190327101801.hbzsuXhom8IxuUlN1LzJYZ9m7z1JR5fREwCZy_JX0FA@z> On 3/25/19 3:37 PM, Fan Zhang wrote: > Fixes: cd1e8f03abf0 ("vhost/crypto: fix packet copy in chaining mode") > > Coverity Issue: 277214 > Coverity Issue: 277220 > Coverity Issue: 277233 > Coverity Issue: 277236 > > Cc: stable@dpdk.org > > Signed-off-by: Fan Zhang > --- > lib/librte_vhost/vhost_crypto.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c > index 9b4b850e8..0edf12d52 100644 > --- a/lib/librte_vhost/vhost_crypto.c > +++ b/lib/librte_vhost/vhost_crypto.c > @@ -1109,7 +1109,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, > > if (unlikely(copy_data(digest_addr, vc_req, &digest_desc, > chain->para.hash_result_len, > - nb_descs, vq_size)) < 0) { > + nb_descs, vq_size) < 0)) { > ret = VIRTIO_CRYPTO_BADMSG; > goto error_exit; > } > @@ -1627,7 +1627,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid, > op->sym->m_src->data_off = 0; > > if (unlikely(vhost_crypto_process_one_req(vcrypto, vq, > - op, head, desc_idx)) < 0) > + op, head, desc_idx) < 0)) > break; > } > > Good catch from Coverity! Reviewed-by: Maxime Coquelin Thanks, Maxime