From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxOib-000791-Pj for qemu-devel@nongnu.org; Thu, 20 Oct 2016 21:33:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxOiX-0002Tx-TL for qemu-devel@nongnu.org; Thu, 20 Oct 2016 21:33:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45022) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxOiX-0002SN-Nv for qemu-devel@nongnu.org; Thu, 20 Oct 2016 21:33:53 -0400 References: <1476263455-24839-1-git-send-email-ppandit@redhat.com> <20161012095259.GA1847@nanopsycho> From: Jason Wang Message-ID: <5bf51b79-b37f-98f5-dda3-25f9881f2f9e@redhat.com> Date: Fri, 21 Oct 2016 09:33:46 +0800 MIME-Version: 1.0 In-Reply-To: <20161012095259.GA1847@nanopsycho> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] net: rocker: set limit to DMA buffer size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jiri Pirko , P J P Cc: Qemu Developers , Huawei PSIRT , Prasad J Pandit On 2016=E5=B9=B410=E6=9C=8812=E6=97=A5 17:52, Jiri Pirko wrote: > Wed, Oct 12, 2016 at 11:10:55AM CEST, ppandit@redhat.com wrote: >> From: Prasad J Pandit >> >> Rocker network switch emulator has test registers to help debug >> DMA operations. While testing host DMA access, a buffer address >> is written to register 'TEST_DMA_ADDR' and its size is written to >> register 'TEST_DMA_SIZE'. When performing TEST_DMA_CTRL_INVERT >> test, if DMA buffer size was greater than 'INT_MAX', it leads to >> an invalid buffer access. Limit the DMA buffer size to avoid it. >> >> Reported-by: Huawei PSIRT >> Signed-off-by: Prasad J Pandit > Reviewed-by: Jiri Pirko Applied, thanks.