Skip to contentSkip to conversation

2.4.x oops with X

DISCUSSION Andreas Hartmann 2 participants 3 messages Jan 8, 2005 – Feb 6, 2005 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Andreas Hartmann schrieb:
[...]

Quoted 11 lines

But now, the question is:
Why does X crash running kernel 2.4.x with glibc 2.3.4 and not with kernel 2.6.10? Why does X run fine using kernel 2.4 and 2.6 with glibc 2.3.3?

----------------------------------------------

	|		glibc
	|	2.3.3		2.3.4

------|-------------------------------------
kernel|
2.4 | X ok X segfaults
2.6 | X ok X ok

Meanwhile, I could find where X crashes using glibc 2.3.4 with kernel 2.4. It's this piece of code in linux_vm86.c:267

static int
vm86_rep(struct vm86_struct *ptr)

{
    int __res;
#ifdef __PIC__
    /* When compiling with -fPIC, we can't use asm constraint "b" because
       %ebx is already taken by gcc. */
    __asm__ __volatile__("pushl %%ebx\n\t"
                         "movl %2,%%ebx\n\t"
                         "movl %1,%%eax\n\t"
                         "int $0x80\n\t"
                         "popl %%ebx"
                         :"=a" (__res)
                         :"n" ((int)113), "r" ((struct vm86_struct *)ptr));
#else
    __asm__ __volatile__("int $0x80\n\t"
                         :"=a" (__res):"a" ((int)113),
                         "b" ((struct vm86_struct *)ptr));

#endif

            if (__res < 0) {
                errno = -__res;
                __res = -1;
            }
            else errno = 0;
            return __res;
}

The function ExecX86int10 (vbe.c) calls do_vm86 (linux_vm86.c), which calls vm86_rep (linux_vm86.c).

I don't understand, why this piece of assembler code works fine with glibc 2.3.3, but not with glibc 2.3.4, running kernel 2.4.x. It works fine again with kernel 2.6.

Kind regards,
Andreas Hartmann

#3 lore raw
Quoted 48 lines · Andreas Hartmann

Andreas Hartmann schrieb:
[...]

Quoted 11 lines

But now, the question is:
Why does X crash running kernel 2.4.x with glibc 2.3.4 and not with kernel 2.6.10? Why does X run fine using kernel 2.4 and 2.6 with glibc 2.3.3?

----------------------------------------------

	|		glibc
	|	2.3.3		2.3.4

------|-------------------------------------
kernel|
2.4 | X ok X segfaults
2.6 | X ok X ok

Meanwhile, I could find where X crashes using glibc 2.3.4 with kernel 2.4. It's this piece of code in linux_vm86.c:267

static int
vm86_rep(struct vm86_struct *ptr)

{
    int __res;
#ifdef __PIC__
    /* When compiling with -fPIC, we can't use asm constraint "b" because
       %ebx is already taken by gcc. */
    __asm__ __volatile__("pushl %%ebx\n\t"
                         "movl %2,%%ebx\n\t"
                         "movl %1,%%eax\n\t"
                         "int $0x80\n\t"
                         "popl %%ebx"
                         :"=a" (__res)
                         :"n" ((int)113), "r" ((struct vm86_struct *)ptr));
#else
    __asm__ __volatile__("int $0x80\n\t"
                         :"=a" (__res):"a" ((int)113),
                         "b" ((struct vm86_struct *)ptr));

#endif

            if (__res < 0) {
                errno = -__res;
                __res = -1;
            }
            else errno = 0;
            return __res;
}
Quoted 7 lines

The function ExecX86int10 (vbe.c) calls do_vm86 (linux_vm86.c), which calls vm86_rep (linux_vm86.c).

I don't understand, why this piece of assembler code works fine with glibc 2.3.3, but not with glibc 2.3.4, running kernel 2.4.x. It works fine again with kernel 2.6.

No idea either - the oops should be gone in -rc2 now that the get_user_pages() debugging patch has been reverted.

#4 lore raw
In reply to a message not in the archive
Quoted 48 lines · Andreas Hartmann

Andreas Hartmann wrote:
[...]

Quoted 11 lines

But now, the question is:
Why does X crash running kernel 2.4.x with glibc 2.3.4 and not with kernel 2.6.10? Why does X run fine using kernel 2.4 and 2.6 with glibc 2.3.3?

----------------------------------------------

	|		glibc
	|	2.3.3		2.3.4

------|-------------------------------------
kernel|
2.4 | X ok X segfaults
2.6 | X ok X ok

Meanwhile, I could find where X crashes using glibc 2.3.4 with kernel 2.4. It's this piece of code in linux_vm86.c:267

static int
vm86_rep(struct vm86_struct *ptr)

{
    int __res;
#ifdef __PIC__
    /* When compiling with -fPIC, we can't use asm constraint "b" because
       %ebx is already taken by gcc. */
    __asm__ __volatile__("pushl %%ebx\n\t"
                         "movl %2,%%ebx\n\t"
                         "movl %1,%%eax\n\t"
                         "int $0x80\n\t"
                         "popl %%ebx"
                         :"=a" (__res)
                         :"n" ((int)113), "r" ((struct vm86_struct *)ptr));
#else
    __asm__ __volatile__("int $0x80\n\t"
                         :"=a" (__res):"a" ((int)113),
                         "b" ((struct vm86_struct *)ptr));

#endif

            if (__res < 0) {
                errno = -__res;
                __res = -1;
            }
            else errno = 0;
            return __res;
}
Quoted 7 lines

The function ExecX86int10 (vbe.c) calls do_vm86 (linux_vm86.c), which calls vm86_rep (linux_vm86.c).

I don't understand, why this piece of assembler code works fine with glibc 2.3.3, but not with glibc 2.3.4, running kernel 2.4.x. It works fine again with kernel 2.6.

Solution for this problem can be found meanwhile at
https://bugs.freedesktop.org/show_bug.cgi?id=2431

Kind regards,
Andreas Hartmann