Debian Bug report logs - #506481
wrong cpu optimisation, please specify more info

Package: general; Maintainer for general is debian-devel@lists.debian.org;

Reported by: Mark Hobley <markhobley@yahoo.co.uk>

Date: Fri, 21 Nov 2008 22:27:01 UTC

Severity: wishlist

Tags: moreinfo

Done: Holger Levsen <holger@layer-acht.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, markhobley@yahoo.co.uk, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#506481; Package initscripts. (Fri, 21 Nov 2008 22:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark Hobley <markhobley@yahoo.co.uk>:
New Bug report received and forwarded. Copy sent to markhobley@yahoo.co.uk, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Fri, 21 Nov 2008 22:27:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Mark Hobley <markhobley@yahoo.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Fri, 21 Nov 2008 22:24:45 +0000
Package: initscripts
Version: 2.86.ds1-61
Severity: normal
Tags: patch


This fix allows falsified cpu information in /proc/cpuinfo, by creating 
an override file /etc/cpuinfo:

The following changes apply to the /etc/init.d/mountkernfs.sh script:

        #
        # Mount proc filesystem on /proc
        #
        domount proc "" /proc proc -onodev,noexec,nosuid

        #
        # Override /proc/cpuinfo with falsified information, if required
        #
        if [ -e /etc/cpuinfo] ; then
          mount --bind /etc/cpuinfo /proc/cpuinfo
        fi

        #
        # Mount sysfs on /sys
        #

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-486
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  debianutils                  2.30        Miscellaneous utilities specific t
ii  e2fsprogs                    1.41.2-1    ext2/ext3/ext4 file system utiliti
ii  libc6                        2.7-15      GNU C Library: Shared libraries
ii  lsb-base                     3.2-20      Linux Standard Base 3.2 init scrip
ii  mount                        2.13.1.1-1  Tools for mounting and manipulatin
ii  sysvinit-utils               2.86.ds1-61 System-V-like utilities

Versions of packages initscripts recommends:
ii  psmisc                        22.6-1     Utilities that use the proc filesy

initscripts suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#506481; Package initscripts. (Sat, 27 Jun 2009 18:54:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <petter.reinholdtsen@usit.uio.no>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Sat, 27 Jun 2009 18:54:06 GMT) Full text and rfc822 format available.

Message #10 received at 506481@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <petter.reinholdtsen@usit.uio.no>
To: 506481@bugs.debian.org, Mark Hobley <markhobley@yahoo.co.uk>
Subject: Re: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Sat, 27 Jun 2009 20:51:30 +0200
severity 506481 wishlist
thanks

[Mark Hobley]
> This fix allows falsified cpu information in /proc/cpuinfo, by
> creating an override file /etc/cpuinfo:

First of all, I would expect you could do the same by adding a bind
mount line in /etc/fstab.  Does it work?  If it does, I believe it
would be the best way to implement this feature - assuming that very
few find it useful.

Second, I am unable to understand why this feature would be useful.
Can you explain more?

Last, given that it is useful, why should this feature be included in
the normal init.d scripts, and not in some special package only
installed in the rare case where it is useful?  I have never had the
need to replace /proc/cpuinfo myself, and suspect most users never saw
the need either.

Happy hacking,
-- 
Petter Reinholdtsen




Severity set to `wishlist' from `normal' Request was from Petter Reinholdtsen <petter.reinholdtsen@usit.uio.no> to control@bugs.debian.org. (Sat, 27 Jun 2009 18:54:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#506481; Package initscripts. (Thu, 30 Jul 2009 10:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Thu, 30 Jul 2009 10:33:02 GMT) Full text and rfc822 format available.

Message #17 received at 506481@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: Mark Hobley <markhobley@yahoo.co.uk>, 506481@bugs.debian.org
Subject: Re: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Thu, 30 Jul 2009 12:15:27 +0200
reassign 506481 gcc
thanks

[Mark Hobley]
> The problem is to do with compatibility with machines of an earlier
> family.
>
> For example, the 80686 series processor is compatible with the
> 80386, 80486, and 80586 families. However, because of cpu
> identification, the toolchains detect that the processor is an
> 80686, and build with superset instructions, breaking compiled
> binary compatibility with the 80386 and 80486 series processors,
> even though the processors are binary compatible.
>
> It would be nice if we could switch the kernel into 80386 or 80486
> compatibility mode, so that all machines run the same code
> regardless of their families.
>
> Since posting this, I have discovered a deeper problem within the
> kernel itself, and the gnu C library. I will be forking both the
> kernel and the C library, and hardcoding the appropriate values into
> the tables.
> 
> It was never a good idea to use local family identification, when
> builds are required to run across processors from different
> generations.
>
> It is especially annoying to have binary code that runs fine on one
> machine, and then have the system halt with a bug int 6 on another
> machine, even though the processors both support a common
> instruction set.  (This occurs because the compiler on the newer
> processor includes instructions which are not valid on the earlier
> generation machine. Overriding the cpu identification would prevent
> this).

