From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScHyi-00050K-P2 for qemu-devel@nongnu.org; Wed, 06 Jun 2012 11:17:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScHyb-0000e3-Rs for qemu-devel@nongnu.org; Wed, 06 Jun 2012 11:16:56 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:62187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScHyb-0000cz-Id for qemu-devel@nongnu.org; Wed, 06 Jun 2012 11:16:49 -0400 Received: by dadv2 with SMTP id v2so9689521dad.4 for ; Wed, 06 Jun 2012 08:16:46 -0700 (PDT) Sender: fluxion Date: Wed, 6 Jun 2012 10:16:40 -0500 From: Michael Roth Message-ID: <20120606151640.GA7733@illuin> References: <1337683555-13301-1-git-send-email-lersek@redhat.com> <4FCE7684.2070206@redhat.com> <4FCF5512.9000704@redhat.com> <4FCF5BA8.3010201@suse.de> <4FCF64E4.50701@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4FCF64E4.50701@redhat.com> Subject: Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Laszlo Ersek , Andreas =?iso-8859-1?Q?F=E4rber?= , qemu-devel@nongnu.org On Wed, Jun 06, 2012 at 04:10:44PM +0200, Paolo Bonzini wrote: > Il 06/06/2012 15:31, Andreas Färber ha scritto: > >> > > >> > (a) add < 0 checks to and > >> > include it in the series, > >> > (b) make all Netdev integer types as strict as possible, remove > >> > superfluous checks, > >> > (c) render NetLegacy::name optional. > >> > > >> > How do I lay out (a)? Should I include the patch verbatim first (with > >> > proper From: and Signed-off-by: lines) and then modify it in a small > >> > followup, or squash those two and... what? :) > > I am missing context here. The referenced patch is on qom-next already > > and will thus be in my upcoming PULL (today or tomorrow) unless someone > > comments on that patch, cc'ing me, that there's an error. Feel free to > > cherry-pick from there but do not squash into random series please. > > > > I don't understand what < 0 checks you are talking about, lacking time > > to go through this QIDL patch series ATM. > > The uintXX visitors do not fail if you pass a negative value. I'm fine > with including the patch with the small bug and fixing it as a > follow-up, there's plenty of time before 1.2. How would we implement such a check? In the case of uint64_t, the field we're visiting is passed in as a uint64_t*, so -1 is indistinguishable from the unsigned interpretation of the field, which is within the valid range. For uintXX_t where XX < 64, a negative value would exceed the UINTXX_MAX check, so those cases are already handled. Or am I missing something? > > Paolo >