From: Stefano Stabellini Subject: Re: [PATCH] arm: implement hypercall continuations Date: Fri, 20 Jul 2012 14:28:30 +0100 Message-ID: References: <1342690554-30561-1-git-send-email-ian.campbell@citrix.com> <1342790623.26734.111.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1342790623.26734.111.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 20 Jul 2012, Ian Campbell wrote: > > > + for ( i = 0; *p != '\0'; i++ ) > > > + { > > > + arg = next_arg(p, args); > > > + > > > + switch ( i ) > > > + { > > > + case 0: regs->r0 = arg; break; > > > > wrong alignment > > I had rc = arg and lined it up then chaned it back without realigning, > thanks for pointing it out. > > > > @@ -462,17 +469,18 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code) > > > > > > static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss) > > > { > > > - arm_hypercall_t *call = NULL; > > > + arm_hypercall_fn_t call = NULL; > > > > > > if ( iss != XEN_HYPERCALL_TAG ) > > > + domain_crash_synchronous(); > > > > Why did you change the behavior of the iss != XEN_HYPERCALL_TAG case? > > I just noticed it while adding the bounds check. A guest which makes a > hypercall with the wrong tag is either malicious or about to fail > horribly, there's no reason to allow them to keep living. I don't think so: it could just be a misconfigured guest, trying to initialize KVM support before Xen.