Right.  This seem to be a problem that need to be solved by the
compiler, and not by initscripts.  Reassigning to gcc.

Happy hacking,
-- 
Petter Reinholdtsen




Bug reassigned from package 'initscripts' to 'gcc'. Request was from Petter Reinholdtsen <pere@hungry.com> to control@bugs.debian.org. (Thu, 30 Jul 2009 10:33:06 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions sysvinit/2.86.ds1-61. Request was from Petter Reinholdtsen <pere@hungry.com> to control@bugs.debian.org. (Thu, 30 Jul 2009 10:33:07 GMT) Full text and rfc822 format available.

Bug reassigned from package 'gcc' to 'initscripts'. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Thu, 30 Jul 2009 13:27:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#506481; Package initscripts. (Thu, 30 Jul 2009 14:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Thu, 30 Jul 2009 14:24:04 GMT) Full text and rfc822 format available.

Message #28 received at 506481@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 506481@bugs.debian.org
Cc: Debian Bug Tracking System <control@bugs.debian.org>
Subject: Re: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Thu, 30 Jul 2009 16:21:44 +0200
reassign 506481 general
thanks

[Matthias Klose]
>> Right.  This seem to be a problem that need to be solved by the
>> compiler, and not by initscripts.  Reassigning to gcc.
>
> this has nothing to do with the compiler, which is built for a fixed 
> arch/tune setting.

Right.  If the compiler is not the entity deciding what architecture
and CPU feature set a program is build for, I have no idea what is.
It is definitely not the initscripts package, so I reassign this to
'general' in the hope that someone know more about this than me.

Happy hacking,
-- 
Petter Reinholdtsen




Bug reassigned from package 'initscripts' to 'general'. Request was from Petter Reinholdtsen <pere@hungry.com> to control@bugs.debian.org. (Thu, 30 Jul 2009 14:24:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#506481; Package general. (Fri, 31 Jul 2009 00:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kurt Roeckx <kurt@roeckx.be>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. (Fri, 31 Jul 2009 00:18:03 GMT) Full text and rfc822 format available.

Message #35 received at 506481@bugs.debian.org (full text, mbox):

From: Kurt Roeckx <kurt@roeckx.be>
To: Petter Reinholdtsen <pere@hungry.com>
Cc: 506481@bugs.debian.org, Mark Hobley <markhobley@yahoo.co.uk>
Subject: Re: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Fri, 31 Jul 2009 02:16:32 +0200
On Thu, Jul 30, 2009 at 04:21:44PM +0200, Petter Reinholdtsen wrote:
> reassign 506481 general
> thanks
> 
> [Matthias Klose]
> >> Right.  This seem to be a problem that need to be solved by the
> >> compiler, and not by initscripts.  Reassigning to gcc.
> >
> > this has nothing to do with the compiler, which is built for a fixed 
> > arch/tune setting.
> 
> Right.  If the compiler is not the entity deciding what architecture
> and CPU feature set a program is build for, I have no idea what is.
> It is definitely not the initscripts package, so I reassign this to
> 'general' in the hope that someone know more about this than me.

This is most likely a bug in the package.  Some configure scripts
and simular tools tried to detect the cpu at build time and
pass options to gcc to change the default.  This is always wrong
for a Debian package.  If this is about a Debian package you should
file a bug against the package that has this problem.


Kurt





Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#506481; Package general. (Sat, 01 Aug 2009 08:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Holger Levsen <holger@layer-acht.org>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. (Sat, 01 Aug 2009 08:06:03 GMT) Full text and rfc822 format available.

Message #40 received at 506481@bugs.debian.org (full text, mbox):

From: Holger Levsen <holger@layer-acht.org>
To: Mark Hobley <markhobley@yahoo.co.uk>, 506481@bugs.debian.org, control@bugs.debian.org
Subject: please specify more info
Date: Sat, 1 Aug 2009 10:04:48 +0200
[Message part 1 (text/plain, inline)]
tags 506481 -patch +moreinfo
retitle 506481 wrong cpu optimisation, please specify more info 
thanks

Hi Mark,

as I understand it, this bug report of yours is a bit useless atm, as it 
specifies a workaround for a non-existing (general) problem, while there is 
no indication which packages are/were really buggy.

Please provide more information about the affcted packages (possible cloning 
and reassing this bug accordingly), else I'll close this bug in some time.


regards,
	Holger
[signature.asc (application/pgp-signature, inline)]

Changed Bug title to 'wrong cpu optimisation, please specify more info' from 'initscripts: Fix to allow falsified cpu information in /proc/cpuinfo' Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Sat, 01 Aug 2009 08:06:04 GMT) Full text and rfc822 format available.

Removed tag(s) patch. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Sat, 01 Aug 2009 16:18:05 GMT) Full text and rfc822 format available.

Added tag(s) moreinfo. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Sat, 01 Aug 2009 16:18:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#506481; Package general. (Sun, 02 Aug 2009 19:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Henrique de Moraes Holschuh <hmh@debian.org>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. (Sun, 02 Aug 2009 19:06:03 GMT) Full text and rfc822 format available.

Message #51 received at 506481@bugs.debian.org (full text, mbox):

From: Henrique de Moraes Holschuh <hmh@debian.org>
To: Petter Reinholdtsen <pere@hungry.com>, 506481@bugs.debian.org, 506481-submitter@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#506481: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Sun, 2 Aug 2009 16:01:17 -0300
On Thu, 30 Jul 2009, Petter Reinholdtsen wrote:
> [Matthias Klose]
> >> Right.  This seem to be a problem that need to be solved by the
> >> compiler, and not by initscripts.  Reassigning to gcc.
> >
> > this has nothing to do with the compiler, which is built for a fixed 
> > arch/tune setting.
> 
> Right.  If the compiler is not the entity deciding what architecture
> and CPU feature set a program is build for, I have no idea what is.
> It is definitely not the initscripts package, so I reassign this to
> 'general' in the hope that someone know more about this than me.

It is whatever package being built.  And if it is using anything other than
the ARCH dpkg tells it to and giving the compiler wrong options (thus
overriding whatever is the default arch for the compiler), that package is
broken (RC-broken, in fact) and needs to be fixed.   If it is not a Debian
package, then it is out of our hands.

I don't know how one would go about changing the default target arch for the
toolchain, if this is what this bug is about.  But messing with
/proc/cpuinfo certainly is not something we want to support.

And BTW, for a long time, dpkg told everything to build for i386.  I believe
we're doing i486 nowadays on ia32.  We *certainly* don't do i686.  Refer to
dpkg-architecture(1) for details...  gcc -dumpmachine seems to agree with
dpkg-architecture, so any builds for i686 are either caused by buggy
packages, or by direct builds by the local users using autoconf/GNU config
without a site override for config.guess (or a local command-line override,
like the Debian packages are supposed to do while building).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh




Message sent on to Mark Hobley <markhobley@yahoo.co.uk>:
Bug#506481. (Sun, 02 Aug 2009 19:06:05 GMT) Full text and rfc822 format available.

Information stored :
Bug#506481; Package general. (Sun, 02 Aug 2009 22:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to markhobley@hotpop.com:
Extra info received and filed, but not forwarded. (Sun, 02 Aug 2009 22:06:02 GMT) Full text and rfc822 format available.

Message #59 received at 506481-quiet@bugs.debian.org (full text, mbox):

From: Mark Hobley <markhobley@yahoo.co.uk>
To: Henrique de Moraes Holschuh <hmh@debian.org>, 506481-quiet@bugs.debian.org
Subject: Re: Bug#506481: [Pkg-sysvinit-devel] Bug#506481: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Sun, 2 Aug 2009 22:01:29 +0000 (GMT)


--- On Sun, 2/8/09, Henrique de Moraes Holschuh <hmh@debian.org> wrote:

> From: Henrique de Moraes Holschuh <hmh@debian.org>
> Subject: Bug#506481: [Pkg-sysvinit-devel] Bug#506481: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
 
> It is whatever package being built.  And if it is
> using anything other than
> the ARCH dpkg tells it to and giving the compiler wrong
> options (thus
> overriding whatever is the default arch for the compiler),
> that package is
> broken (RC-broken, in fact) and needs to be
> fixed.   If it is not a Debian
> package, then it is out of our hands.

The problem is that the entire GNU toolchain is really broken. When attempting to build a system for IA32, we are getting non-IA32 instructions within the build. This is because cpuid is causing wrong decisions to be made. (Also glibc is broken and will not build for i386, which is required for compatibility with IA32).

