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 3605FC433DB for ; Mon, 15 Mar 2021 12:05:03 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 7A66164E90 for ; Mon, 15 Mar 2021 12:05:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A66164E90 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 EBDCF4B217; Mon, 15 Mar 2021 08:05:01 -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 NZ2-t3WPr9+y; Mon, 15 Mar 2021 08:05:00 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C36A44B3B7; Mon, 15 Mar 2021 08:05:00 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 27E2C4B217 for ; Mon, 15 Mar 2021 08:05:00 -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 nzwlZraqUS1a for ; Mon, 15 Mar 2021 08:04:59 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id E5B9E4B3AA for ; Mon, 15 Mar 2021 08:04:58 -0400 (EDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 198B864E27; Mon, 15 Mar 2021 12:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615809897; bh=x0DCfMN0KGUOzMNOthD4rlq6/mkqCfTM+pPFbd35crQ=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=Ks9yWQapQ8dTPao5u7xHiuUstYHcQYMhDcBzqZWPs71wQRyACXv3ZZ+Gq9ELcMi2n kGGT+DrnK1/rssCVK0EIiVgwCO4LFAMW6lZA59VhwiPu2ZBxqiRLcYKGE6zItCBChr ZlvvGtBBeZ4gKItTMzh3nFLQLHw/XC5YSDI+YvKs= Subject: Patch "KVM: arm64: Fix exclusive limit for IPA size" has been added to the 4.4-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 13:04:54 +0100 In-Reply-To: <20210315114646.4137198-1-maz@kernel.org> Message-ID: <16158098949648@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.4-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.4 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 01:04:46 PM CET 2021 From: Marc Zyngier Date: Mon, 15 Mar 2021 11:46:46 +0000 Subject: KVM: arm64: Fix exclusive limit for IPA size To: gregkh@linuxfoundation.org Cc: kernel-team@android.com, kvmarm@lists.cs.columbia.edu, Eric Auger , stable@vger.kernel.org, Andrew Jones Message-ID: <20210315114646.4137198-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 Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20210311100016.3830038-3-maz@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/arm/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1789,7 +1789,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.4/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