All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/1] KVM: s390: Fix for 6.9
@ 2024-05-07 12:29 Christian Borntraeger
  2024-05-07 12:29 ` [GIT PULL 1/1] KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M Christian Borntraeger
  2024-05-07 17:01 ` [GIT PULL 0/1] KVM: s390: Fix for 6.9 Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2024-05-07 12:29 UTC (permalink / raw
  To: Paolo Bonzini
  Cc: KVM, Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	linux-s390, Christian Borntraeger, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Thomas Huth, Jean-Philippe Brucker

Paolo,

one fix for s390.

The following changes since commit 16c20208b9c2fff73015ad4e609072feafbf81ad:

  Merge tag 'kvmarm-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (2024-04-30 13:50:55 -0400)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-6.9-1

for you to fetch changes up to 175f2f5bcdfce9e728f1ff956a50f28824d28791:

  KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M (2024-05-02 09:41:38 +0200)

----------------------------------------------------------------
KVM: s390: Fix for 6.9

Fix wild read on capability check.

----------------------------------------------------------------
Jean-Philippe Brucker (1):
      KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M

 arch/s390/kvm/kvm-s390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [GIT PULL 1/1] KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
  2024-05-07 12:29 [GIT PULL 0/1] KVM: s390: Fix for 6.9 Christian Borntraeger
@ 2024-05-07 12:29 ` Christian Borntraeger
  2024-05-07 17:01 ` [GIT PULL 0/1] KVM: s390: Fix for 6.9 Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2024-05-07 12:29 UTC (permalink / raw
  To: Paolo Bonzini
  Cc: KVM, Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	linux-s390, Christian Borntraeger, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Thomas Huth, Jean-Philippe Brucker

From: Jean-Philippe Brucker <jean-philippe@linaro.org>

KVM allows issuing the KVM_CHECK_EXTENSION ioctl either on the /dev/kvm
fd or the VM fd. In the first case, kvm_vm_ioctl_check_extension() is
called with kvm==NULL. Ensure we don't dereference the pointer in that
case.

Fixes: 40ebdb8e59df ("KVM: s390: Make huge pages unavailable in ucontrol VMs")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Message-ID: <20240419160723.320910-2-jean-philippe@linaro.org>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 5147b943a864..7721eb522f43 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -587,7 +587,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		break;
 	case KVM_CAP_S390_HPAGE_1M:
 		r = 0;
-		if (hpage && !kvm_is_ucontrol(kvm))
+		if (hpage && !(kvm && kvm_is_ucontrol(kvm)))
 			r = 1;
 		break;
 	case KVM_CAP_S390_MEM_OP:
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [GIT PULL 0/1] KVM: s390: Fix for 6.9
  2024-05-07 12:29 [GIT PULL 0/1] KVM: s390: Fix for 6.9 Christian Borntraeger
  2024-05-07 12:29 ` [GIT PULL 1/1] KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M Christian Borntraeger
@ 2024-05-07 17:01 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2024-05-07 17:01 UTC (permalink / raw
  To: Christian Borntraeger
  Cc: KVM, Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Thomas Huth, Jean-Philippe Brucker

On Tue, May 7, 2024 at 2:29 PM Christian Borntraeger
<borntraeger@linux.ibm.com> wrote:
>
> Paolo,
>
> one fix for s390.

Pulled, thanks.

Paolo

> The following changes since commit 16c20208b9c2fff73015ad4e609072feafbf81ad:
>
>   Merge tag 'kvmarm-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (2024-04-30 13:50:55 -0400)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-6.9-1
>
> for you to fetch changes up to 175f2f5bcdfce9e728f1ff956a50f28824d28791:
>
>   KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M (2024-05-02 09:41:38 +0200)
>
> ----------------------------------------------------------------
> KVM: s390: Fix for 6.9
>
> Fix wild read on capability check.
>
> ----------------------------------------------------------------
> Jean-Philippe Brucker (1):
>       KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
>
>  arch/s390/kvm/kvm-s390.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-07 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 12:29 [GIT PULL 0/1] KVM: s390: Fix for 6.9 Christian Borntraeger
2024-05-07 12:29 ` [GIT PULL 1/1] KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M Christian Borntraeger
2024-05-07 17:01 ` [GIT PULL 0/1] KVM: s390: Fix for 6.9 Paolo Bonzini

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.