From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53C9CC433DB for ; Mon, 15 Mar 2021 11:30:55 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id CC51D64E90 for ; Mon, 15 Mar 2021 11:30:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC51D64E90 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6C4C04B527; Mon, 15 Mar 2021 07:30:54 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@linuxfoundation.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id avbWwNQLEYSo; Mon, 15 Mar 2021 07:30:53 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 470594B4F4; Mon, 15 Mar 2021 07:30:53 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 211CA4B48E for ; Mon, 15 Mar 2021 07:30:52 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F3N7NhZrROLM for ; Mon, 15 Mar 2021 07:30:51 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id EC27C4B462 for ; Mon, 15 Mar 2021 07:30:50 -0400 (EDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9210664E20; Mon, 15 Mar 2021 11:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615807850; bh=r1ZaWe/KhJBEA8aUQ4UbMQhMdZ1VwL+uVi5g6aNvoRo=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=gpyg90n+eCft5fiP8ufLH3HoTuLcCL5g4tqk4k7Tfu4cPQUFoSwKyMZsC6OVo5HBT CKYiOelsTfGBag+o6taRVzPXASw/ZUgKMZbgTc6Is+mnbgRdk8cwpKzzfz+CjqAEXq tqFk6f2PejtB5eBAP+iXrbmbpsFu/6jCYmEsIWuQ= Subject: Patch "KVM: arm64: Fix exclusive limit for IPA size" has been added to the 4.14-stable tree To: drjones@redhat.com, eric.auger@redhat.com, gregkh@linuxfoundation.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, maz@kernel.org From: Date: Mon, 15 Mar 2021 12:30:47 +0100 In-Reply-To: <20210315110833.4135927-1-maz@kernel.org> Message-ID: <16158078473223@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore Cc: stable-commits@vger.kernel.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu This is a note to let you know that I've just added the patch titled KVM: arm64: Fix exclusive limit for IPA size to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-arm64-fix-exclusive-limit-for-ipa-size.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From foo@baz Mon Mar 15 12:28:42 PM CET 2021 From: Marc Zyngier Date: Mon, 15 Mar 2021 11:08:33 +0000 Subject: KVM: arm64: Fix exclusive limit for IPA size To: gregkh@linuxfoundation.org Cc: kvmarm@lists.cs.columbia.edu, kernel-team@android.com, Eric Auger , stable@vger.kernel.org, Andrew Jones Message-ID: <20210315110833.4135927-1-maz@kernel.org> From: Marc Zyngier Commit 262b003d059c6671601a19057e9fe1a5e7f23722 upstream. When registering a memslot, we check the size and location of that memslot against the IPA size to ensure that we can provide guest access to the whole of the memory. Unfortunately, this check rejects memslot that end-up at the exact limit of the addressing capability for a given IPA size. For example, it refuses the creation of a 2GB memslot at 0x8000000 with a 32bit IPA space. Fix it by relaxing the check to accept a memslot reaching the limit of the IPA space. Fixes: c3058d5da222 ("arm/arm64: KVM: Ensure memslots are within KVM_PHYS_SIZE") Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org # 4.4, 4.9, 4.14, 4.19 Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20210311100016.3830038-3-maz@kernel.org Signed-off-by: Greg Kroah-Hartman --- virt/kvm/arm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -1870,7 +1870,7 @@ int kvm_arch_prepare_memory_region(struc * Prevent userspace from creating a memory region outside of the IPA * space addressable by the KVM guest IPA space. */ - if (memslot->base_gfn + memslot->npages >= + if (memslot->base_gfn + memslot->npages > (KVM_PHYS_SIZE >> PAGE_SHIFT)) return -EFAULT; Patches currently in stable-queue which might be from maz@kernel.org are queue-4.14/kvm-arm64-fix-exclusive-limit-for-ipa-size.patch _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm