All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]mini-os: Fix to get netfront running on ia64
@ 2007-02-06  7:03 Dietmar Hahn
  2007-02-06 21:59 ` Grzegorz Milos
  2007-02-12 10:36 ` [PATCH]mini-os: Small fixes in makerules Dietmar Hahn
  0 siblings, 2 replies; 7+ messages in thread
From: Dietmar Hahn @ 2007-02-06  7:03 UTC (permalink / raw)
  To: Grzegorz Milos, xen-devel

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

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.

[-- Attachment #2: mini-os.patch --]
[-- Type: text/x-diff, Size: 1382 bytes --]

# 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],

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]mini-os: Fix to get netfront running on ia64
  2007-02-06  7:03 [PATCH]mini-os: Fix to get netfront running on ia64 Dietmar Hahn
@ 2007-02-06 21:59 ` Grzegorz Milos
  2007-02-12 10:36 ` [PATCH]mini-os: Small fixes in makerules Dietmar Hahn
  1 sibling, 0 replies; 7+ messages in thread
From: Grzegorz Milos @ 2007-02-06 21:59 UTC (permalink / raw)
  To: Dietmar Hahn; +Cc: xen-devel

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],

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH]mini-os: Small fixes in makerules
  2007-02-06  7:03 [PATCH]mini-os: Fix to get netfront running on ia64 Dietmar Hahn
  2007-02-06 21:59 ` Grzegorz Milos
@ 2007-02-12 10:36 ` Dietmar Hahn
  2007-02-13 23:05   ` Grzegorz Milos
  1 sibling, 1 reply; 7+ messages in thread
From: Dietmar Hahn @ 2007-02-12 10:36 UTC (permalink / raw)
  To: Grzegorz Milos, xen-devel

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

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.

[-- Attachment #2: mini-os_make.patch --]
[-- Type: text/x-diff, Size: 3098 bytes --]

# HG changeset patch
# User dietmar.hahn@fujitsu-siemens.com
# Date 1171276084 -3600
# Node ID adbcaac2e98cd2348265d5f5faf9e8196ae82ca4
# Parent  ad9bbd103034cfd566e2801cfd8d51813f1b0f95
- Added ARCH_LDFLAGS for architecture specific LDFLAGS.
- Fixed build dependencies after changing makerule files.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>


diff -r ad9bbd103034 -r adbcaac2e98c extras/mini-os/Makefile
--- a/extras/mini-os/Makefile	Fri Feb 09 18:19:24 2007 +0000
+++ b/extras/mini-os/Makefile	Mon Feb 12 11:28:04 2007 +0100
@@ -44,10 +44,6 @@ ARCH_LINKS =
 # This can be overwritten from arch specific rules.
 EXTRA_INC =
 
-# Special build dependencies.
-# Build all after touching this/these file(s) (see minios.mk)
-SPEC_DEPENDS = minios.mk
-
 # Include the architecture family's special makerules.
 # This must be before include minios.mk!
 include $(TARGET_ARCH_DIR)/arch.mk
@@ -57,7 +53,6 @@ include minios.mk
 
 # Define some default flags for linking.
 LDLIBS := 
-LDFLAGS := 
 LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
 LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds
 
diff -r ad9bbd103034 -r adbcaac2e98c extras/mini-os/arch/x86/Makefile
--- a/extras/mini-os/arch/x86/Makefile	Fri Feb 09 18:19:24 2007 +0000
+++ b/extras/mini-os/arch/x86/Makefile	Mon Feb 12 11:28:04 2007 +0100
@@ -2,9 +2,6 @@
 # x86 architecture specific makefiles.
 # It's is used for x86_32, x86_32y and x86_64
 #
-
-# Rebuild all after touching this/these extra file(s) (see mini-os.mk)
-SPEC_DEP = arch.mk
 
 # include arch.mk has to be before mini-os.mk!
 include arch.mk
@@ -25,5 +22,5 @@ all: $(ARCH_LIB)
 	$(AR) rv $(ARCH_LIB) $(ARCH_OBJS)
 
 clean:
-	rm -f $(ARCH_LIB) $(ARCH_OBJS)
+	rm -f $(ARCH_LIB) $(ARCH_OBJS) $(HEAD_ARCH_OBJ)
 
diff -r ad9bbd103034 -r adbcaac2e98c extras/mini-os/arch/x86/arch.mk
--- a/extras/mini-os/arch/x86/arch.mk	Fri Feb 09 18:19:24 2007 +0000
+++ b/extras/mini-os/arch/x86/arch.mk	Mon Feb 12 11:28:04 2007 +0100
@@ -25,4 +25,3 @@ EXTRA_SRC += arch/$(EXTRA_INC)
 EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
-
diff -r ad9bbd103034 -r adbcaac2e98c extras/mini-os/minios.mk
--- a/extras/mini-os/minios.mk	Fri Feb 09 18:19:24 2007 +0000
+++ b/extras/mini-os/minios.mk	Mon Feb 12 11:28:04 2007 +0100
@@ -11,6 +11,7 @@ DEF_CFLAGS += -D__XEN_INTERFACE_VERSION_
 DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
 DEF_ASFLAGS = -D__ASSEMBLY__
+DEF_LDFLAGS =
 
 ifeq ($(debug),y)
 DEF_CFLAGS += -g
@@ -23,9 +24,15 @@ endif
 # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
 CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
 ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
+LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
 
 # The path pointing to the architecture specific header files.
 ARCH_SPEC_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
+
+# Special build dependencies.
+# Rebuild all after touching this/these file(s)
+SPEC_DEPENDS = $(MINI-OS_ROOT)/minios.mk \
+		$(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
 
 # Find all header files for checking dependencies.
 HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]mini-os: Small fixes in makerules
  2007-02-12 10:36 ` [PATCH]mini-os: Small fixes in makerules Dietmar Hahn
