From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeC8X-0007x0-ER for qemu-devel@nongnu.org; Thu, 10 Mar 2016 20:45:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeC8U-0005WK-9K for qemu-devel@nongnu.org; Thu, 10 Mar 2016 20:45:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeC8U-0005Vy-44 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 20:45:02 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 3E501335E9D for ; Fri, 11 Mar 2016 01:45:01 +0000 (UTC) Date: Fri, 11 Mar 2016 09:44:52 +0800 From: Peter Xu Message-ID: <20160311014452.GA4976@pxdev.xzpeter.org> References: <1457575914-15581-1-git-send-email-peterx@redhat.com> <1457595253.6405.3.camel@redhat.com> <20160310075612.GA30354@pxdev.xzpeter.org> <1457601705.6405.48.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1457601705.6405.48.camel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] usb: fix unbounded stack warning for xhci_dma_write_u32s List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: pbonzini@redhat.com, qemu-devel@nongnu.org On Thu, Mar 10, 2016 at 10:21:45AM +0100, Gerd Hoffmann wrote: > On Do, 2016-03-10 at 15:56 +0800, Peter Xu wrote: > > As mentioned in previous thread, because all the callers of > > xhci_dma_write_u32s() are using const size in "len". The maximum > > currently is 5 * sizeof(uint32_t) = 20 bytes > > Can you note that in the commit message please? Sure! > > > . Here I choose number > > bigger than 5 should work for now. > > Why bigger? 5 should do just fine then, and the assert added should > make sure we'll notice if this needs an update due to code changes > elsewhere. Will repost with 5. Thanks. Peter