Skip to contentSkip to conversation

Patch "arm/arm64: kvm: Disable branch profiling in HYP code" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Nov 5, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

arm/arm64: kvm: Disable branch profiling in HYP code

to the 4.9-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-arm64-kvm-disable-branch-profiling-in-hyp-code.patch
and it can be found in the queue-4.9 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 f9b269f3098121b5d54aaf822e0898c8ed1d3fec Mon Sep 17 00:00:00 2001

From: Julien Thierry <[email protected]>
Date: Fri, 20 Oct 2017 12:34:17 +0100
Subject: arm/arm64: kvm: Disable branch profiling in HYP code

From: Julien Thierry <[email protected]>

commit f9b269f3098121b5d54aaf822e0898c8ed1d3fec upstream.

When HYP code runs into branch profiling code, it attempts to jump to unmapped memory, causing a HYP Panic.

Disable the branch profiling for code designed to run at HYP mode.

---
 arch/arm/kvm/hyp/Makefile   |    2 +-
 arch/arm64/kvm/hyp/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/kvm/hyp/Makefile +1 -1
@@ -2,7 +2,7 @@
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
-ccflags-y += -fno-stack-protector
+ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
 
 KVM=../../../../virt/kvm
 
arch/arm64/kvm/hyp/Makefile +1 -1
@@ -2,7 +2,7 @@
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
-ccflags-y += -fno-stack-protector
+ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
 
 KVM=../../../../virt/kvm
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/arm-arm64-kvm-disable-branch-profiling-in-hyp-code.patch