I know that Debian is not GNU, and it is a pity that there is no Debian from Source project. We could still make a fix here, although it doesn't sound like it is going to happen. If we could roll out the entire system using i386 or eliminate cpuid from i486, this should solve. I am working on forking the toolchain, but unfortunately, I need a toolchain to build a toolchain and the toolchain is broken.








Information stored :
Bug#506481; Package general. (Sun, 02 Aug 2009 23:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Henrique de Moraes Holschuh <hmh@debian.org>:
Extra info received and filed, but not forwarded. (Sun, 02 Aug 2009 23:54:03 GMT) Full text and rfc822 format available.

Message #64 received at 506481-quiet@bugs.debian.org (full text, mbox):

From: Henrique de Moraes Holschuh <hmh@debian.org>
To: markhobley@hotpop.com
Cc: 506481-quiet@bugs.debian.org
Subject: Re: Bug#506481: [Pkg-sysvinit-devel] Bug#506481: initscripts: Fix to allow falsified cpu information in /proc/cpuinfo
Date: Sun, 2 Aug 2009 20:52:02 -0300
On Sun, 02 Aug 2009, Mark Hobley wrote:
> > It is whatever package being built.  And if it is using anything other
> > than the ARCH dpkg tells it to and giving the compiler wrong options
> > (thus overriding whatever is the default arch for the compiler), that
> > package is broken (RC-broken, in fact) and needs to be fixed.   If it is
> > not a Debian package, then it is out of our hands.

> The problem is that the entire GNU toolchain is really broken. When
> attempting to build a system for IA32, we are getting non-IA32
> instructions within the build. This is because cpuid is causing wrong
> decisions to be made. (Also glibc is broken and will not build for i386,
> which is required for compatibility with IA32).

Ok, so it is not a problem with Debian packages, which are required by
policy to either not screw with the compiler's idea of target arch to begin
with, or to tell GNU autoconf/automake/config to use the arch provided by
dpkg-architecture, or to generate sub-arch specific packages (like
foo-i686)...  and also support only i486 or higher.

ia32's i386 is not supported by Debian at all.  The libraries (including
glibc) will actively cause you problems because they were compiled with i486
opcodes, and that's it: we compile everything for i486 or newer.  If you
need i386 for something, you have to recompile EVERYTHING required from
source, as if you were bootstraping a new port.  Talk to our arch porters,
they should be able to tell you what's needed.

AFAIK, cpuid doesn't have anything to do with it.  gcc and the rest of the
toolchain doesn't use it to set its default target, or its default
parameters.  If it did, it wouldn't default to i486 on my box (which is a
i686).

GNU config (config.guess) might, though.  But if you bootstrap for i386, all
Debian packages will just override it to i386-pc-linux-gnu as required by
policy.

> I know that Debian is not GNU, and it is a pity that there is no Debian
> from Source project. We could still make a fix here, although it doesn't

Debian can be rebuilt from source entirely, but you need to bootstrap if you
want to change the subarch.  Again, talk to our porters, they have to do it
for any new arch, and it is exactly the same, you cannot use ANY of the
already-available binary packages (as they are all for i486 and later).

> sound like it is going to happen. If we could roll out the entire system
> using i386 or eliminate cpuid from i486, this should solve. I am working
> on forking the toolchain, but unfortunately, I need a toolchain to build a
> toolchain and the toolchain is broken.

Talk to our porters.  If you bootstrap correctly, and change everything
that's needed (starting with libc, gcc, binutils and dpkg's idea of what the
target arch is), it should work.

I can't help you much more than this, this is well outside my area of
expertise.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh




Reply sent to Holger Levsen <holger@layer-acht.org>:
You have taken responsibility. (Tue, 04 Aug 2009 09:24:06 GMT) Full text and rfc822 format available.

Notification sent to Mark Hobley <markhobley@yahoo.co.uk>:
Bug acknowledged by developer. (Tue, 04 Aug 2009 09:24:06 GMT) Full text and rfc822 format available.

Message #69 received at 506481-done@bugs.debian.org (full text, mbox):

From: Holger Levsen <holger@layer-acht.org>
To: 506481-done@bugs.debian.org
Subject: not a bug in debian
Date: Tue, 4 Aug 2009 11:22:26 +0200
[Message part 1 (text/plain, inline)]
Hi,

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506481#64 explains well, why 
this isn't a bug in Debian, thus closing.


regards,
	Holger
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 02 Sep 2009 07:44:40 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 07:20:49 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.