From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/lpar: Don't crash on H_PROTECT errors
Date: Tue, 01 Mar 2016 10:57:09 +0530 [thread overview]
Message-ID: <871t7urcnm.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <56D476DD.9060402@linux.vnet.ibm.com>
Tyrel Datwyler <tyreld@linux.vnet.ibm.com> writes:
> On 02/29/2016 03:52 AM, Anshuman Khandual wrote:
>> There are certain condition in which H_PROTECT can return error code
>> other than H_NOT_FOUND and H_SUCCESS. One such being an attempt to
>> update an hpte owned by adjunct partition. Return 0 in that case so
>> that user space will retry the access. In adjunct case this mean we
>> will not make much progress in the user space. But atleast we get a
>> chance to kill the task and avoid taking down the entire box.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/platforms/pseries/lpar.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
>> index 477290a..31bcdaf 100644
>> --- a/arch/powerpc/platforms/pseries/lpar.c
>> +++ b/arch/powerpc/platforms/pseries/lpar.c
>> @@ -310,7 +310,7 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
>>
>> pr_devel("ok\n");
>>
>> - BUG_ON(lpar_rc != H_SUCCESS);
>> + WARN_RATELIMIT(lpar_rc != H_SUCCESS, "H_PROTECT returned %lu\n", lpar_rc);
>
> In the event that we don't get H_NOT_FOUND (which is handled earlier in
> the function) or H_SUCCESS this patch assumes H_RESOURCE. It fails to
> handle H_PARAMETER which is also a valid return from the H_PROTECT
> hypercall.
One of the possible thing we could do is sent SIGBUS to the application
rather than taking down the system ?
-aneesh
next prev parent reply other threads:[~2016-03-01 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 11:52 [PATCH] powerpc/lpar: Don't crash on H_PROTECT errors Anshuman Khandual
2016-02-29 16:50 ` Tyrel Datwyler
2016-03-01 4:34 ` Anshuman Khandual
2016-03-01 5:27 ` Aneesh Kumar K.V [this message]
2016-03-01 5:46 ` Anshuman Khandual
2016-02-29 23:01 ` Michael Ellerman
2016-03-01 5:27 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871t7urcnm.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tyreld@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.