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 9D4CFC433E0 for ; Mon, 15 Mar 2021 11:31:16 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 2994264E90 for ; Mon, 15 Mar 2021 11:31:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2994264E90 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 C09174B503; Mon, 15 Mar 2021 07:31:15 -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 LvccK+PZTcET; Mon, 15 Mar 2021 07:31:14 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6E01A4B51B; Mon, 15 Mar 2021 07:31:14 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0635F4B515 for ; Mon, 15 Mar 2021 07:31:13 -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 93DEy8yIZfo7 for ; Mon, 15 Mar 2021 07:31:12 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id EB0A74B462 for ; Mon, 15 Mar 2021 07:31:11 -0400 (EDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B9F364E61; Mon, 15 Mar 2021 11:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615807871; bh=+2xMWo+2W9gHdyJ7hBxIUlcrPtH53aYMF/D4GkeJTxo=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=AojJkVR4J4KjWAeAl25zqEhMz6KoGsNMCNGcJ959mR1cIi+yvjNUm71kiamn9UmEU BwkHuwAhmkchNqRoli1+BiB1xvii5eGhvUYLZBuYBkkHfuIIJy47p/Kvdk/LXmZ8Uh U/DNhRisAYprbq16HP+UAFRHDPDBMFD5uzePlnGk= Subject: Patch "KVM: arm64: Fix exclusive limit for IPA size" has been added to the 4.19-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:31:08 +0100 In-Reply-To: <20210315110833.4135927-1-maz@kernel.org> Message-ID: <161580786826222@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.19-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.19 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:26 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 @@ -2080,7 +2080,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.19/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