[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1c767675-3ab6-8e4b-e92e-e408b19e1c49@linux.ibm.com>
Date: Fri, 28 Jul 2023 16:29:14 +0200
From: Christian Borntraeger <borntraeger@...ux.ibm.com>
To: Heiko Carstens <hca@...ux.ibm.com>
Cc: Janosch Frank <frankja@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>,
Mete Durlu <meted@...ux.ibm.com>, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: s390: fix sthyi error handling
Am 28.07.23 um 11:14 schrieb Heiko Carstens:
> On Fri, Jul 28, 2023 at 09:28:58AM +0200, Christian Borntraeger wrote:
>> Am 27.07.23 um 20:29 schrieb Heiko Carstens:
>>> Commit 9fb6c9b3fea1 ("s390/sthyi: add cache to store hypervisor info")
>>> added cache handling for store hypervisor info. This also changed the
>>> possible return code for sthyi_fill().
>>>
>>> Instead of only returning a condition code like the sthyi instruction would
>>> do, it can now also return a negative error value (-ENOMEM). handle_styhi()
>>> was not changed accordingly. In case of an error, the negative error value
>>> would incorrectly injected into the guest PSW.
>>>
>>> Add proper error handling to prevent this, and update the comment which
>>> describes the possible return values of sthyi_fill().
>>
>> To me it looks like this can only happen if page allocation fails? This should
>> not happen in normal cases (and return -ENOMEM would likely kill the guest as
>> QEMU would stop).
>> But if it happens we better stop.
>
> Yes, no reason for any stable backports. But things might change in the
> future, so we better have correct error handling in place.
Feel free to carry via the s390 tree.
Powered by blists - more mailing lists