qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 12/13] page_unprotect(): handle calls to pages th


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 12/13] page_unprotect(): handle calls to pages that are PAGE_WRITE
Date: Thu, 22 Mar 2018 11:05:06 +0000

On 22 March 2018 at 10:36, Laurent Vivier <address@hidden> wrote:
> Le 22/03/2018 à 02:52, Laurent Vivier a écrit :
>> It seems this patch breaks something in linux-user mode emulation for
>> m68k (32bit BE) on ppc (32bit BE).
>>
>> What I have:
>>
>>   ~/chroot$ sudo QEMU_CPU=m68040 chroot m68k/sid/
>>   I have no address@hidden:/# ls
>>   bin   debootstrap  etc       lib   qemu-m68k  run   sys  usr
>>   boot  dev      home  proc  root       sbin  tmp  var
>>   qemu: uncaught target signal 11 (Segmentation fault) - core dumped
>>   ~/chroot$
>>
>> It seems "bash" crashes on "ls" exit.
>>
>> My chroot has been installed with:
>>
>>   ARCH=m68k
>>   TARGET=sid
>>   CHROOT=$HOME/chroot/m68k/sid/
>>   REPOT=http://cdn-fastly.deb.debian.org/debian-ports/
>>   debootstrap --arch=$ARCH --foreign --variant=minbase \
>>               --no-check-gpg $TARGET $CHROOT $REPO
>>
>> I didn't investigate more.
>
> It goes wrong in this part:
>
> +     */
> +    if (is_write && info->si_signo == SIGSEGV && info->si_code ==
> SEGV_ACCERR &&
> +        h2g_valid(address)) {
>
> Because, on ppc, si_code is SEGV_MAPERR and not SEGV_ACCERR
> (on x86_64, si_code is SEGV_ACCERR as expected)

So on PPC if you have a page mapped, and you access it with
the wrong permissions, you get SEGV_MAPERR? This seems like
a host kernel bug to me.

thanks
-- PMM



reply via email to

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