[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/svm: Fix handling of ICEBP intercepts
commit 1495b4ff9b4af2b9c0f12cdb6491082cecf34f86 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Feb 1 14:48:48 2019 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon May 13 10:35:37 2019 +0100 x86/svm: Fix handling of ICEBP intercepts c/s 9338a37d "x86/svm: implement debug events" added support for introspecting ICEBP debug exceptions, but didn't account for the fact that svm_get_insn_len() (previously __get_instruction_length) can fail and may already have raised #GP with the guest. If svm_get_insn_len() fails, return back to guest context rather than continuing and mistaking a trap-style VMExit for a fault-style one. Spotted by Coverity. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> Acked-by: Brian Woods <brian.woods@xxxxxxx> --- xen/arch/x86/hvm/svm/svm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 506258abdc..0beb31bbe9 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2760,6 +2760,9 @@ void svm_vmexit_handler(struct cpu_user_regs *regs) { trap_type = X86_EVENTTYPE_PRI_SW_EXCEPTION; inst_len = svm_get_insn_len(v, INSTR_ICEBP); + + if ( !inst_len ) + break; } rc = hvm_monitor_debug(regs->rip, -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |