From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v5 04/10] KVM: arm/arm64: vgic-its: Check GITS_BASER Valid bit before saving tables Date: Wed, 25 Oct 2017 10:47:38 +0100 Message-ID: <86tvyneeyt.fsf@arm.com> References: <1508767709-15256-1-git-send-email-eric.auger@redhat.com> <1508767709-15256-5-git-send-email-eric.auger@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , , , , , , , , To: Eric Auger Return-path: Received: from foss.arm.com ([217.140.101.70]:35288 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932346AbdJYJrn (ORCPT ); Wed, 25 Oct 2017 05:47:43 -0400 In-Reply-To: <1508767709-15256-5-git-send-email-eric.auger@redhat.com> (Eric Auger's message of "Mon, 23 Oct 2017 16:08:23 +0200") Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Oct 23 2017 at 4:08:23 pm BST, Eric Auger wrote: > At the moment we don't properly check the GITS_BASER.Valid > bit before saving the collection and device tables. > > On vgic_its_save_collection_table() we use the GITS_BASER gpa > field whereas the Valid bit should be used. > > On vgic_its_save_device_tables() there is no check. This can > cause various bugs, among which a subsequent fault when accessing > the table in guest memory. > > Let's systematically check the Valid bit before doing anything. > > We also uniformize the code between save and restore. > > Signed-off-by: Eric Auger > Reviewed-by: Andre Przywara > Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny.