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: Laurent Vivier
Subject: Re: [Qemu-devel] [PULL 12/13] page_unprotect(): handle calls to pages that are PAGE_WRITE
Date: Thu, 22 Mar 2018 12:07:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Le 22/03/2018 à 12:05, Peter Maydell a écrit :
> 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.

Are we sure it is mapped? How to know?
otherwise yes, it sounds like a kernel bug.

Thanks,
Laurent






reply via email to

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