tags 652146 + pending
forwarded 652146 snw...@suse.de
thanks

Cc-ing Steffen Winterfeldt as being upstream of hwinfo, he might be
interested in this issue + patch as well. Dear Steffen, full details
are available in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652146

* Christoph Biedl [Mon Jan 16, 2012 at 01:07:14AM +0100]:
> Michael Prokop wrote...

> > Problem doesn't seem to be present on 32bit systems,
> > but on amd64 it's definitely reproducable.

> The most likely culprit is

>     "push %%rbx\n\t"

> in src/hd/hd.c:hd_is_xen, in combination with the compiler and perhaps
> libc.
[...]

I was involved in debugging this issue and have just verified the
patch by Christoph against today's Debian/unstable once again, it
works fine for i386 + amd64, the segfault is no longer present with
the patch applied.

I've prepared an NMU for hwinfo (versioned as 16.0-2.2) and uploaded
it to DELAYED/5 (see attached file for the diff). Please feel free
to tell me if I should delay it longer.

regards,
-mika-
diff -u hwinfo-16.0/debian/changelog hwinfo-16.0/debian/changelog
--- hwinfo-16.0/debian/changelog
+++ hwinfo-16.0/debian/changelog
@@ -1,3 +1,12 @@
+hwinfo (16.0-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add patch fix_segfault_in_hd_is_xen_on_amd64 which fixes segfaults
+    on amd64. Thanks Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+    (Closes: #652146)
+
+ -- Michael Prokop <m...@debian.org>  Mon, 16 Jan 2012 11:02:29 +0100
+
 hwinfo (16.0-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u hwinfo-16.0/debian/patches/series hwinfo-16.0/debian/patches/series
--- hwinfo-16.0/debian/patches/series
+++ hwinfo-16.0/debian/patches/series
@@ -10,0 +11 @@
+fix_segfault_in_hd_is_xen_on_amd64
only in patch2:
unchanged:
--- hwinfo-16.0.orig/debian/patches/fix_segfault_in_hd_is_xen_on_amd64
+++ hwinfo-16.0/debian/patches/fix_segfault_in_hd_is_xen_on_amd64
@@ -0,0 +1,24 @@
+diff --git a/src/hd/hd.c b/src/hd/hd.c
+index 1539121..18e89c3 100644
+--- a/src/hd/hd.c
++++ b/src/hd/hd.c
+@@ -3245,16 +3245,16 @@ int hd_is_xen(hd_data_t *hd_data)
+     "mov %%edx,8(%%esi)\n\t"
+     "pop %%ebx"
+ #else
+-    "push %%rbx\n\t"
++    "mov %%ebx,%%edi\n\t"
+     "cpuid\n\t"
+     "mov %%ebx,(%%rsi)\n\t"
+     "mov %%ecx,4(%%rsi)\n\t"
+     "mov %%edx,8(%%rsi)\n\t"
+-    "pop %%rbx"
++    "mov %%edi,%%ebx\n\t"
+ #endif
+     : "=a" (u), "=c" (foo)
+     : "a" (0x40000000), "c" (0), "S" (signature)
+-    : "%edx"
++    : "%edx", "%edi"
+   );
+ 
+   signature[12] = 0;

Attachment: signature.asc
Description: Digital signature

Reply via email to