Skip to contentSkip to conversation

2.6.17-mm1

PATCH New Martin Bligh 5 participants 10 messages Jun 21, 2006

lore
Share & tools
lore
#0 lore raw

Seems to dive into an endless loop in compile.

http://test.kernel.org/abat/37068/debug/test.log.0

  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  SYMLINK usr/include/asm -> include/asm-x86_64
  GEN     usr/klibc/syscalls/SYSCALLS.i
  GEN     usr/klibc/syscalls/syscalls.nrs
  GEN     usr/klibc/syscalls/typesize.c

KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin
GEN usr/klibc/syscalls/syscalls.mk
GEN usr/klibc/syscalls/typesize.c
KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin
GEN usr/klibc/syscalls/syscalls.mk
GEN usr/klibc/syscalls/typesize.c
KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin
GEN usr/klibc/syscalls/syscalls.mk
GEN usr/klibc/syscalls/typesize.c
KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin
GEN usr/klibc/syscalls/syscalls.mk
GEN usr/klibc/syscalls/typesize.c
KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin
GEN usr/klibc/syscalls/syscalls.mk

etc etc. for ever.

On both x86_64 and ppc64.

M.

#1 lore raw
Quoted 17 lines · Martin Bligh

Seems to dive into an endless loop in compile.

http://test.kernel.org/abat/37068/debug/test.log.0

  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  SYMLINK usr/include/asm -> include/asm-x86_64
  GEN     usr/klibc/syscalls/SYSCALLS.i
  GEN     usr/klibc/syscalls/syscalls.nrs
  GEN     usr/klibc/syscalls/typesize.c

KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin

[...]

Quoted 3 lines

etc etc. for ever.

On both x86_64 and ppc64.

me too, on 586

.config is here: http://oioio.altervista.org/linux/config-2.6.17-mm1

Signature · 2 lines
mattia
:wq!
#2 lore raw
Quoted 18 lines · Mattia Dongili
Quoted 15 lines · Martin Bligh

Seems to dive into an endless loop in compile.

http://test.kernel.org/abat/37068/debug/test.log.0

  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  SYMLINK usr/include/asm -> include/asm-x86_64
  GEN     usr/klibc/syscalls/SYSCALLS.i
  GEN     usr/klibc/syscalls/syscalls.nrs
  GEN     usr/klibc/syscalls/typesize.c
Quoted 2 lines

KLIBCCC usr/klibc/syscalls/typesize.o
OBJCOPY usr/klibc/syscalls/typesize.bin

Quoted 8 lines

[...]

Quoted 3 lines

etc etc. for ever.

On both x86_64 and ppc64.

me too, on 586

.config is here: http://oioio.altervista.org/linux/config-2.6.17-mm1

I've uploaded the patch for this to:

http://www.kernel.org/pub/linux/kernel/people/hpa/klibc-2.6.17-mm1-circdep.patch

The klibc tree has additional fixes in it.

-hpa

#3 lore raw

fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

Quoted 1 line · H. Peter Anvin

Mattia Dongili wrote:

[...]

Quoted 7 lines
Quoted 1 line

.config is here: http://oioio.altervista.org/linux/config-2.6.17-mm1

I've uploaded the patch for this to:

http://www.kernel.org/pub/linux/kernel/people/hpa/klibc-2.6.17-mm1-circdep.patch

The klibc tree has additional fixes in it.

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Same .config as above

Signature · 2 lines
mattia
:wq!
#4 lore raw

Re: fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

Quoted 8 lines · On Wed, 21 Jun 2006 21:39:32 +0200 Mattia Dongili <[email protected]> wrote:

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o
Quoted 4 lines

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

#5 lore raw

Re: fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

Quoted 16 lines · Andrew Morton
Quoted 8 lines · On Wed, 21 Jun 2006 21:39:32 +0200 Mattia Dongili <[email protected]> wrote:

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o
Quoted 4 lines

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Quoted 2 lines

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

I can't really tell which is the relevant part other than line 160 :) Full file available here:
http://oioio.altervista.org/linux/binfmt_aout.s

gcc is:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu Thread model: posix
gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)

Signature · 2 lines
mattia
:wq!
#6 lore raw

Re: fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

Quoted 17 lines · On Wed, 21 Jun 2006 23:16:17 +0200 Mattia Dongili <[email protected]> wrote:
Quoted 16 lines · Andrew Morton
Quoted 12 lines · On Wed, 21 Jun 2006 21:39:32 +0200 Mattia Dongili <[email protected]> wrote:

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Quoted 7 lines
Quoted 2 lines

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

