This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Re: domU: 32-bit emulation seems to be broken

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: domU: 32-bit emulation seems to be broken
From: Milan Holzäpfel <listen@xxxxxxxx>
Date: Tue, 11 Aug 2009 09:36:44 +0200
Delivery-date: Tue, 11 Aug 2009 00:37:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200908101459.31377.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: mjh.name
References: <gpe0vg$j67$1@xxxxxxxxxxxxx> <49BFD56B.1040003@xxxxxxxx> <20090810132121.3859d865.listen@xxxxxxxx> <200908101459.31377.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 10 Aug 2009 14:59:31 +0200
Christoph Egger <Christoph.Egger@xxxxxxx> wrote:

> On Monday 10 August 2009 13:21:21 Milan Holzäpfel wrote:
> > On Tue, 17 Mar 2009 09:52:59 -0700
> >
> > Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> > > Sven Köhler wrote:
> > > > Jeremy Fitzhardinge schrieb:
> > > >> I need to find/set up an AMD system to try to repro it I think.  I
> > > >> think the problem is actually the return from the syscall, rather than
> > > >> the syscall entry itself.  What happens if you run the program under
> > > >> either strace or gdb?
> > > >
> > > > The program just works:
> > > >
> > > > # strace ./a.out
> > > > [...]
> > >
> > > OK, that confirms that its sysret32 that's failing.  vdso32=0 on the
> > > kernel command line should be the workaround until we've got a proper
> > > fix.
> >
> > Hi,
> >
> > I still notice this problem with vanilla domU under Xen 3.3.2
> > (32 bit binaries on a 64 bit domU kernel segfault, AMD CPU).  vdso32=0
> > still helps.
> >
> > Any news?
> What does Linux use w/o vdso32=0 on your box ? Does it use sysenter, syscall
> or int 0x80 ?

I'm not quite sure.  I collected the same gdb output as Sven Köhler did
in March, see below. 

> Do you boot the DomU directly or does this happen after migration from
> an Intel box ?

The DomU was booted directly on the AMD CPU, no migration was used. 

Here's the GDB output:

server64d ~ # uname -a
Linux server64d #1 SMP Mon Aug 10 12:25:11 CEST 2009 x86_64 AMD 
Athlon(tm) X2 Dual Core Processor BE-2400 AuthenticAMD GNU/Linux
server64d ~ # cat test1.c 
#include <stdio.h>
int main() {
  printf("Hello, World\n");

server64d ~ # gcc -g -m32 test1.c -o test1
server64d ~ # ulimit -c unlimited
server64d ~ # rm -f core 
server64d ~ # ./test1
Segmentation fault (core dumped)
server64d ~ # dmesg | grep ip:
[  102.223656] test1[2313] general protection ip:ffffe42f sp:ffdb0dc0 error:0
[  265.468057] test1[2318] general protection ip:ffffe42f sp:ffec3880 error:0
[  758.153330] test1[11120] general protection ip:ffffe42f sp:ffe7ea20 error:0
[  791.662222] test1[11129] general protection ip:ffffe42f sp:ff9a5990 error:0
[ 1188.283930] test1[11136] general protection ip:ffffe42f sp:ffb06650 error:0
server64d ~ # gdb test1 core 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Loaded symbols for /root/test1
Reading symbols from /lib32/libc.so.6...done.
Loaded symbols for /lib32/libc.so.6
Reading symbols from /lib64/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./test1'.
Program terminated with signal 11, Segmentation fault.
[New process 11136]
#0  0xffffe42f in __kernel_vsyscall ()
(gdb) x/i 0xffffe42f
0xffffe42f <__kernel_vsyscall+15>:      ret    
(gdb) x/i $eip-2
0xffffe42d <__kernel_vsyscall+13>:      jmp    0x2e00a78f
(gdb) x/30i __kernel_vsyscall
0xffffe420 <__kernel_vsyscall>: push   %ebp
0xffffe421 <__kernel_vsyscall+1>:       mov    %ecx,%ebp
0xffffe423 <__kernel_vsyscall+3>:       syscall 
0xffffe425 <__kernel_vsyscall+5>:       mov    $0x2b,%ecx
0xffffe42a <__kernel_vsyscall+10>:      mov    %ecx,%ss
0xffffe42c <__kernel_vsyscall+12>:      mov    %ebp,%ecx
0xffffe42e <__kernel_vsyscall+14>:      pop    %ebp
0xffffe42f <__kernel_vsyscall+15>:      ret    
0xffffe430:     add    %ch,(%esi)
0xffffe432:     jae    0xffffe49c
0xffffe434:     jae    0xffffe4aa
0xffffe436:     jb     0xffffe4ac
0xffffe438:     popa   
0xffffe439:     bound  %eax,(%eax)
0xffffe43b:     cs
0xffffe43c:     push   $0x687361
0xffffe441:     cs
0xffffe442:     fs
0xffffe443:     jns    0xffffe4b3
0xffffe445:     jae    0xffffe4c0
0xffffe447:     insl   (%dx),%es:(%edi)
0xffffe448:     add    %ch,(%esi)
0xffffe44a:     fs
0xffffe44b:     jns    0xffffe4bb
0xffffe44d:     jae    0xffffe4c3
0xffffe44f:     jb     0xffffe451
0xffffe451:     addr16 outsb %cs:(%si),(%dx)
0xffffe454:     jne    0xffffe484
0xffffe456:     jbe    0xffffe4bd
0xffffe458:     jb     0xffffe4cd
(gdb) quit
server64d ~ # 


Attachment: pgpbAo7rjCodv.pgp
Description: PGP signature

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>