From: "Jan Beulich" Subject: Re: [PATCH] xen/x86: Introduce early_invalid_op() handler. Date: Mon, 09 Sep 2013 15:30:43 +0100 Message-ID: <522DF7B302000078000F1942@nat28.tlf.novell.com> References: <1378736236-8611-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VJ2UI-0006cz-RW for xen-devel@lists.xenproject.org; Mon, 09 Sep 2013 14:30:46 +0000 In-Reply-To: <1378736236-8611-1-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 09.09.13 at 16:17, Andrew Cooper wrote: > +void __init __attribute__((noreturn)) > +do_early_invalid_op(struct cpu_user_regs *regs) > +{ > + if ( *(u16 *)regs->eip == 0x0b0f ) Without even a range check on regs->eip? I don't think we want to needlessly risk #PF or #GP here... > + printk("Early ud2 at %p - BUG/WARN/ASSERT perhaps?\n", _p(regs->eip)); > + else > + printk("Unidentified early #UD at %p\n", _p(regs->eip)); > + You probably also meant to at least print the same raw stack dump that do_early_page_fault() produces? Jan > + for ( ; ; ) > + halt(); > +}