All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: <kvmarm@lists.cs.columbia.edu>, <maz@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <eric.auger@redhat.com>,
	<james.morse@arm.com>, <julien.thierry.kdev@gmail.com>,
	<suzuki.poulose@arm.com>, <wanghaibin.wang@huawei.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: [PATCH 0/2] KVM: arm64: vgic: Fix handling of userspace register accesses
Date: Fri, 13 Nov 2020 22:27:59 +0800	[thread overview]
Message-ID: <20201113142801.1659-1-yuzenghui@huawei.com> (raw)

We had recently seen a kernel panic when accidently programming QEMU in an
inappropriate way (in short, accessing RD registers before setting the RD
base address. See patch #1 for details). And it looks like we're missing
some basic checking when handling userspace register access.

I've only tested it with QEMU. It'd be appreciated if others can test it
with other user tools.

Zenghui Yu (2):
  KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses
  KVM: arm64: vgic: Forbid invalid userspace Distributor accesses

 arch/arm64/kvm/vgic/vgic-mmio-v3.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.19.1


WARNING: multiple messages have this Message-ID (diff)
From: Zenghui Yu <yuzenghui@huawei.com>
To: <kvmarm@lists.cs.columbia.edu>, <maz@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] KVM: arm64: vgic: Fix handling of userspace register accesses
Date: Fri, 13 Nov 2020 22:27:59 +0800	[thread overview]
Message-ID: <20201113142801.1659-1-yuzenghui@huawei.com> (raw)

We had recently seen a kernel panic when accidently programming QEMU in an
inappropriate way (in short, accessing RD registers before setting the RD
base address. See patch #1 for details). And it looks like we're missing
some basic checking when handling userspace register access.

I've only tested it with QEMU. It'd be appreciated if others can test it
with other user tools.

Zenghui Yu (2):
  KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses
  KVM: arm64: vgic: Forbid invalid userspace Distributor accesses

 arch/arm64/kvm/vgic/vgic-mmio-v3.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.19.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Zenghui Yu <yuzenghui@huawei.com>
To: <kvmarm@lists.cs.columbia.edu>, <maz@kernel.org>
Cc: suzuki.poulose@arm.com, linux-kernel@vger.kernel.org,
	eric.auger@redhat.com, james.morse@arm.com,
	linux-arm-kernel@lists.infradead.org,
	Zenghui Yu <yuzenghui@huawei.com>,
	wanghaibin.wang@huawei.com, julien.thierry.kdev@gmail.com
Subject: [PATCH 0/2] KVM: arm64: vgic: Fix handling of userspace register accesses
Date: Fri, 13 Nov 2020 22:27:59 +0800	[thread overview]
Message-ID: <20201113142801.1659-1-yuzenghui@huawei.com> (raw)

We had recently seen a kernel panic when accidently programming QEMU in an
inappropriate way (in short, accessing RD registers before setting the RD
base address. See patch #1 for details). And it looks like we're missing
some basic checking when handling userspace register access.

I've only tested it with QEMU. It'd be appreciated if others can test it
with other user tools.

Zenghui Yu (2):
  KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses
  KVM: arm64: vgic: Forbid invalid userspace Distributor accesses

 arch/arm64/kvm/vgic/vgic-mmio-v3.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.19.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-11-13 14:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 14:27 Zenghui Yu [this message]
2020-11-13 14:27 ` [PATCH 0/2] KVM: arm64: vgic: Fix handling of userspace register accesses Zenghui Yu
2020-11-13 14:27 ` Zenghui Yu
2020-11-13 14:28 ` [PATCH 1/2] KVM: arm64: vgic: Forbid invalid userspace Redistributor accesses Zenghui Yu
2020-11-13 14:28   ` Zenghui Yu
2020-11-13 14:28   ` Zenghui Yu
2020-11-15 17:04   ` Marc Zyngier
2020-11-15 17:04     ` Marc Zyngier
2020-11-15 17:04     ` Marc Zyngier
2020-11-16 13:09     ` Zenghui Yu
2020-11-16 13:09       ` Zenghui Yu
2020-11-16 13:09       ` Zenghui Yu
2020-11-16 14:10       ` Marc Zyngier
2020-11-16 14:10         ` Marc Zyngier
2020-11-16 14:10         ` Marc Zyngier
2020-11-16 14:57         ` Zenghui Yu
2020-11-16 14:57           ` Zenghui Yu
2020-11-16 14:57           ` Zenghui Yu
2020-11-17  8:49           ` Marc Zyngier
2020-11-17  8:49             ` Marc Zyngier
2020-11-17  8:49             ` Marc Zyngier
2020-11-17  9:47             ` Auger Eric
2020-11-17  9:47               ` Auger Eric
2020-11-17  9:47               ` Auger Eric
2020-11-17  9:59             ` Auger Eric
2020-11-17  9:59               ` Auger Eric
2020-11-17  9:59               ` Auger Eric
2020-11-17 10:51               ` Marc Zyngier
2020-11-17 10:51                 ` Marc Zyngier
2020-11-17 10:51                 ` Marc Zyngier
2020-11-17 13:09             ` Zenghui Yu
2020-11-17 13:09               ` Zenghui Yu
2020-11-17 13:09               ` Zenghui Yu
2020-11-13 14:28 ` [PATCH 2/2] KVM: arm64: vgic: Forbid invalid userspace Distributor accesses Zenghui Yu
2020-11-13 14:28   ` Zenghui Yu
2020-11-13 14:28   ` Zenghui Yu

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=20201113142801.1659-1-yuzenghui@huawei.com \
    --to=yuzenghui@huawei.com \
    --cc=eric.auger@redhat.com \
    --cc=james.morse@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=wanghaibin.wang@huawei.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.