[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Better handling of NULL callback pointers -- synchronously crash the
ChangeSet 1.1515, 2005/05/23 19:17:51+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx Better handling of NULL callback pointers -- synchronously crash the offending domain. This gets us some nice debug output for domain0. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> traps.c | 18 ------------------ x86_32/entry.S | 2 ++ x86_64/entry.S | 2 ++ 3 files changed, 4 insertions(+), 18 deletions(-) diff -Nru a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c --- a/xen/arch/x86/traps.c 2005-05-23 15:01:55 -04:00 +++ b/xen/arch/x86/traps.c 2005-05-23 15:01:55 -04:00 @@ -245,12 +245,6 @@ if ( !GUEST_MODE(regs) ) goto xen_fault; -#ifndef NDEBUG - if ( (ed->arch.guest_context.trap_ctxt[trapnr].address == 0) && - (ed->domain->domain_id == 0) ) - goto xen_fault; -#endif - ti = ¤t->arch.guest_context.trap_ctxt[trapnr]; tb->flags = TBF_EXCEPTION; tb->cs = ti->cs; @@ -450,12 +444,6 @@ if ( !GUEST_MODE(regs) ) goto xen_fault; -#ifndef NDEBUG - if ( (ed->arch.guest_context.trap_ctxt[TRAP_page_fault].address == 0) && - (d->domain_id == 0) ) - goto xen_fault; -#endif - propagate_page_fault(addr, regs->error_code); return 0; @@ -930,12 +918,6 @@ (regs->error_code == 0) && gpf_emulate_4gb(regs) ) return 0; -#endif - -#ifndef NDEBUG - if ( (ed->arch.guest_context.trap_ctxt[TRAP_gp_fault].address == 0) && - (ed->domain->domain_id == 0) ) - goto gp_in_kernel; #endif /* Pass on GPF as is. */ diff -Nru a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S --- a/xen/arch/x86/x86_32/entry.S 2005-05-23 15:01:55 -04:00 +++ b/xen/arch/x86/x86_32/entry.S 2005-05-23 15:01:55 -04:00 @@ -331,6 +331,8 @@ movb TRAPBOUNCE_flags(%edx),%cl subl $12,%esi movl UREGS_eip+4(%esp),%eax + test %eax,%eax + jz domain_crash_synchronous FLT14: movl %eax,%gs:(%esi) movl EDOMAIN_vcpu_info(%ebx),%eax pushl VCPUINFO_upcall_mask(%eax) diff -Nru a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S --- a/xen/arch/x86/x86_64/entry.S 2005-05-23 15:01:55 -04:00 +++ b/xen/arch/x86/x86_64/entry.S 2005-05-23 15:01:55 -04:00 @@ -320,6 +320,8 @@ movw UREGS_cs+8(%rsp),%ax # Bits 0-15: CS FLT5: movq %rax,8(%rsi) # CS/saved_upcall_mask movq UREGS_rip+8(%rsp),%rax + testq %rax,%rax + jz domain_crash_synchronous FLT6: movq %rax,(%rsi) # RIP testb $TBF_EXCEPTION_ERRCODE,%cl jz 1f _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |