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:13:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Le 22/03/2018 à 12:07, Peter Maydell a écrit :
> On 22 March 2018 at 11:05, Peter Maydell <address@hidden> wrote:
>> On 22 March 2018 at 10:36, Laurent Vivier <address@hidden> wrote:
>>> 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.
> 
> ...in particular, kernel commit ecb101aed86156e (dated Dec 2017)
> fixes a regression introduced in commit c3350602e876 that broke
> the ppc kernels so they started returning SEGV_MAPERR here
> instead of SEGV_ACCERR. Presumably your host kernel is missing
> this fix.

Yes, you're right, my kernel is 4.14-rc1 (6e80ecd) with
c3350602e876 but without ecb101aed86156e.

I'm going to update it.

Thanks,
Laurent



reply via email to

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