@ 2007-02-13 23:05   ` Grzegorz Milos
  2007-02-19  9:47     ` [PATCH]mini-os: Bug in allocate_xenbus_id() Dietmar Hahn
  0 siblings, 1 reply; 7+ messages in thread
From: Grzegorz Milos @ 2007-02-13 23:05 UTC (permalink / raw)
  To: Dietmar Hahn; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

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


[-- Attachment #2: mini-os_make2.patch --]
[-- Type: application/octet-stream, Size: 4343 bytes --]

diff -r 72c225a828da -r 293e6050c164 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile	Mon Jan 29 21:54:46 2007 +0000
+++ b/extras/mini-os/Makefile	Tue Feb 13 22:51:22 2007 +0000
@@ -44,10 +44,6 @@ ARCH_LINKS =
 # This can be overwritten from arch specific rules.
 EXTRA_INC =
 
-# Special build dependencies.
-# Build all after touching this/these file(s) (see minios.mk)
-SPEC_DEPENDS = minios.mk
-
 # Include the architecture family's special makerules.
 # This must be before include minios.mk!
 include $(TARGET_ARCH_DIR)/arch.mk
@@ -57,7 +53,6 @@ include minios.mk
 
 # Define some default flags for linking.
 LDLIBS := 
-LDFLAGS := 
 LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
 LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds
 
diff -r 72c225a828da -r 293e6050c164 extras/mini-os/arch/x86/Makefile
--- a/extras/mini-os/arch/x86/Makefile	Mon Jan 29 21:54:46 2007 +0000
+++ b/extras/mini-os/arch/x86/Makefile	Tue Feb 13 22:51:22 2007 +0000
@@ -2,9 +2,6 @@
 # x86 architecture specific makefiles.
 # It's is used for x86_32, x86_32y and x86_64
 #
-
-# Rebuild all after touching this/these extra file(s) (see mini-os.mk)
-SPEC_DEP = arch.mk
 
 # include arch.mk has to be before mini-os.mk!
 include arch.mk
@@ -25,5 +22,5 @@ all: $(ARCH_LIB)
 	$(AR) rv $(ARCH_LIB) $(ARCH_OBJS)
 
 clean:
-	rm -f $(ARCH_LIB) $(ARCH_OBJS)
+	rm -f $(ARCH_LIB) $(ARCH_OBJS) $(HEAD_ARCH_OBJ)
 
diff -r 72c225a828da -r 293e6050c164 extras/mini-os/arch/x86/arch.mk
--- a/extras/mini-os/arch/x86/arch.mk	Mon Jan 29 21:54:46 2007 +0000
+++ b/extras/mini-os/arch/x86/arch.mk	Tue Feb 13 22:51:22 2007 +0000
@@ -6,6 +6,7 @@ ifeq ($(TARGET_ARCH),x86_32)
 ifeq ($(TARGET_ARCH),x86_32)
 ARCH_CFLAGS  := -m32 -march=i686
 ARCH_LDFLAGS := -m elf_i386
+ARCH_ASFLAGS := -m32
 EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
 EXTRA_SRC += arch/$(EXTRA_INC)
 endif
@@ -19,10 +20,10 @@ endif
 
 ifeq ($(TARGET_ARCH),x86_64)
 ARCH_CFLAGS := -m64 -mno-red-zone -fpic -fno-reorder-blocks
-ARCH_CFLAGS := -fno-asynchronous-unwind-tables
+ARCH_CFLAGS += -fno-asynchronous-unwind-tables
+ARCH_ASFLAGS := -m64
 ARCH_LDFLAGS := -m elf_x86_64
 EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
 EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
-
diff -r 72c225a828da -r 293e6050c164 extras/mini-os/minios.mk
--- a/extras/mini-os/minios.mk	Mon Jan 29 21:54:46 2007 +0000
+++ b/extras/mini-os/minios.mk	Tue Feb 13 22:51:22 2007 +0000
@@ -11,6 +11,7 @@ DEF_CFLAGS += -D__XEN_INTERFACE_VERSION_
 DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
 DEF_ASFLAGS = -D__ASSEMBLY__
+DEF_LDFLAGS =
 
 ifeq ($(debug),y)
 DEF_CFLAGS += -g
@@ -23,21 +24,27 @@ endif
 # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
 CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
 ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
+LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
 
 # The path pointing to the architecture specific header files.
-ARCH_SPEC_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
+ARCH_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
+
+# Special build dependencies.
+# Rebuild all after touching this/these file(s)
+EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
+		$(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
 
 # Find all header files for checking dependencies.
 HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
 HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
-HDRS += $(wildcard $(ARCH_SPEC_INC)/*.h)
+HDRS += $(wildcard $(ARCH_INC)/*.h)
 # For special wanted header directories.
 extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
 HDRS += $(extra_heads)
 
 # Add the special header directories to the include paths.
 extra_incl := $(foreach dir,$(EXTRA_INC),-I$(MINI-OS_ROOT)/include/$(dir))
-override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_SPEC_INC)	$(extra_incl)
+override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_INC)	$(extra_incl)
 
 # The name of the architecture specific library.
 # This is on x86_32: libx86_32.a
@@ -51,10 +58,10 @@ HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_AR
 HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
 
 
-%.o: %.c $(HDRS) Makefile $(SPEC_DEPENDS)
+%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
 
-%.o: %.S $(HDRS) Makefile $(SPEC_DEPENDS)
+%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
 	$(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@
 
 

[-- Attachment #3: Type: text/plain, Size: 316 bytes --]


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>


[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH]mini-os: Bug in allocate_xenbus_id()
  2007-02-13 23:05   ` Grzegorz Milos
@ 2007-02-19  9:47     ` Dietmar Hahn
  2007-02-20 18:53       ` Grzegorz Milos
  0 siblings, 1 reply; 7+ messages in thread
From: Dietmar Hahn @ 2007-02-19  9:47 UTC (permalink / raw)
  To: Grzegorz Milos; +Cc: xen-devel

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]mini-os: Bug in allocate_xenbus_id()
  2007-02-19  9:47     ` [PATCH]mini-os: Bug in allocate_xenbus_id() Dietmar Hahn
@ 2007-02-20 18:53       ` Grzegorz Milos
  2007-02-21  8:24         ` Dietmar Hahn
  0 siblings, 1 reply; 7+ messages in thread
From: Grzegorz Milos @ 2007-02-20 18:53 UTC (permalink / raw)
  To: Dietmar Hahn; +Cc: xen-devel

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]mini-os: Bug in allocate_xenbus_id()
  2007-02-20 18:53       ` Grzegorz Milos
@ 2007-02-21  8:24         ` Dietmar Hahn
  0 siblings, 0 replies; 7+ messages in thread
From: Dietmar Hahn @ 2007-02-21  8:24 UTC (permalink / raw)
  To: Grzegorz Milos; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-21  8:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06  7:03 [PATCH]mini-os: Fix to get netfront running on ia64 Dietmar Hahn
2007-02-06 21:59 ` Grzegorz Milos
2007-02-12 10:36 ` [PATCH]mini-os: Small fixes in makerules Dietmar Hahn
2007-02-13 23:05   ` Grzegorz Milos
2007-02-19  9:47     ` [PATCH]mini-os: Bug in allocate_xenbus_id() Dietmar Hahn
2007-02-20 18:53       ` Grzegorz Milos
2007-02-21  8:24         ` Dietmar Hahn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.