maybe yet another AMD bug? Re: crashme & 2.1.104pre1: oops in restore_sigcontext

Andrea Arcangeli (arcangeli@mbox.queen.it)
Wed, 3 Jun 1998 01:08:25 +0200 (CEST)


On Tue, 2 Jun 1998, Meelis Roos wrote:

>>>EIP: c0108c5e <restore_sigcontext+3e/228>
>Trace: c0108f07 <sys_sigreturn+bf/d4>
>Trace: c0109824 <system_call+38/3c>
>Code: c0108c5e <restore_sigcontext+3e/228>
>Code: c0108c5e <restore_sigcontext+3e/228> 8e e9 movw %cx,%gs
>Code: c0108c60 <restore_sigcontext+40/228> 31 c0 xorl %eax,%eax
>Code: c0108c62 <restore_sigcontext+42/228> 66 8b 53 04 movw 0x4(%ebx),%dx
>Code: c0108c66 <restore_sigcontext+46/228> 81 e2 ff ff 00 andl $0xffff,%edx
>Code: c0108c72 <restore_sigcontext+52/228> 89 54 24 10 movl %edx,0x10(%esp,1)
>Code: c0108c76 <restore_sigcontext+56/228> 66 f7 00 90 90 testw $0x9090,(%eax)
>Code: c0108c81 <restore_sigcontext+61/228> 90 nop

The Oops happened in the underlined line:

#define GET_SEG(seg) \
{ __get_user(tmp, &sc->seg); \
if ((tmp & 0xfffc) /* not a NULL selectors */ \
&& (tmp & 0x4) != 0x4 /* not a LDT selector */ \
&& (tmp & 3) != 3) /* not a RPL3 GDT selector */ \
goto badframe; \
__asm__ __volatile__("movl %w0,%%" #seg : : "r"(tmp)); }
^^^^^^^^^^^

GET_SEG(gs);
2c3: 31 c0 xorl %eax,%eax
2c5: 66 8b 13 movw (%ebx),%dx
2c8: 81 e2 ff ff 00 andl $0xffff,%edx
2cd: 00
2ce: 89 54 24 10 movl %edx,0x10(%esp,1)
2d2: 66 f7 44 24 10 testw $0xfffc,0x10(%esp,1)
2d7: fc ff
2d9: 74 13 je 2ee <restore_sigcontext+0x3a>
2db: f6 c2 04 testb $0x4,%dl
2de: 75 0e jne 2ee <restore_sigcontext+0x3a>
2e0: 89 d0 movl %edx,%eax
2e2: 83 e0 03 andl $0x3,%eax
2e5: 83 f8 03 cmpl $0x3,%eax
2e8: 0f 85 e6 01 00 jne 4d4 <restore_sigcontext+0x220>
2ed: 00
2ee: 8b 4c 24 10 movl 0x10(%esp,1),%ecx
2f2: 8e e9 movl %ecx,%gs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Your CPU EFLAGS _active_ state were:

- RESUME FLAG
- INTERRUPTS ENABLED

Sometimes were set also the:

- ALIGNMENT CHECK
- PARITY FLAG
- DIRECTION FLAG

%cx was 0x5.

With my Intel(/AMD) knowledge if can' say if it' s a CPU bug but these
information may be enough to understand that. Anyway it seems that
`crashme' (I never tried or seen it though) is more useful to find bugs in
AMD chips instead of in Linux ;-).

Also I don' t understand why my objdump print movl instead of movw ?!?!
but this is not related to your problem of course.

Andrea[s] Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu