Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-08-30 Thread Bastian Blank
Hi folks I upgraded one of my 32bit chroots on a x86-64 machine runing under Xen lately. All binaries started to segfault. Some extensive checks later show the vdso as the culprit. Later I found with the same problem. The full story can be found in the Debian bug 544145[1]. It happens with Linux

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-03 Thread Jeremy Fitzhardinge
On 08/30/09 11:16, Bastian Blank wrote: > Hi folks > > I upgraded one of my 32bit chroots on a x86-64 machine runing under Xen > lately. All binaries started to segfault. Some extensive checks later > show the vdso as the culprit. Later I found > with the same problem. The full story can be found

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-03 Thread Bastian Blank
On Thu, Sep 03, 2009 at 01:51:35PM -0700, Jeremy Fitzhardinge wrote: > On 08/30/09 11:16, Bastian Blank wrote: > > I upgraded one of my 32bit chroots on a x86-64 machine runing under Xen > > lately. All binaries started to segfault. Some extensive checks later > > show the vdso as the culprit. Late

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-03 Thread Bastian Blank
On Thu, Sep 03, 2009 at 03:06:32PM -0700, Jeremy Fitzhardinge wrote: > On 09/03/09 15:02, Bastian Blank wrote: > > AFAIK only AMD support the syscall instruction, so yes it is an AMD > > machine. And yes, disabling the only thing that make the glibc call this > > instruction works around it. > The

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-03 Thread Jeremy Fitzhardinge
On 09/03/09 15:02, Bastian Blank wrote: > AFAIK only AMD support the syscall instruction, so yes it is an AMD > machine. And yes, disabling the only thing that make the glibc call this > instruction works around it. > The bug actually appears to be in xen_sysret32, ie the crash happens on the w

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-04 Thread Bastian Blank
On Fri, Sep 04, 2009 at 09:07:39AM -0700, Jeremy Fitzhardinge wrote: > But for some reason that's triggering a failsafe callback, which invokes > a GP. Hmm, not in my tests. It always returned to userspace correctly and died some operations later, usually the "ret". This then produced either a seg

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-04 Thread Jeremy Fitzhardinge
On 09/03/09 15:36, Bastian Blank wrote: > This function looks weird. It tries to restores the user code segment. > But the documentation from AMD explicitely stat that the CS and SS are > restored from the STAR register. And STAR is always set with: wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 |

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-04 Thread Bastian Blank
On Fri, Sep 04, 2009 at 09:07:39AM -0700, Jeremy Fitzhardinge wrote: > On 09/03/09 15:36, Bastian Blank wrote: > > This function looks weird. It tries to restores the user code segment. > > But the documentation from AMD explicitely stat that the CS and SS are > > restored from the STAR register. >

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-04 Thread Jeremy Fitzhardinge
On 09/04/09 09:20, Bastian Blank wrote: > On Fri, Sep 04, 2009 at 09:07:39AM -0700, Jeremy Fitzhardinge wrote: > >> But for some reason that's triggering a failsafe callback, which invokes >> a GP. >> > Hmm, not in my tests. It always returned to userspace correctly and died > some operatio

Bug#544145: 32bit binaries on x86_64/Xen segfaults in syscall-vdso

2009-09-04 Thread Bastian Blank
On Fri, Sep 04, 2009 at 07:46:05PM +0200, Bastian Blank wrote: > On Fri, Sep 04, 2009 at 09:07:39AM -0700, Jeremy Fitzhardinge wrote: > > On 09/03/09 15:36, Bastian Blank wrote: > > > This function looks weird. It tries to restores the user code segment. > > > But the documentation from AMD explici