]> xenbits.xensource.com Git - xen.git/commit
x86/hvm: always do SMAP check when updating runstate_guest(v)
authorFeng Wu <feng.wu@intel.com>
Fri, 1 Aug 2014 14:39:17 +0000 (16:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2014 14:39:17 +0000 (16:39 +0200)
commit31ae587e6f0181bf1f7d196fe1b49357c8922e60
tree1596576306956ce48c3e9d36a9846ac61a828400
parentd91b0f9b58219724717db503f46ff2f731aa4c59
x86/hvm: always do SMAP check when updating runstate_guest(v)

In the current implementation, we honor the guest's CPL and AC
to determain whether do the SMAP check or not for runstate_guest(v).
However, this doesn't work. The VMCS feild is invalid when we try
to get geust's SS by hvm_get_segment_register(), since the
right VMCS has not beed loaded for the current VCPU.

In this patch, we always do the SMAP check when updating
runstate_guest(v) for the guest when SMAP is enabled by it.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Feng Wu <feng.wu@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
xen/arch/x86/domain.c
xen/arch/x86/mm/guest_walk.c
xen/include/asm-x86/domain.h