From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 244D6AAF3 for ; Fri, 27 Apr 2018 19:38:16 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BEF3120E1D; Fri, 27 Apr 2018 13:38:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Apr 2018 13:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=U8uNgBjCk7yK8T569QIKY9kVyc x6kWsE2H5BDW+75TA=; b=WgWoVhf6di8VtUwantITRQ+weqC5Fh44uOR4HyZGkG tVFVYlV7/f5pggffYPjTlvYU96+NlftOpXC9do4wBzLpHNm9H4aFg/9sGgaL6Pzv iWBIFNHdbn/+wH0FnPRa3qNjy9P3TJW996hWv+Fl32rBnZqTLJxOzy/WXfa3on6V 8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=U8uNgB jCk7yK8T569QIKY9kVycx6kWsE2H5BDW+75TA=; b=Ge3UighMBuSqHg8xvB22Q+ 7qotx6VGWKSsBZrT9GKo3x3lFOJklJ2232vfdLKl2BXQs2+VGTxQU5h4VIflcGSL xKDOF8IsQaDyyNaFP77PIAX7/NR6zdd36mBGiDFUXO0Jg/uVcM0CmXLKV5ZEbDip 9SCYs/A4GfWZSJ2yvfyyMpScZi4vbYBEjStY/aJELL3lvnRSnorY+Vc0ES+1hBWX iW+BRueo4eAhrNhsySGuI2p5JGp2J9gjZsgpNxutmA4FbgKdpAa47AfPpPFupy8l STFjCajGfEJZLTFDsx83EuNIoKudLNOKzLZe5lx75HwxVwpaw9ngZ9m9W5eg4m6g == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C2D1E4122; Fri, 27 Apr 2018 13:38:15 -0400 (EDT) From: Thomas Monjalon To: Fan Zhang Cc: dev@dpdk.org, Maxime Coquelin , ferruh.yigit@intel.com Date: Fri, 27 Apr 2018 19:38:13 +0200 Message-ID: <3355640.sTbJTRXtYB@xps> In-Reply-To: References: <20180427135233.56019-1-roy.fan.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] vhost/crypto: fix missing head correction 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: Fri, 27 Apr 2018 17:38:16 -0000 27/04/2018 16:19, Maxime Coquelin: > Hi Fan, > > On 04/27/2018 03:52 PM, Fan Zhang wrote: > > Fixes: 473387aaae4a ("vhost/crypto: move to safe GPA translation API") > > > > This patch fixes the missing head descriptor correction for > > indirect descriptors. > > > > Signed-off-by: Fan Zhang > > --- > > lib/librte_vhost/vhost_crypto.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c > > index c38eb3bb5..81fab7e94 100644 > > --- a/lib/librte_vhost/vhost_crypto.c > > +++ b/lib/librte_vhost/vhost_crypto.c > > @@ -919,6 +919,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto, > > if (unlikely(!desc || dlen != head->len)) > > return -1; > > desc_idx = 0; > > + head = desc; > > Thanks for fixing this, and sorry for having introduced the regression. > > BTW, my patch is half-complete. Indeed, it ensures no out-of-bound > accesses will be done, but it does not handle legit buffers that are > contiguous in guest physical address space, but discontiguous in the > host VA space. Such case can for example happen when having buffers > larger than the huge page size. > > I have implemented the handling of such buffers in virtio-net.c, for > example: > > fb3815cc6 vhost: handle virtually non-contiguous buffers in Rx-mrg > 6727f5a73 vhost: handle virtually non-contiguous buffers in Rx > 91b7b4080 vhost: handle virtually non-contiguous buffers in Tx > d0c24508e vhost: add support for non-contiguous indirect descs tables > > Can you try to work on such handling for next -rc release? > > > For this patch: > Reviewed-by: Maxime Coquelin Applied as hot patch for RC1, thanks