I can't really tell which is the relevant part other than line 160 :) Full file available here:
http://oioio.altervista.org/linux/binfmt_aout.s

It's complaining about this:

#APP

        addl %ecx,%eax ; sbbl %edx,%edx; cmpl %eax,$-1073741824; sbbl $0,%edx   # dump.u_dsize, sum, flag,

#NO_APP

from fs/binfmt_aout.c:154:

if (!access_ok(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
dump.u_dsize = 0;
if (!access_ok(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
dump.u_ssize = 0;

the offending code comes from __range_ok()

Mad guess: does reverting ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch help?

#7 lore raw

Re: fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

Quoted 26 lines · Andrew Morton
Quoted 16 lines · On Wed, 21 Jun 2006 23:16:17 +0200 Mattia Dongili <[email protected]> wrote:
Quoted 15 lines · Andrew Morton
Quoted 12 lines · On Wed, 21 Jun 2006 21:39:32 +0200 Mattia Dongili <[email protected]> wrote:

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Quoted 6 lines
Quoted 2 lines

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

I can't really tell which is the relevant part other than line 160 :) Full file available here:
http://oioio.altervista.org/linux/binfmt_aout.s

Quoted 5 lines

It's complaining about this:

#APP

        addl %ecx,%eax ; sbbl %edx,%edx; cmpl %eax,$-1073741824; sbbl $0,%edx   # dump.u_dsize, sum, flag,

#NO_APP

The cmpl should have its arguments reversed. It's quite possible some versions of the assembler accepts the form given, but they're wrong (and doubly confusing when used as input to sbb.)

-hpa

#8 lore raw

Re: fs/binfmt_aout.o, Error: suffix or operands invalid for `cmp' [was Re: 2.6.17-mm1]

In reply to Andrew Morton
Quoted 34 lines · Andrew Morton
Quoted 17 lines · On Wed, 21 Jun 2006 23:16:17 +0200 Mattia Dongili <[email protected]> wrote:
Quoted 16 lines · Andrew Morton
Quoted 12 lines · On Wed, 21 Jun 2006 21:39:32 +0200 Mattia Dongili <[email protected]> wrote:

Thanks, this is fixed, but I have a new failure:

  CC [M]  fs/xfs/support/move.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  CC      fs/dnotify.o
  CC      fs/dcookies.o
  LD      fs/built-in.o
  CC [M]  fs/binfmt_aout.o

{standard input}: Assembler messages:
{standard input}:160: Error: suffix or operands invalid for `cmp' make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Quoted 7 lines
Quoted 2 lines

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

I can't really tell which is the relevant part other than line 160 :) Full file available here:
http://oioio.altervista.org/linux/binfmt_aout.s

It's complaining about this:

#APP

        addl %ecx,%eax ; sbbl %edx,%edx; cmpl %eax,$-1073741824; sbbl $0,%edx   # dump.u_dsize, sum, flag,

#NO_APP

Quoted 8 lines

from fs/binfmt_aout.c:154:

if (!access_ok(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
dump.u_dsize = 0;
if (!access_ok(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
dump.u_ssize = 0;

the offending code comes from __range_ok()

thanks for the explanation!

Quoted 3 lines

Mad guess: does reverting ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch help?

yes, I didn't build the full kernel but a simple

make fs/binfmt_aout.o

is finally successful.

Signature · 2 lines
mattia
:wq!
#9 lore raw

PATCH 1/1 fix __range_ok constraint

In reply to Andrew Morton

Hi,

Quoted 2 lines · Andrew Morton

what the heck? Can you do `make fs/binfmt_aout.s' then send the relevant parts of that file?

I've hit this too, I haven't booted with the patch yet, but it should be simple enough to be safe.

bye, Roman

An immediate operand can't be the destination of the cmpl instruction, so exclude it.

---
 include/asm-i386/uaccess.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-i386/uaccess.h +1 -1
Index: linux-2.6-mm/include/asm-i386/uaccess.h
===================================================================
@@ -58,7 +58,7 @@ extern struct movsl_mask {
 	__chk_user_ptr(addr); \
 	asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
 		:"=&r" (flag), "=r" (sum) \
-		:"1" (addr),"g" ((int)(size)),"g" (current_thread_info()->addr_limit.seg)); \
+		:"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
 	flag; })
 
 /**