qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Armv5 target


From: Paul Brook
Subject: Re: [Qemu-devel] Armv5 target
Date: Wed, 2 Feb 2005 15:47:24 +0000
User-agent: KMail/1.7.2

On Wednesday 02 February 2005 12:01, Lennert Buytenhek wrote:
> On Wed, Feb 02, 2005 at 01:26:37AM +0000, Paul Brook wrote:
> > > > +    /* XXX: locking issue */
> > > > +    if (is_write && page_unprotect(address, pc, puc)) {
> > > > +        return 1;
> > > > +    }
> > > >      /* XXX: do more */
> > > >      return 0;
> > > >  }
> > >
> > > Sort of. Self-modifying code (e.g. stack trampolines) are still broken,
> > > and the patch above should work.
> > >
> > > However I just tested it and it doesn't seem to work any more. It seems
> > > that the SEGV handler is being passed an address of 0, rather than the
> > > actual faulting location.
> > >
> > > This may be a host kernel/libc bug.
> >
> > I just tried on a few different machines, and this is a host kernel bug
> > specific to one particular kernel (custom 2.6.9).
>
> Do you have some example code that demonstrates this?

I've attached two programs. segv-test.c tests for the kernel bug. nest_test.c 
tests stack trampolines, which exposes the bug then run inside qemu-user.

Note that the proper fix for arm is to remove the ||1 hack on the 
TARGET_HAS_SMC tests in exec.c. Comments indicate this hack is to work around 
bugs in the PPC emulation.

Paul

Attachment: segv_test.c
Description: Text Data

Attachment: nest_test.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]