Patch "arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one" has been added to the 3.18-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one
to the 3.18-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:
arm-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5553b142be11e794ebc0805950b2e8313f93d718Mon Sep 17 00:00:00 2001
From: Marc Zyngier <[email protected]>
Date: Thu, 16 Nov 2017 17:58:21 +0000
Subject: arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one
From: Marc Zyngier <[email protected]>
commit 5553b142be11e794ebc0805950b2e8313f93d718 upstream.
VTTBR_BADDR_MASK is used to sanity check the size and alignment of the VTTBR address. It seems to currently be off by one, thereby only allowing up to 39-bit addresses (instead of 40-bit) and also insufficiently checking the alignment. This patch fixes it.
This patch is the 32bit pendent of Kristina's arm64 fix, and she deserves the actual kudos for pinpointing that one.
--- arch/arm/include/asm/kvm_arm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/include/asm/kvm_arm.h +1 -2
@@ -161,8 +161,7 @@#else #define VTTBR_X (5 - KVM_T0SZ)#endif -#define VTTBR_BADDR_SHIFT (VTTBR_X - 1) -#define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT) +#define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_X)#define VTTBR_VMID_SHIFT (48LLU)#define VTTBR_VMID_MASK (0xffLLU << VTTBR_VMID_SHIFT)
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/arm-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch queue-3.18/arm-kvm-survive-unknown-traps-from-guests.patch queue-3.18/arm64-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch queue-3.18/irqchip-crossbar-fix-incorrect-type-of-register-size.patch
Greg KH
maintainerQuoted 11 lines · On Thu, Dec 14, 2017 at 09:46:39PM +0100, [email protected] wrote:
This is a note to let you know that I've just added the patch titled
arm: KVM: Fix
VTTBR_BADDR_MASKBUG_ONoff-by-oneto the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
arm-kvm-fix-vttbr_baddr_mask-bug_on-off-by-one.patch
and it can be found in the queue-3.18 subdirectory.
Nope, I've dropped this, see my other email to Marc about this.
thanks,
greg k-h