Debian Bug report logs -
#410859
liboil0.3: wrongly assumes that all Intel chips support CP14 timestamp
Reported by: Aurelien Jarno <aurel32@debian.org>
Date: Tue, 13 Feb 2007 23:18:07 UTC
Severity: grave
Tags: patch
Found in version liboil/0.3.10-1
Fixed in versions liboil/0.3.10-1.1, liboil/0.3.11-1
Done: David Schleef <ds@schleef.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, David Schleef <ds@schleef.org>:
Bug#410859; Package liboil0.3.
(full text, mbox, link).
Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to David Schleef <ds@schleef.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: liboil0.3
Version: 0.3.10-1
Severity: grave
Tags: patch
All programs linked with liboil0.3 are causing a SIGILL on an IXP4xx
XScale CPU. This is due to the following code in liboil/liboilcpu.c:
switch(arm_implementer) {
case 0x69: /* Intel */
/* assume that all Intel chips support CP14 timestamp */
_oil_profile_stamp = oil_profile_stamp_xscale;
I don't know how to detect if an Intel CPU has support for CP14
timestamp, therefore I suggests to disable this detection for now. Here
is the patch I used:
--- liboil-0.3.10.orig/liboil/liboilcpu.c
+++ liboil-0.3.10/liboil/liboilcpu.c
@@ -644,7 +644,7 @@
switch(arm_implementer) {
case 0x69: /* Intel */
/* assume that all Intel chips support CP14 timestamp */
- _oil_profile_stamp = oil_profile_stamp_xscale;
+ /* _oil_profile_stamp = oil_profile_stamp_xscale; */
break;
case 0x41: /* ARM */
/* ARM chips are known to not have timestamping available from
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: arm (armv5tel)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-ixp4xx
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Versions of packages liboil0.3 depends on:
ii libc6 2.3.6.ds1-10 GNU C Library: Shared libraries
liboil0.3 recommends no packages.
-- no debconf information
Information forwarded to debian-bugs-dist@lists.debian.org, David Schleef <ds@schleef.org>:
Bug#410859; Package liboil0.3.
(full text, mbox, link).
Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to David Schleef <ds@schleef.org>.
(full text, mbox, link).
Message #10 received at 410859@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
I think all XScale processors have CP14 timestamp (see
<http://download.intel.com/design/intelxscale/XScaleDatasheet4.pdf>) but
it's in register 1, not register 0. The original report is right in
that StrongArm processors do not have a CP14. Therefore the following
*should* work:
--- liboil-0.3.10.orig/liboil/liboilcpu.c 2006-11-06 01:37:03.000000000 +0000
+++ liboil-0.3.10/liboil/liboilcpu.c 2007-02-22 13:41:31.000000000 +0000
@@ -620,7 +620,7 @@
{
unsigned int ts;
__asm__ __volatile__ (
- " mrc p14, 0, %0, c0, c0, 0 \n"
+ " mrc p14, 0, %0, c1, c0, 0 \n"
: "=r" (ts));
return ts;
}
@@ -629,7 +629,8 @@
oil_cpu_detect_arm(void)
{
#ifdef __linux__
- int arm_implementer;
+ int arm_implementer = 0;
+ char arm_architecture = 0;
char *cpuinfo;
char *s;
@@ -640,18 +641,16 @@
arm_implementer = strtoul (s, NULL, 0);
free(s);
}
+ s = get_cpuinfo_line(cpuinfo, "CPU architecture");
+ if (s) {
+ char *p = s + strspn(s, " \t");
+ arm_architecture = *p;
+ free(s);
+ }
- switch(arm_implementer) {
- case 0x69: /* Intel */
- /* assume that all Intel chips support CP14 timestamp */
- _oil_profile_stamp = oil_profile_stamp_xscale;
- break;
- case 0x41: /* ARM */
- /* ARM chips are known to not have timestamping available from
- * user space */
- break;
- default:
- break;
+ /* only Intel XScale processors support CP14 timestamp */
+ if (arm_implementer == 0x69 && arm_architecture == '5') {
+ _oil_profile_stamp = oil_profile_stamp_xscale;
}
free (cpuinfo);
-- END --
In practice it still results in SIGILL, so I agree we should never use
oil_profile_stamp_xscale().
Ben.
--
Ben Hutchings
Beware of bugs in the above code;
I have only proved it correct, not tried it. - Donald Knuth
[signature.asc (application/pgp-signature, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, David Schleef <ds@schleef.org>:
Bug#410859; Package liboil0.3.
(full text, mbox, link).
Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to David Schleef <ds@schleef.org>.
(full text, mbox, link).
Message #15 received at 410859@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
This was already fixed upstream on 1st January
(http://webcvs.freedesktop.org/liboil/liboil/liboil/liboilcpu.c?r1=1.36&r2=1.37) so I'm going to apply that change and upload:
--- liboilcpu.c 2006/11/06 02:04:58 1.36
+++ liboilcpu.c 2007/01/01 09:33:33 1.37
@@ -615,15 +615,17 @@
/***** arm *****/
#ifdef __arm__
+#if 0
static unsigned long
oil_profile_stamp_xscale(void)
{
unsigned int ts;
__asm__ __volatile__ (
- " mrc p14, 0, %0, c0, c0, 0 \n"
+ " mrc p14, 0, %0, c1, c0, 0 \n"
: "=r" (ts));
return ts;
}
+#endif
static void
oil_cpu_detect_arm(void)
@@ -643,9 +645,6 @@
switch(arm_implementer) {
case 0x69: /* Intel */
- /* assume that all Intel chips support CP14 timestamp */
- _oil_profile_stamp = oil_profile_stamp_xscale;
- break;
case 0x41: /* ARM */
/* ARM chips are known to not have timestamping available from
* user space */
-- END --
Ben.
--
Ben Hutchings
Beware of bugs in the above code;
I have only proved it correct, not tried it. - Donald Knuth
[signature.asc (application/pgp-signature, inline)]
Reply sent to Ben Hutchings <ben@decadent.org.uk>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Aurelien Jarno <aurel32@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #20 received at 410859-close@bugs.debian.org (full text, mbox, reply):
Source: liboil
Source-Version: 0.3.10-1.1
We believe that the bug you reported is fixed in the latest version of
liboil, which is due to be installed in the Debian FTP archive:
liboil0.3-dev_0.3.10-1.1_i386.deb
to pool/main/libo/liboil/liboil0.3-dev_0.3.10-1.1_i386.deb
liboil0.3_0.3.10-1.1_i386.deb
to pool/main/libo/liboil/liboil0.3_0.3.10-1.1_i386.deb
liboil_0.3.10-1.1.diff.gz
to pool/main/libo/liboil/liboil_0.3.10-1.1.diff.gz
liboil_0.3.10-1.1.dsc
to pool/main/libo/liboil/liboil_0.3.10-1.1.dsc
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 410859@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ben Hutchings <ben@decadent.org.uk> (supplier of updated liboil package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 22 Feb 2007 21:18:15 +0000
Source: liboil
Binary: liboil0.3 liboil0.3-dev
Architecture: source i386
Version: 0.3.10-1.1
Distribution: unstable
Urgency: low
Maintainer: David Schleef <ds@schleef.org>
Changed-By: Ben Hutchings <ben@decadent.org.uk>
Description:
liboil0.3 - Library of Optimized Inner Loops
liboil0.3-dev - Library of Optimized Inner Loops (development headers)
Closes: 410859
Changes:
liboil (0.3.10-1.1) unstable; urgency=low
.
* Non-maintainer upload.
* Disabled use of system register on StrongArm and XScale processors
(Closes: #410859)
Files:
141a191b153b3caf8de224f2c863fc9f 610 devel optional liboil_0.3.10-1.1.dsc
8f450e754ebdb20cfda02eeeff7c7d2f 32080 devel optional liboil_0.3.10-1.1.diff.gz
b5be656261d043883a85c3c8c0670cfc 143956 libs optional liboil0.3_0.3.10-1.1_i386.deb
3e543c56ae2b7847c44513e889cc9ff4 282182 libdevel optional liboil0.3-dev_0.3.10-1.1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF3g9b79ZNCRIGYgcRAp0bAJ0TcQ1nNmLJnG5TU1aAsKKhxeS+oACfSOhV
L+9457A6C3fLF0iJTw+bNUE=
=tiR0
-----END PGP SIGNATURE-----
Tags added: pending
Request was from Anibal Monsalve Salazar <anibal@debian.org>
to control@bugs.debian.org.
(Sun, 18 Mar 2007 11:06:11 GMT) (full text, mbox, link).
Reply sent to David Schleef <ds@schleef.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Aurelien Jarno <aurel32@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #27 received at 410859-close@bugs.debian.org (full text, mbox, reply):
Source: liboil
Source-Version: 0.3.11-1
We believe that the bug you reported is fixed in the latest version of
liboil, which is due to be installed in the Debian FTP archive:
liboil0.3-dbg_0.3.11-1_i386.deb
to pool/main/libo/liboil/liboil0.3-dbg_0.3.11-1_i386.deb
liboil0.3-dev_0.3.11-1_i386.deb
to pool/main/libo/liboil/liboil0.3-dev_0.3.11-1_i386.deb
liboil0.3_0.3.11-1_i386.deb
to pool/main/libo/liboil/liboil0.3_0.3.11-1_i386.deb
liboil_0.3.11-1.diff.gz
to pool/main/libo/liboil/liboil_0.3.11-1.diff.gz
liboil_0.3.11-1.dsc
to pool/main/libo/liboil/liboil_0.3.11-1.dsc
liboil_0.3.11.orig.tar.gz
to pool/main/libo/liboil/liboil_0.3.11.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 410859@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
David Schleef <ds@schleef.org> (supplier of updated liboil package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sat, 17 Mar 2007 13:18:03 -0700
Source: liboil
Binary: liboil0.3 liboil0.3-dev liboil0.3-dbg
Architecture: source i386
Version: 0.3.11-1
Distribution: unstable
Urgency: low
Maintainer: David Schleef <ds@schleef.org>
Changed-By: David Schleef <ds@schleef.org>
Description:
liboil0.3 - Library of Optimized Inner Loops
liboil0.3-dbg - Library of Optimized Inner Loops (debug packages)
liboil0.3-dev - Library of Optimized Inner Loops (development headers)
Closes: 381506 400163 410859
Changes:
liboil (0.3.11-1) unstable; urgency=low
.
* New upstream release. Changes include fixes to bugs:
- Disable timestamp on XScale (Closes: #410859)
- Merge stack realignment patch into upstream (Closes: #381506)
* Add -dbg package. (Closes: 400163)
Files:
8058b9d225257682c2845e223db76545 621 devel optional liboil_0.3.11-1.dsc
65ce3266be385d0c7cd9a1157433332f 881159 devel optional liboil_0.3.11.orig.tar.gz
f17168c139f6f73fc928ce3362c62785 66710 devel optional liboil_0.3.11-1.diff.gz
2f75b88362e8c04cb013918e51bcb289 144996 libs optional liboil0.3_0.3.11-1_i386.deb
4567526c0b4ba3b60ded4f8eb51a02cb 277974 libdevel optional liboil0.3-dev_0.3.11-1_i386.deb
b0e547574f83a9b13a8bc21a7f37901b 312908 libdevel optional liboil0.3-dbg_0.3.11-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF/HeJ2vJMr9bVSaoRAvWnAKC2DqHKrZGEWvz2V1WlwZFf4C9ZagCfVEBf
whvG9SFnEC4FC7vCG96YBJc=
=1y1u
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 26 Jun 2007 02:14:42 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Jul 15 18:03:18 2024;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.