|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] x86/pv: Check that emulate_privileged_op() didn't change TF
As the comment says, the guest shouldn't be able to change X86_EFLAGS_TF,
although we don't care which value it currently has.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
xen/arch/x86/traps.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index e45ff71..6dbdaa0 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3395,7 +3395,8 @@ static int emulate_privileged_op(struct cpu_user_regs
*regs)
* Un-mirror virtualized state from EFLAGS.
* Nothing we allow to be emulated can change TF, IF, or IOPL.
*/
- ASSERT(!((regs->_eflags ^ eflags) & (X86_EFLAGS_IF | X86_EFLAGS_IOPL)));
+ ASSERT(!((regs->_eflags ^ eflags) &
+ (X86_EFLAGS_TF | X86_EFLAGS_IF | X86_EFLAGS_IOPL)));
regs->_eflags |= X86_EFLAGS_IF;
regs->_eflags &= ~X86_EFLAGS_IOPL;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |