WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]: xl: don't segfault parsing disk configs, suppor

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: xl: don't segfault parsing disk configs, support NULL physpath and ioemu:
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Tue, 14 Dec 2010 18:21:30 +0000
Cc: "yang.z.zhang@xxxxxxxxx" <yang.z.zhang@xxxxxxxxx>, Kamala Narasimhan <kamala.narasimhan@xxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 14 Dec 2010 10:22:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19719.44060.61050.108843@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1292326253.11246.25.camel@xxxxxxxxxxxxxxxxxxxxxx> <19719.44060.61050.108843@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2010-12-14 at 17:40 +0000, Ian Jackson wrote:
> Gianni Tedesco writes ("[Xen-devel] [PATCH]: xl: don't segfault parsing disk 
> configs, support NULL physpath and ioemu:"):
> > Resending due to another user reported running in to this. Applies with
> > offsets.
> ...
> > Switch to a state machine parser since it's easier to handle all these
> > exotic cases without segfaulting. NULL physpaths are now allowed and a
> > dodgy hack is introduced to skip over the "ioemu:" prefix for a
> > virtpath. Also fixes a leak of buf2.
> 
> Thanks, but I think the last time we had this we had some negative
> feedback about the comprehensibility of this approach.

Yes... from you :)

> Perhaps a regexp- or flex- or bison- based approach would be better ?

ISTR you said you'd do it in flex but since:

1. people are running to the bugs "out in the world"
2. we have an existing fix
3. I have no flex-fu
4. and we were in agreement that this code is as readable or more-so
   than a correct strtok-based implementation

then why not take the fix we have now and improve if/when we need to in
the future? Evidently nobody has touched this code for 6 months or more.

> Ian.

Gianni


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>