public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Mete Durlu <meted@linux.ibm.com>,
	kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: fix sthyi error handling
Date: Fri, 28 Jul 2023 11:14:11 +0200	[thread overview]
Message-ID: <20230728091411.6761-A-hca@linux.ibm.com> (raw)
In-Reply-To: <7fadab86-2b7c-b934-fcfa-61046c0778b6@linux.ibm.com>

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.

  reply	other threads:[~2023-07-28 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 18:29 [PATCH] KVM: s390: fix sthyi error handling Heiko Carstens
2023-07-28  7:28 ` Christian Borntraeger
2023-07-28  9:14   ` Heiko Carstens [this message]
2023-07-28 14:29     ` Christian Borntraeger

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=20230728091411.6761-A-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=meted@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox