From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJzP0-0006vC-3t for qemu-devel@nongnu.org; Fri, 15 Jan 2016 03:06:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJzOz-0001Y5-88 for qemu-devel@nongnu.org; Fri, 15 Jan 2016 03:06:34 -0500 Date: Fri, 15 Jan 2016 13:36:18 +0530 (IST) From: P J P In-Reply-To: Message-ID: References: <1452764448-17953-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , "Michael S. Tsirkin" , Jason Wang , QEMU Developers , Alistair Francis , qemu-arm , =?GB2312?B?wfXB7g==?= +-- On Thu, 14 Jan 2016, Peter Crosthwaite wrote --+ | I guess QEMU needs the whole packet before handing off to the net layer and | the assumption is that the packet is always within 2048. The easiest | solution is to realloc the buffer as it goes with the increasing sizes. Yes, I was considering increasing buffer size with view of the jumbo packets. In gem_transmit(), 'tx_desc_get_length' returns length masked by DESC_1_LENGTH(=0x1FFF=8191) bytes. But thought dynamic allocation might lead to excessive buffer allocation, not sure how constrained the Xilinx platform is for memory. -- - P J P 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F