From: Milan =?ISO-8859-1?Q?Holz=E4pfel?= Subject: Re: Re: 2.6.28.7 domU: 32-bit emulation seems to be broken Date: Tue, 11 Aug 2009 09:36:44 +0200 Message-ID: <20090811093644.ceacb1af.listen@mjh.name> References: <49BFD56B.1040003@goop.org> <20090810132121.3859d865.listen@mjh.name> <200908101459.31377.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0722793001==" Return-path: In-Reply-To: <200908101459.31377.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0722793001== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__11_Aug_2009_09_36_44_+0200_pr1pVt3/2Xlsde5u" --Signature=_Tue__11_Aug_2009_09_36_44_+0200_pr1pVt3/2Xlsde5u Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 10 Aug 2009 14:59:31 +0200 Christoph Egger wrote: > On Monday 10 August 2009 13:21:21 Milan Holz=E4pfel wrote: > > On Tue, 17 Mar 2009 09:52:59 -0700 > > > > Jeremy Fitzhardinge wrote: > > > Sven K=F6hler 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 und= er > > > >> either strace or gdb? > > > > > > > > The program just works: > > > > > > > > # strace ./a.out > > > > [...] > > > > > > OK, that confirms that its sysret32 that's failing. vdso32=3D0 on the > > > kernel command line should be the workaround until we've got a proper > > > fix. > > > > Hi, > > > > I still notice this problem with vanilla 2.6.30.4 domU under Xen 3.3.2 > > (32 bit binaries on a 64 bit domU kernel segfault, AMD CPU). vdso32=3D0 > > still helps. > > > > Any news? >=20 > What does Linux use w/o vdso32=3D0 on your box ? Does it use sysenter, sy= scall > or int 0x80 ? I'm not quite sure. I collected the same gdb output as Sven K=F6hler did in March, see below.=20 > 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.=20 Here's the GDB output: server64d ~ # uname -a Linux server64d 2.6.30.4-9nfs #1 SMP Mon Aug 10 12:25:11 CEST 2009 x86_64 A= MD Athlon(tm) X2 Dual Core Processor BE-2400 AuthenticAMD GNU/Linux server64d ~ # cat test1.c=20 #include int main() { printf("Hello, World\n"); } server64d ~ # gcc -g -m32 test1.c -o test1 server64d ~ # ulimit -c unlimited server64d ~ # rm -f core=20 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 erro= r:0 [ 791.662222] test1[11129] general protection ip:ffffe42f sp:ff9a5990 erro= r:0 [ 1188.283930] test1[11136] general protection ip:ffffe42f sp:ffb06650 erro= r:0 server64d ~ # gdb test1 core=20 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 =20 (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=20 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 =20 0xffffe430: add %ch,(%esi) 0xffffe432: jae 0xffffe49c 0xffffe434: jae 0xffffe4aa 0xffffe436: jb 0xffffe4ac 0xffffe438: popa =20 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 ~ #=20 Regards, Milan --Signature=_Tue__11_Aug_2009_09_36_44_+0200_pr1pVt3/2Xlsde5u Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iQIcBAEBAgAGBQJKgR+TAAoJECS5zg5RbO7vFsoP/3AAC3GupFAs3iJVZDHbMpau xJcsB3OtikTgA/+s3vYYz3FVYMV1BfgGphEPHWgGtYEEikQanHrwnRd4AKqjZfcI Pg9FeuDxQgbiXaKmGlQTiQGtO3TJccfa2aVszTUrW5Z3/eglDVYn686L1KTG1Hxr ivHyVzbwluUZY/8xzdp7OfeLix4OzFkZveyRKYyAp6iyd5c4HnwvWCiBOI0s43x8 G5PHQv6p8Fw5yHhY0c9O4bQRU7lb16E66XiDsebeJNIJZ+oduzoC8S+3nICnFgeO LKdytdd4tbgZz1XjNyGwRveooRHENP4c7caVyKFzXavQHpq4WIog+iOYr17jWiMS h8uME5QDUEntk9XVNqKDaXo/MzdspHGLxoNXeifUO9PXnc4WdgpO//1Jt5p1a0Ah 9M4kYd9eZVGN6iBDoDgbn3L+2Mb872i6Iev08OKpjD59Oe3sifSEdgyj9NDso/1y gRIHA9bu3eIM4n3vnpvADxHpCgpfPx4iZBkAjJlDi2T5icxCr2r4LlekJdxSGraS ICmKVxG8bG+8xjRlCDhBX29pdR/90vKKCCAKrVJ0vHnA5UA9tT1x88Vv+ZqlmWiu PggAxbqCgwuMGtpKG3Bmb0MUVRlz8Y6GiRUf34Y4uL/d5Y1xhQralPOfT/Zsx0pO lSVMIHblaT2Go1fw7pzo =kAyY -----END PGP SIGNATURE----- --Signature=_Tue__11_Aug_2009_09_36_44_+0200_pr1pVt3/2Xlsde5u-- --===============0722793001== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0722793001==--