Dietmar Hahn
2007-Feb-06 07:03 UTC
[Xen-devel] [PATCH]mini-os: Fix to get netfront running on ia64
Hi, to get the netfront stuff on ia64 architecture running I still need to include the attached patch. Please have a look and send comments! Thanks. Dietmar. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Milos
2007-Feb-06 21:59 UTC
[Xen-devel] Re: [PATCH]mini-os: Fix to get netfront running on ia64
That looks good. Keir could you apply please (if you haven''t done so already). Thanks Gregor> Hi, > > to get the netfront stuff on ia64 architecture running I still need to include > the attached patch. > Please have a look and send comments! > Thanks. > > Dietmar. > > > ------------------------------------------------------------------------ > > # HG changeset patch > # User dietmar.hahn@fujitsu-siemens.com > # Date 1170687542 -3600 > # Node ID 80cd2c0ee40cddec1914542f221159b5911368b3 > # Parent 01ec7dba9ff805a5c74a0318997b747d3e3e3327 > 2 Fixes for supporting netfront on ia64. > > Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com> > > > diff -r 01ec7dba9ff8 -r 80cd2c0ee40c extras/mini-os/gnttab.c > --- a/extras/mini-os/gnttab.c Fri Feb 02 16:07:13 2007 +0000 > +++ b/extras/mini-os/gnttab.c Mon Feb 05 15:59:02 2007 +0100 > @@ -21,7 +21,12 @@ > > #define NR_RESERVED_ENTRIES 8 > > +/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */ > +#ifdef __ia64__ > +#define NR_GRANT_FRAMES 1 > +#else > #define NR_GRANT_FRAMES 4 > +#endif > #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t)) > > static grant_entry_t *gnttab_table; > diff -r 01ec7dba9ff8 -r 80cd2c0ee40c extras/mini-os/netfront.c > --- a/extras/mini-os/netfront.c Fri Feb 02 16:07:13 2007 +0000 > +++ b/extras/mini-os/netfront.c Mon Feb 05 15:59:02 2007 +0100 > @@ -349,7 +349,9 @@ done: > init_rx_buffers(); > > unsigned char rawmac[6]; > - sscanf(mac,"%x:%x:%x:%x:%x:%x", > + /* Special conversion specifier ''hh'' needed for __ia64__. Without > + this mini-os panics with ''Unaligned reference''. */ > + sscanf(mac,"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", > &rawmac[0], > &rawmac[1], > &rawmac[2],_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, this patch added ARCH_LDFLAGS for architecture specific LDFLAGS to the makerules and fixed not correct handled rebuild dependencies after changing makerule files. Please have a look and send comments! Thanks. Dietmar. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Milos
2007-Feb-13 23:05 UTC
[Xen-devel] Re: [PATCH]mini-os: Small fixes in makerules
That''s a good patch, but I''ve also added a fix to ARCH_CPFLAGS, and renamed couple of variables (I didn''t like SPEC_DEPENDS for example). Keir could you apply the revised patch? I hope you don''t mind including you in the Signed-off-by line Dietmar. Patch info: - Added ARCH_LDFLAGS for architecture specific LDFLAGS - Fixed build dependencies after changing makerule files - Fixed ARCH_CFLAGS for 64bit guest, added ARCH_ASFLAGS - Couple of variable renames Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk> Thanks Gregor On 12 Feb 2007, at 10:36, Dietmar Hahn wrote:> Hi, > > this patch added ARCH_LDFLAGS for architecture specific LDFLAGS to the > makerules and fixed not correct handled rebuild dependencies after > changing > makerule files. > Please have a look and send comments! > Thanks. > > Dietmar. > <mini-os_make.patch>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dietmar Hahn
2007-Feb-19 09:47 UTC
[Xen-devel] [PATCH]mini-os: Bug in allocate_xenbus_id()
Hi Gregor, in allocate_xenbus_id() the static variable probe never gets reset. Therewidth id''s >= NR_REQS are possible, which lead to an overflow in req_info[] and may crash the mini-os. Thanks. Dietmar Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com> # HG changeset patch # User dietmar.hahn@fujitsu-siemens.com # Date 1171877953 -3600 # Node ID 3d04558ad3d7e3811ac8c827bb876858bbb1c415 # Parent b5fc88aad1b0eb35d12e503982c70fdc27f0544a Because probe never gets decremented (or reset), id >= NR_REQS is possible, which may lead to a crash. diff -r b5fc88aad1b0 -r 3d04558ad3d7 extras/mini-os/xenbus/xenbus.c --- a/extras/mini-os/xenbus/xenbus.c Sun Feb 18 15:29:40 2007 +0000 +++ b/extras/mini-os/xenbus/xenbus.c Mon Feb 19 10:39:13 2007 +0100 @@ -210,7 +210,7 @@ static int allocate_xenbus_id(void) } nr_live_reqs++; req_info[o_probe].in_use = 1; - probe = o_probe + 1; + probe = (o_probe + 1) % NR_REQS; spin_unlock(&req_lock); init_waitqueue_head(&req_info[o_probe].waitq); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Milos
2007-Feb-20 18:53 UTC
[Xen-devel] Re: [PATCH]mini-os: Bug in allocate_xenbus_id()
That''s a good catch. Did you see the bug manifesting itself in practice? Keir could you apply please? Thanks. Gregor Dietmar Hahn wrote:> Hi Gregor, > > in allocate_xenbus_id() the static variable probe never gets reset. > Therewidth id''s >= NR_REQS are possible, which lead to an overflow in > req_info[] and may crash the mini-os. > Thanks. > > Dietmar > > Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com> > > # HG changeset patch > # User dietmar.hahn@fujitsu-siemens.com > # Date 1171877953 -3600 > # Node ID 3d04558ad3d7e3811ac8c827bb876858bbb1c415 > # Parent b5fc88aad1b0eb35d12e503982c70fdc27f0544a > Because probe never gets decremented (or reset), id >= NR_REQS is possible, > which may lead to a crash. > > diff -r b5fc88aad1b0 -r 3d04558ad3d7 extras/mini-os/xenbus/xenbus.c > --- a/extras/mini-os/xenbus/xenbus.c Sun Feb 18 15:29:40 2007 +0000 > +++ b/extras/mini-os/xenbus/xenbus.c Mon Feb 19 10:39:13 2007 +0100 > @@ -210,7 +210,7 @@ static int allocate_xenbus_id(void) > } > nr_live_reqs++; > req_info[o_probe].in_use = 1; > - probe = o_probe + 1; > + probe = (o_probe + 1) % NR_REQS; > spin_unlock(&req_lock); > init_waitqueue_head(&req_info[o_probe].waitq);_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dietmar Hahn
2007-Feb-21 08:24 UTC
[Xen-devel] Re: [PATCH]mini-os: Bug in allocate_xenbus_id()
Hi Gregor, Am Dienstag, 20. Februar 2007 19:53 schrieb Grzegorz Milos:> That''s a good catch. Did you see the bug manifesting itself in practice? >Yes I got a crash with the mini-os on ia64. In xenbus_msg_reply() the function allocate_xenbus_id() returns value 33 and this leads to a crash in add_waiter(). On x86 this is running fine ;-). Dietmar. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel